no message
This commit is contained in:
33
src/_VisualDVM/Passes/SSH/ConnectionPass.java
Normal file
33
src/_VisualDVM/Passes/SSH/ConnectionPass.java
Normal file
@@ -0,0 +1,33 @@
|
||||
package _VisualDVM.Passes.SSH;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
import _VisualDVM.GlobalData.User.User;
|
||||
import _VisualDVM.TestingSystem.DVM.UserConnection;
|
||||
import Common.Passes.Pass;
|
||||
public class ConnectionPass<T> extends Pass<T> {
|
||||
protected Machine machine = null;
|
||||
public User user = null;
|
||||
//--
|
||||
protected void Connect() throws Exception{
|
||||
user.connection = null;
|
||||
user.connection = new UserConnection(machine, user);
|
||||
}
|
||||
void Disconnect(){
|
||||
if (user.connection!=null){
|
||||
user.connection.Disconnect();
|
||||
user.connection = null;
|
||||
}
|
||||
}
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
Connect();
|
||||
ServerAction();
|
||||
}
|
||||
@Override
|
||||
protected void performFinish() throws Exception {
|
||||
Disconnect();
|
||||
}
|
||||
//--
|
||||
protected void ServerAction() throws Exception{
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user