public class ProtonProtocolManager extends Object implements ProtocolManager, NotificationListener
Modifier and Type | Field and Description |
---|---|
static EnumSet<org.apache.qpid.proton.engine.EndpointState> |
ACTIVE |
static EnumSet<org.apache.qpid.proton.engine.EndpointState> |
ANY_ENDPOINT_STATE |
static EnumSet<org.apache.qpid.proton.engine.EndpointState> |
CLOSED |
static EnumSet<org.apache.qpid.proton.engine.EndpointState> |
INITIALIZED |
static EnumSet<org.apache.qpid.proton.engine.EndpointState> |
UNINITIALIZED |
Constructor and Description |
---|
ProtonProtocolManager(HornetQServer server) |
Modifier and Type | Method and Description |
---|---|
void |
addChannelHandlers(String protocol,
Map<String,org.jboss.netty.channel.ChannelHandler> handlers,
BufferDecoder decoder) |
ConnectionEntry |
createConnectionEntry(Acceptor acceptorUsed,
Connection connection) |
ServerMessageImpl |
createServerMessage() |
ProtonSession |
createSession(ProtonRemotingConnection protonConnection,
org.apache.qpid.proton.engine.impl.TransportImpl protonTransport) |
void |
handleBuffer(RemotingConnection connection,
HornetQBuffer buffer) |
void |
handleDelivery(org.apache.qpid.proton.engine.Sender sender,
byte[] tag,
org.apache.qpid.proton.jms.EncodedMessage encodedMessage,
ServerMessage message,
ProtonRemotingConnection connection,
boolean preSettle) |
void |
handleMessage(org.apache.qpid.proton.engine.Receiver receiver,
HornetQBuffer buffer,
org.apache.qpid.proton.engine.Delivery delivery,
ProtonRemotingConnection connection,
ProtonSession protonSession,
String address) |
void |
handleTransaction(org.apache.qpid.proton.engine.Receiver receiver,
HornetQBuffer buffer,
org.apache.qpid.proton.engine.Delivery delivery,
ProtonSession protonSession) |
int |
isReadyToHandle(HornetQBuffer buffer)
called by the remoting system prior to
BufferHandler.bufferReceived(Object, org.hornetq.api.core.HornetQBuffer) . |
boolean |
isSupportsWebsockets(String protocol) |
byte[] |
longToBytes(long x) |
void |
onNotification(Notification notification) |
void |
removeHandler(String name) |
public static final EnumSet<org.apache.qpid.proton.engine.EndpointState> UNINITIALIZED
public static final EnumSet<org.apache.qpid.proton.engine.EndpointState> INITIALIZED
public static final EnumSet<org.apache.qpid.proton.engine.EndpointState> ACTIVE
public static final EnumSet<org.apache.qpid.proton.engine.EndpointState> CLOSED
public static final EnumSet<org.apache.qpid.proton.engine.EndpointState> ANY_ENDPOINT_STATE
public ProtonProtocolManager(HornetQServer server)
public ConnectionEntry createConnectionEntry(Acceptor acceptorUsed, Connection connection)
createConnectionEntry
in interface ProtocolManager
public void removeHandler(String name)
removeHandler
in interface ProtocolManager
public int isReadyToHandle(HornetQBuffer buffer)
BufferDecoder
BufferHandler.bufferReceived(Object, org.hornetq.api.core.HornetQBuffer)
.
The implementation should return true if there is enough data in the buffer to decode. otherwise false.isReadyToHandle
in interface ProtocolManager
isReadyToHandle
in interface BufferDecoder
buffer
- the bufferpublic void handleBuffer(RemotingConnection connection, HornetQBuffer buffer)
handleBuffer
in interface ProtocolManager
public void addChannelHandlers(String protocol, Map<String,org.jboss.netty.channel.ChannelHandler> handlers, BufferDecoder decoder)
addChannelHandlers
in interface ProtocolManager
public boolean isSupportsWebsockets(String protocol)
isSupportsWebsockets
in interface ProtocolManager
public void onNotification(Notification notification)
onNotification
in interface NotificationListener
public ServerMessageImpl createServerMessage()
public void handleMessage(org.apache.qpid.proton.engine.Receiver receiver, HornetQBuffer buffer, org.apache.qpid.proton.engine.Delivery delivery, ProtonRemotingConnection connection, ProtonSession protonSession, String address) throws Exception
Exception
public void handleDelivery(org.apache.qpid.proton.engine.Sender sender, byte[] tag, org.apache.qpid.proton.jms.EncodedMessage encodedMessage, ServerMessage message, ProtonRemotingConnection connection, boolean preSettle)
public ProtonSession createSession(ProtonRemotingConnection protonConnection, org.apache.qpid.proton.engine.impl.TransportImpl protonTransport) throws HornetQAMQPException
HornetQAMQPException
public void handleTransaction(org.apache.qpid.proton.engine.Receiver receiver, HornetQBuffer buffer, org.apache.qpid.proton.engine.Delivery delivery, ProtonSession protonSession) throws HornetQAMQPIllegalStateException
HornetQAMQPIllegalStateException
public byte[] longToBytes(long x)
Copyright © 2013 JBoss, a division of Red Hat. All rights reserved.