public class NettyProtocolTransport extends AbstractProtocolTransport
| Constructor and Description |
|---|
NettyProtocolTransport(org.jboss.netty.channel.Channel channel,
SSLEngine engine) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
close()
Close the Transport
|
String |
getId()
Return the unique id.
|
InetSocketAddress |
getLocalAddress()
Return the
InetSocketAddress of the local bound address |
int |
getPushedLineHandlerCount()
Return the count of pushed
LineHandler's |
InetSocketAddress |
getRemoteAddress()
Return the
InetSocketAddress of the remote peer |
boolean |
isReadable()
Return
true if the channel is readable |
boolean |
isStartTLSSupported()
|
boolean |
isTLSStarted()
Return
true if TLS encryption is active |
void |
popLineHandler()
Pop a
LineHandler of the stack |
void |
pushLineHandler(LineHandler<? extends ProtocolSession> overrideCommandHandler,
ProtocolSession session)
Push a
LineHandler in. |
void |
setReadable(boolean readable)
Set the
ProtocolTransport readable or not. |
protected void |
writeToClient(byte[] bytes,
ProtocolSession session,
boolean startTLS)
Write the given
byte's to the remote peer |
protected void |
writeToClient(InputStream in,
ProtocolSession session,
boolean startTLS)
Write the given
InputStream to the remote peer |
toBytes, writeResponse, writeResponseToClientpublic NettyProtocolTransport(org.jboss.netty.channel.Channel channel,
SSLEngine engine)
public InetSocketAddress getRemoteAddress()
ProtocolTransportInetSocketAddress of the remote peerProtocolTransport.getRemoteAddress()public String getId()
ProtocolTransportProtocolTransport.getId()public boolean isTLSStarted()
ProtocolTransporttrue if TLS encryption is activeProtocolTransport.isTLSStarted()public boolean isStartTLSSupported()
ProtocolTransportProtocolTransport.isStartTLSSupported()public void popLineHandler()
ProtocolTransportLineHandler of the stackProtocolTransport.popLineHandler()public int getPushedLineHandlerCount()
ProtocolTransportLineHandler'sProtocolTransport.getPushedLineHandlerCount()protected void writeToClient(byte[] bytes,
ProtocolSession session,
boolean startTLS)
AbstractProtocolTransportbyte's to the remote peerwriteToClient in class AbstractProtocolTransportbytes - the bytes to writesession - the ProtocolSession for the write requeststartTLS - true if startTLS should be started after the bytes were written to the clientprotected void close()
AbstractProtocolTransportclose in class AbstractProtocolTransportprotected void writeToClient(InputStream in, ProtocolSession session, boolean startTLS)
AbstractProtocolTransportInputStream to the remote peerwriteToClient in class AbstractProtocolTransportin - the InputStream which should be written back to the clientsession - the ProtocolSession for the write requeststartTLS - true if startTLS should be started after the InputStream was written to the clientpublic void setReadable(boolean readable)
ProtocolTransportProtocolTransport readable or not. If its not readable then no new lines should get processedpublic boolean isReadable()
ProtocolTransporttrue if the channel is readablepublic InetSocketAddress getLocalAddress()
ProtocolTransportInetSocketAddress of the local bound addresspublic void pushLineHandler(LineHandler<? extends ProtocolSession> overrideCommandHandler, ProtocolSession session)
ProtocolTransportLineHandler in.Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.