Port server to new interfacePage edited by Aidan SkinnerOverviewThis component element is comprised of the following sub-tasks:
These tasks are described in more detail below. Transport layer selection in o.a.q.server.MainCurrently the broker's Main method contains setup code specific to MINA. Main needs to be modified to remove the MINA specific option (NIO, MultiIO, executor pool etc) processing from there. This should be replaced with creation of a Network Driver instance with configuration being picked up & applied in the same way as other subsystems are configured ie. using ServerConfiguration.
Separation of AMQP processing from networking
Implementation of NetworkDriver
public class MINANetworkDriver implements Sender<java.nio.ByteBuffer>
{
/**
* Creates a concrete NetworkDriver which opens a connection to the specified address on the port
* and starts the given ProtocolEngine instance using MINA
*/
NetworkDriver (int port, InetAddress destination, ProtocolEngine enginer,
NetworkDriverConfiguration config);
/**
* Listens for incoming connections on the specified port and IPaddresses. Creates a new concrete
* NetworkDriver for each incoming connection and creates a ProtocolEngine with the given factory
*/
NetworkDriver (int port, InetAddress[] addresses, ProtocolEngineFactory factory,
NetworkDriverConfiguration config);
void SocketAddress getRemoteAddress()
void setMaxReadIdle(int idleTime)
void setMaxWriteIdle(int idleTime)
/**
* Adds the data to an Event through AsynchWritePoolingFilter for writing to MINA
*/
void send(java.nio.ByteBuffer data)
}
Implementation of ProtocolEngine
public class AMQProtocolEngine implements ProtocolEngine
{
/**
* Processes data. If no concrete AMQProtocolEngine_0_N delegate exists at the time, it uses AMQDecoder to
* decode the AMQ protocol initiation and creates the appropriate delegate. Otherwise it passes the data
* onto the delegate for processing.
*/
void recieved(java.nio.ByteBuffer data)
void setNetworkDriver (NetworkDriver driver)
void SocketAddress getRemoteAddress()
long getWrittenBytes()
long getReadBytes()
long close()
void writerIdle()
void readerIdle()
}
public class AMQProtocolEngine_0_N implements ProtocolEngine
{
/**
* Decodes the data using AMQBlockDecoder_0_N and adds the Event to the current Job for processing.
* When the Job is processed, the RecievedEvent calls frameRecieved which either closes the session if it's
* ChannelCloseOk or calls the frame bodys handle() method
*/
void recieved(java.nio.ByteBuffer data)
void setNetworkDriver (NetworkDriver driver)
void SocketAddress getRemoteAddress()
long getWrittenBytes()
long getReadBytes()
long close()
void writerIdle()
void readerIdle()
}
public class AMQProtocolEngineFactory implements ProtocolEngineFactory
{
// Returns a new instance of an AMQProtocolEngine
ProtocolEngine newProtocolEngine()
}
Change Notification Preferences
View Online
|
View Change
|
Add Comment
|
- [CONF] Apache Qpid > Port server to new interface confluence
- [CONF] Apache Qpid > Port server to new interface confluence
- [CONF] Apache Qpid > Port server to new interface confluence
- [CONF] Apache Qpid > Port server to new interface confluence
- [CONF] Apache Qpid > Port server to new interface confluence
- [CONF] Apache Qpid > Port server to new interface confluence
- [CONF] Apache Qpid > Port server to new interface confluence
- [CONF] Apache Qpid > Port server to new interface confluence
- [CONF] Apache Qpid > Port server to new interface confluence
- [CONF] Apache Qpid > Port server to new interface confluence
- [CONF] Apache Qpid > Port server to new interface confluence
- [CONF] Apache Qpid > Port server to new interface confluence
- [CONF] Apache Qpid > Port server to new interface confluence
- [CONF] Apache Qpid > Port server to new interface confluence
- [CONF] Apache Qpid > Port server to new interface confluence
- [CONF] Apache Qpid > Port server to new interface confluence
- [CONF] Apache Qpid > Port server to new interface confluence
- [CONF] Apache Qpid > Port server to new interface confluence
- [CONF] Apache Qpid > Port server to new interface confluence
- [CONF] Apache Qpid > Port server to new interface confluence
- [CONF] Apache Qpid > Port server to new interface confluence