|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.maverick.sshd.ConnectionProtocol
public class ConnectionProtocol
This class implements the SSH Connection Protocol as an SSH Transport Protocol service.
| Field Summary | |
|---|---|
static String |
SERVICE_NAME
|
| Constructor Summary | |
|---|---|
ConnectionProtocol(String username)
|
|
| Method Summary | |
|---|---|
void |
addGlobalRequestHandler(GlobalRequestHandler handler)
|
void |
disconnect()
Disconnect the current connection. |
List<Channel> |
getChannels()
|
Connection |
getConnection()
|
SshContext |
getContext()
Get the connections ConfigurationContext. |
SocketAddress |
getLocalAddress()
Get the local address to which the remote socket is connected. |
int |
getLocalPort()
Get the local port ro which the remote socket is connected. |
SocketAddress |
getRemoteAddress()
Get the address of the remote client. |
SshTransport |
getTransport()
Get the underlying transport. |
String |
getUsername()
Get the username for the connected user. |
String |
getUUID()
|
void |
idle(org.apache.mina.core.session.IdleStatus status)
Called when the transport layer has been idle for 10 seconds |
void |
init(org.apache.mina.core.session.IoSession session,
SshTransport transport)
Initialize the service. |
boolean |
openChannel(Channel channel)
|
boolean |
processMessage(byte[] msg)
Process a transport message. |
void |
sendChannelOpenConfirmation(Channel channel,
byte[] responsedata)
|
void |
sendChannelOpenFailure(Channel channel,
int reason,
String desc)
|
void |
sendGlobalRequest(com.maverick.ssh.GlobalRequest request)
|
void |
start()
Start the service. |
void |
stop()
Stop the service |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String SERVICE_NAME
| Constructor Detail |
|---|
public ConnectionProtocol(String username)
| Method Detail |
|---|
public void init(org.apache.mina.core.session.IoSession session,
SshTransport transport)
throws IOException
Service
init in interface ServiceIOExceptionpublic void addGlobalRequestHandler(GlobalRequestHandler handler)
public String getUUID()
public SocketAddress getRemoteAddress()
public SocketAddress getLocalAddress()
public int getLocalPort()
public String getUsername()
public List<Channel> getChannels()
public void stop()
Service
stop in interface Service
public boolean openChannel(Channel channel)
throws com.maverick.ssh.ChannelOpenException
com.maverick.ssh.ChannelOpenExceptionpublic void disconnect()
public boolean processMessage(byte[] msg)
throws IOException
ServiceTransportProtocol that is not a transport level message the
message is passed onto the active service using this method. The service
processes the message and returns a value to indicate whether the message
was used.
processMessage in interface ServiceIOExceptionpublic void sendGlobalRequest(com.maverick.ssh.GlobalRequest request)
public void sendChannelOpenConfirmation(Channel channel,
byte[] responsedata)
public void sendChannelOpenFailure(Channel channel,
int reason,
String desc)
public SshContext getContext()
ConfigurationContext.
public SshTransport getTransport()
public void start()
Service
start in interface Servicepublic Connection getConnection()
public void idle(org.apache.mina.core.session.IdleStatus status)
Service
idle in interface Service
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||