@StampyLibrary(libraryName="stampy-NETTY-client-server-RI") public abstract class AbstractStampyNettyMessageGateway extends AbstractStampyMessageGateway
| Modifier and Type | Field and Description |
|---|---|
static java.nio.charset.Charset |
CHARSET
The default encoding for STOMP is UTF-8.
|
interceptors, textInterceptors| Constructor and Description |
|---|
AbstractStampyNettyMessageGateway() |
| Modifier and Type | Method and Description |
|---|---|
void |
addHandler(org.jboss.netty.channel.ChannelHandler handler)
Adds the Channel Handler for inclusion in the created Channel.
|
void |
broadcastMessage(java.lang.String stompMessage)
Broadcasts the specified String to all connections.
|
java.util.Set<HostPort> |
getConnectedHostPorts()
Gets the connected host ports.
|
StampyNettyChannelHandler |
getHandler()
Gets the stampy channel handler.
|
protected void |
initializeChannel(org.jboss.netty.bootstrap.Bootstrap bootstrap) |
boolean |
isConnected(HostPort hostPort)
Returns true if a connection exists and is active.
|
void |
removeHandler(org.jboss.netty.channel.ChannelHandler handler)
Removes the handler.
|
void |
sendMessage(java.lang.String stompMessage,
HostPort hostPort)
Sends the specified String to the specified
HostPort. |
void |
setHandler(StampyNettyChannelHandler channelHandler)
Sets the stampy channel handler.
|
protected void |
setupChannelPipeline(org.jboss.netty.channel.ChannelPipeline pipeline,
int maxLength)
Setup channel pipeline.
|
addMessageListener, addMessageListener, addOutgoingMessageInterceptor, addOutgoingTextInterceptor, broadcastMessage, clearMessageListeners, closeConnection, connect, getHeartbeat, getMaxMessageSize, getPort, getUnparseableMessageHandler, interceptOutgoingMessage, interceptOutgoingMessage, interceptOutgoingMessage, isAutoShutdown, isForType, notifyMessageListeners, removeMessageListener, removeOutgoingMessageInterceptor, removeOutgoingTextInterceptor, sendMessage, setAutoShutdown, setHeartbeat, setListeners, setMaxMessageSize, setOutgoingMessageInterceptors, setOutgoingTextInterceptors, setPort, setUnparseableMessageHandler, shutdownpublic static java.nio.charset.Charset CHARSET
protected void initializeChannel(org.jboss.netty.bootstrap.Bootstrap bootstrap)
public void broadcastMessage(java.lang.String stompMessage)
throws InterceptException
AbstractStampyMessageGatewaybroadcastMessage in class AbstractStampyMessageGatewaystompMessage - the stomp messageInterceptException - the intercept exceptionpublic void sendMessage(java.lang.String stompMessage,
HostPort hostPort)
throws InterceptException
AbstractStampyMessageGatewayHostPort. Included for
STOMP implementations which accept custom message types. Use for all
non-STOMP messages.sendMessage in class AbstractStampyMessageGatewaystompMessage - the stomp messagehostPort - the host portInterceptException - the intercept exceptionpublic boolean isConnected(HostPort hostPort)
AbstractStampyMessageGatewayisConnected in class AbstractStampyMessageGatewayhostPort - the host portpublic java.util.Set<HostPort> getConnectedHostPorts()
AbstractStampyMessageGatewaygetConnectedHostPorts in class AbstractStampyMessageGatewaypublic StampyNettyChannelHandler getHandler()
public void setHandler(StampyNettyChannelHandler channelHandler)
channelHandler - the new stampy channel handlerpublic void addHandler(org.jboss.netty.channel.ChannelHandler handler)
FrameDecoders here.handler - the handlerpublic void removeHandler(org.jboss.netty.channel.ChannelHandler handler)
handler - the handlerprotected void setupChannelPipeline(org.jboss.netty.channel.ChannelPipeline pipeline,
int maxLength)
pipeline - the pipelinemaxLength - the max length