jaugment2.ssh
Class SSHService
java.lang.Object
|
+--java.rmi.server.RemoteObject
|
+--java.rmi.server.RemoteServer
|
+--java.rmi.server.UnicastRemoteObject
|
+--jaugment2.jini.simpleService.simpleService
|
+--jaugment2.ssh.SSHService
- public class SSHService
- extends simpleService
- implements java.rmi.Remote
The beginning of a service providing SSH-connections
- See Also:
- Serialized Form
| Fields inherited from class java.rmi.server.UnicastRemoteObject |
csf,
port,
portFactoryParamTypes,
portParamTypes,
serialVersionUID,
ssf |
| Fields inherited from class java.rmi.server.RemoteServer |
log,
logname,
serialVersionUID |
| Fields inherited from class java.rmi.server.RemoteObject |
ref,
serialVersionUID |
|
Method Summary |
net.jini.core.lease.Lease |
addTerminalListener(net.jini.core.event.RemoteEventListener listener,
java.rmi.MarshalledObject handback,
int registerfor)
|
int |
connect(java.lang.String login,
byte[] password,
java.lang.String host,
int port)
Connects and returns an identifier for that connnection |
void |
destroy()
stop this service, destroy any persistent storage and exit |
void |
disconnect(int id)
|
private void |
fireEvent(int conn,
java.lang.String data)
Helper-function to inform all our listeners |
private void |
loadMe()
Load our state (e.g. |
void |
restart()
restart this service once it has been stopped |
void |
sendData(int id,
java.lang.String data)
|
void |
stop(boolean exit)
stop this service. |
| Methods inherited from class jaugment2.jini.simpleService.simpleService |
,
deinit,
deinitBindings,
finalize,
getProxy,
getServiceItem,
getStorageLocation,
init,
initBindings,
initBindings,
load,
save,
setStorageLocation |
| Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone,
exportObject,
exportObject,
exportObject,
exportObject,
readObject,
reexport,
unexportObject |
| Methods inherited from class java.rmi.server.RemoteServer |
getClientHost,
getLog,
setLog |
| Methods inherited from class java.rmi.server.RemoteObject |
equals,
getRef,
hashCode,
toString,
toStub,
writeObject |
| Methods inherited from class java.lang.Object |
getClass,
notify,
notifyAll,
registerNatives,
wait,
wait,
wait |
myproxy
private SSHServiceProxy myproxy
simpleLeaselistener
private SimpleLandlord.LeaseListener simpleLeaselistener
- Helper-class for out Landlord.
landLord
private SimpleLandlord landLord
tio
com.cedric_gourio.ssh.SshIO[] tio
listenerRegistrations
java.util.LinkedList[] listenerRegistrations
connectdisconnectListenerRegistrations
java.util.LinkedList connectdisconnectListenerRegistrations
SSHService
public SSHService()
throws java.rmi.RemoteException
SSHService
public SSHService(net.jini.core.discovery.LookupLocator locallocator)
throws java.rmi.RemoteException
loadMe
private void loadMe()
- Load our state (e.g. attrubutes, service-id) from persistent storage
restart
public void restart()
throws java.lang.Exception
- restart this service once it has been stopped
- Overrides:
- restart in class simpleService
- See Also:
stop
stop
public void stop(boolean exit)
throws java.lang.Exception
- stop this service. If exit is false all references to this
service are still valid but it has deregistered everywhere.
(this includes the RMI-activation-daemon)
- Overrides:
- stop in class simpleService
- Parameters:
exit - stop running- See Also:
restart,
destroy
destroy
public void destroy()
throws java.rmi.RemoteException
- stop this service, destroy any persistent storage and exit
- Overrides:
- destroy in class simpleService
addTerminalListener
public net.jini.core.lease.Lease addTerminalListener(net.jini.core.event.RemoteEventListener listener,
java.rmi.MarshalledObject handback,
int registerfor)
throws java.rmi.RemoteException,
net.jini.core.lease.LeaseDeniedException,
java.lang.IllegalStateException
- Parameters:
registerfor - -1=for new/ended sessions >0 for output of this session
fireEvent
private void fireEvent(int conn,
java.lang.String data)
- Helper-function to inform all our listeners
disconnect
public void disconnect(int id)
throws java.io.IOException,
java.rmi.RemoteException
sendData
public void sendData(int id,
java.lang.String data)
throws java.io.IOException,
java.rmi.RemoteException
connect
public int connect(java.lang.String login,
byte[] password,
java.lang.String host,
int port)
throws java.io.IOException,
java.rmi.RemoteException
- Connects and returns an identifier for that connnection