public abstract class AbstractProtocolTransport extends Object implements ProtocolTransport
ProtocolTransport implementation which already takes care of all the complex
stuff when handling Response's.| Constructor and Description |
|---|
AbstractProtocolTransport() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
close()
Close the Transport
|
protected static byte[] |
toBytes(Response response)
Take the
Response and encode it to a byte array |
void |
writeResponse(Response response,
ProtocolSession session)
Write the
Response to the ProtocolTransport which will forward it to the connected
peer |
protected void |
writeResponseToClient(Response response,
ProtocolSession session)
Write the
Response to the client |
protected abstract void |
writeToClient(byte[] bytes,
ProtocolSession session,
boolean startTLS)
Write the given
byte's to the remote peer |
protected abstract void |
writeToClient(InputStream in,
ProtocolSession session,
boolean startTLS)
Write the given
InputStream to the remote peer |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetId, getLocalAddress, getPushedLineHandlerCount, getRemoteAddress, isReadable, isStartTLSSupported, isTLSStarted, popLineHandler, pushLineHandler, setReadablepublic final void writeResponse(Response response, ProtocolSession session)
ProtocolTransportResponse to the ProtocolTransport which will forward it to the connected
peerwriteResponse in interface ProtocolTransportProtocolTransport.writeResponse(org.apache.james.protocols.api.Response, org.apache.james.protocols.api.ProtocolSession)protected void writeResponseToClient(Response response, ProtocolSession session)
Response to the clientresponse - session - protected static byte[] toBytes(Response response)
Response and encode it to a byte arrayresponse - protected abstract void writeToClient(byte[] bytes,
ProtocolSession session,
boolean startTLS)
byte's to the remote peerbytes - the bytes to writesession - the ProtocolSession for the write requeststartTLS - true if startTLS should be started after the bytes were written to the clientprotected abstract void writeToClient(InputStream in, ProtocolSession session, boolean startTLS)
InputStream to the remote peerin - 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 clientprotected abstract void close()
Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.