Create interface in commonPage edited by Aidan Skinner
At the start of a connection the the NetworkDriver will pass data to a ProtocolFactory which will handle protocol negotiation and return the ProtocolDriver to use or throw an exception if no driver is available. The network driver will call bytesReceived on the ProtocolDriver when data is recieved.
public interface ProtocolDriver
{
int bytesReceived(byte[] bytes, int offset, int length);
// Called when the connection has been idle
void idle();
void close();
void halfclose();
}
public class AMQProtocolDriver implements ProtocolDriver
{
int bytesReceived(byte[] bytes, int offset, int length)
{
// Parses bytes until it figures out which ProtocolDriver to use, constructs one and then passes through all data and other method calls.
}
}
public interface NetworkDriver
{
void open(InetAddress destination);
void bind(int port, InetAddress[] addresses);
void close();
// Returns number of bytes actually accepted
int write(byte[] bytes, int offset, int length);
// Use the preconfigured SSLEngine
void setSSLEngine(SSLEngine engine);
// Taken from Socket
void setKeepAlive(boolean on)
void setOOBInline(boolean on)
void setReceiveBufferSize(int size)
void setReuseAddress(boolean on)
void setSendBufferSize(int size)
void setSoLinger(boolean on, int linger)
void setSoTimeout(int timeout)
void setTcpNoDelay(boolean on)
void setTrafficClass(int tc)
}
Change Notification Preferences
View Online
|
View Change
|
Add Comment
|
- [CONF] Apache Qpid > Create interface in common confluence
- [CONF] Apache Qpid > Create interface in common confluence
- [CONF] Apache Qpid > Create interface in common confluence
- [CONF] Apache Qpid > Create interface in common confluence
- [CONF] Apache Qpid > Create interface in common confluence
- [CONF] Apache Qpid > Create interface in common confluence
- [CONF] Apache Qpid > Create interface in common confluence
- [CONF] Apache Qpid > Create interface in common confluence
- [CONF] Apache Qpid > Create interface in common confluence
- [CONF] Apache Qpid > Create interface in common confluence
- [CONF] Apache Qpid > Create interface in common confluence
- [CONF] Apache Qpid > Create interface in common confluence
- [CONF] Apache Qpid > Create interface in common confluence
- [CONF] Apache Qpid > Create interface in common confluence
- [CONF] Apache Qpid > Create interface in common confluence
- [CONF] Apache Qpid > Create interface in common confluence
- [CONF] Apache Qpid > Create interface in common confluence
- [CONF] Apache Qpid > Create interface in common confluence
- [CONF] Apache Qpid > Create interface in common confluence
- [CONF] Apache Qpid > Create interface in common confluence
