|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.schmizz.sshj.AbstractService
public abstract class AbstractService
An abstract class for Service that implements common or default functionality.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface net.schmizz.sshj.common.ErrorNotifiable |
|---|
ErrorNotifiable.Util |
| Field Summary | |
|---|---|
protected org.slf4j.Logger |
log
Logger |
protected String |
name
Assigned name of this service |
protected int |
timeout
Timeout for blocking operations |
protected Transport |
trans
Transport layer |
| Constructor Summary | |
|---|---|
AbstractService(String name,
Transport trans)
|
|
| Method Summary | |
|---|---|
String |
getName()
|
int |
getTimeout()
|
void |
handle(Message msg,
SSHPacket buf)
Delegate handling of some SSH packet to this object. |
void |
notifyError(SSHException error)
Notifies this object of an error. |
void |
notifyUnimplemented(long seqNum)
Notifies this service that a SSH_MSG_UNIMPLEMENTED was received for packet with given sequence number. |
void |
request()
Request and install this service with the associated transport. |
void |
setTimeout(int timeout)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final org.slf4j.Logger log
protected final String name
protected final Transport trans
protected int timeout
| Constructor Detail |
|---|
public AbstractService(String name,
Transport trans)
| Method Detail |
|---|
public String getName()
getName in interface Service
public void handle(Message msg,
SSHPacket buf)
throws SSHException
SSHPacketHandler
handle in interface SSHPacketHandlermsg - the SSH message identifierbuf - SSHPacket containing rest of the request
SSHException - if there is a non-recoverable errorpublic void notifyError(SSHException error)
ErrorNotifiableerror.
notifyError in interface ErrorNotifiable
public void notifyUnimplemented(long seqNum)
throws SSHException
ServiceSSH_MSG_UNIMPLEMENTED was received for packet with given sequence number.
Meant to be invoked as a callback by the transport layer.
notifyUnimplemented in interface ServiceseqNum - sequence number of the packet which the server claims is unimplemented
SSHException - if the packet is unexpected and may represent a disruption
public void request()
throws TransportException
ServiceTransport.getService() currently active
service}.
request in interface ServiceTransportException - if there is an error sending the service requestpublic int getTimeout()
public void setTimeout(int timeout)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||