|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.catalina.cluster.tcp.ReplicationListener
FIXME i18n log messages FIXME jmx support
Field Summary | |
protected StringManager |
sm
The string manager for this package. |
Constructor Summary | |
ReplicationListener()
|
Method Summary | |
CatalinaCluster |
getCatalinaCluster()
get Callback |
java.lang.String |
getHost()
get the listing ip interface |
java.lang.Object |
getInterestOpsMutex()
|
int |
getPort()
get the listing ip port |
java.lang.String |
getTcpListenAddress()
|
int |
getTcpListenPort()
|
long |
getTcpSelectorTimeout()
|
int |
getTcpThreadCount()
|
boolean |
isCompress()
|
boolean |
isSendAck()
Send Ack to sender or not |
void |
listen()
get data from channel and store in byte array send it to cluster |
protected void |
readDataFromSocket(java.nio.channels.SelectionKey key)
Sample data handler method for a channel with data ready to read. |
protected void |
registerChannel(java.nio.channels.Selector selector,
java.nio.channels.SelectableChannel channel,
int ops,
java.lang.Object attach)
Register the given channel with the given selector for the given operations of interest |
void |
run()
|
void |
setCatalinaCluster(CatalinaCluster cluster)
set callback |
void |
setCompress(boolean compressMessageData)
|
void |
setSendAck(boolean sendAck)
set ack mode |
void |
setTcpListenAddress(java.lang.String tcpListenAddress)
|
void |
setTcpListenPort(int tcpListenPort)
|
void |
setTcpSelectorTimeout(long tcpSelectorTimeout)
|
void |
setTcpThreadCount(int tcpThreadCount)
|
void |
start()
start cluster receiver |
void |
stop()
Stop message listing |
void |
stopListening()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected StringManager sm
Constructor Detail |
public ReplicationListener()
Method Detail |
public boolean isCompress()
public void setCompress(boolean compressMessageData)
public void start()
start
in interface ClusterReceiver
ClusterReceiver.start()
public void stop()
ClusterReceiver
stop
in interface ClusterReceiver
public void run()
run
in interface java.lang.Runnable
public void listen() throws java.lang.Exception
java.lang.Exception
public void stopListening()
public void setCatalinaCluster(CatalinaCluster cluster)
ClusterReceiver
setCatalinaCluster
in interface ClusterReceiver
cluster
- SimpleTcpCluster.messageDataReceived(byte[])
public CatalinaCluster getCatalinaCluster()
ClusterReceiver
getCatalinaCluster
in interface ClusterReceiver
protected void registerChannel(java.nio.channels.Selector selector, java.nio.channels.SelectableChannel channel, int ops, java.lang.Object attach) throws java.lang.Exception
java.lang.Exception
protected void readDataFromSocket(java.nio.channels.SelectionKey key) throws java.lang.Exception
key
- A SelectionKey object associated with a channel
determined by the selector to be ready for reading. If the
channel returns an EOF condition, it is closed here, which
automatically invalidates the associated key. The selector
will then de-register the channel on the next select call.
java.lang.Exception
public java.lang.String getTcpListenAddress()
public void setTcpListenAddress(java.lang.String tcpListenAddress)
public int getTcpListenPort()
public void setTcpListenPort(int tcpListenPort)
public long getTcpSelectorTimeout()
public void setTcpSelectorTimeout(long tcpSelectorTimeout)
public int getTcpThreadCount()
public void setTcpThreadCount(int tcpThreadCount)
public boolean isSendAck()
ClusterReceiver
isSendAck
in interface ClusterReceiver
public void setSendAck(boolean sendAck)
ClusterReceiver
setSendAck
in interface ClusterReceiver
sendAck
- public java.lang.String getHost()
ClusterReceiver
getHost
in interface ClusterReceiver
public int getPort()
ClusterReceiver
getPort
in interface ClusterReceiver
public java.lang.Object getInterestOpsMutex()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |