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, writeResponseToClient
public NettyProtocolTransport(org.jboss.netty.channel.Channel channel, SSLEngine engine)
public InetSocketAddress getRemoteAddress()
ProtocolTransport
InetSocketAddress
of the remote peerProtocolTransport.getRemoteAddress()
public String getId()
ProtocolTransport
ProtocolTransport.getId()
public boolean isTLSStarted()
ProtocolTransport
true
if TLS
encryption is activeProtocolTransport.isTLSStarted()
public boolean isStartTLSSupported()
ProtocolTransport
ProtocolTransport.isStartTLSSupported()
public void popLineHandler()
ProtocolTransport
LineHandler
of the stackProtocolTransport.popLineHandler()
public int getPushedLineHandlerCount()
ProtocolTransport
LineHandler
'sProtocolTransport.getPushedLineHandlerCount()
protected void writeToClient(byte[] bytes, ProtocolSession session, boolean startTLS)
AbstractProtocolTransport
byte's
to the remote peerwriteToClient
in class AbstractProtocolTransport
bytes
- 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()
AbstractProtocolTransport
close
in class AbstractProtocolTransport
protected void writeToClient(InputStream in, ProtocolSession session, boolean startTLS)
AbstractProtocolTransport
InputStream
to the remote peerwriteToClient
in class AbstractProtocolTransport
in
- 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)
ProtocolTransport
ProtocolTransport
readable or not. If its not readable then no new lines should get processedpublic boolean isReadable()
ProtocolTransport
true
if the channel is readablepublic InetSocketAddress getLocalAddress()
ProtocolTransport
InetSocketAddress
of the local bound addresspublic void pushLineHandler(LineHandler<? extends ProtocolSession> overrideCommandHandler, ProtocolSession session)
ProtocolTransport
LineHandler
in.Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.