public class ThreadedProtocolEngine extends com.maverick.ssh.ExecutorOperationSupport<SshContext> implements ProtocolEngine
BY_APPLICATION
Constructor and Description |
---|
ThreadedProtocolEngine(TransportProtocol engine) |
Modifier and Type | Method and Description |
---|---|
void |
disconnect(int reason,
String description)
Disconnect the Engine
|
SshContext |
getContext() |
SocketConnection |
getSocketConnection()
Get the
SocketConnection for this connection. |
boolean |
isConnected()
Is the protocol connected.
|
void |
onPostMessage() |
void |
onSocketClose()
The socket has closed.
|
void |
onSocketConnect(SocketConnection connection)
The socket is connected and the protocol can now start.
|
boolean |
onSocketRead(ByteBuffer applicationData)
Data has arrived on the socket.
|
SocketWriteCallback |
onSocketWrite(ByteBuffer applicationData)
The socket is ready for writing.
|
boolean |
wantsToWrite()
Determines whether the protocol wants to write to the socket.
|
public ThreadedProtocolEngine(TransportProtocol engine)
public void onSocketConnect(SocketConnection connection)
ProtocolEngine
onSocketConnect
in interface ProtocolEngine
connection
- SocketConnectionpublic void onSocketClose()
ProtocolEngine
onSocketClose
in interface ProtocolEngine
public final boolean onSocketRead(ByteBuffer applicationData)
ProtocolEngine
onSocketRead
in interface ProtocolEngine
applicationData
- ByteBufferpublic final SocketWriteCallback onSocketWrite(ByteBuffer applicationData)
ProtocolEngine
onSocketWrite
in interface ProtocolEngine
applicationData
- ByteBufferpublic boolean wantsToWrite()
ProtocolEngine
wantsToWrite
in interface ProtocolEngine
public boolean isConnected()
ProtocolEngine
isConnected
in interface ProtocolEngine
public SocketConnection getSocketConnection()
ProtocolEngine
SocketConnection
for this connection.getSocketConnection
in interface ProtocolEngine
public void disconnect(int reason, String description)
ProtocolEngine
disconnect
in interface ProtocolEngine
public SshContext getContext()
getContext
in class com.maverick.ssh.ExecutorOperationSupport<SshContext>
public void onPostMessage()
Copyright © 2016. All rights reserved.