Package org.jgroups.jmx
Class JChannel
java.lang.Object
org.jgroups.jmx.JChannel
- All Implemented Interfaces:
JChannelMBean
- Version:
- $Id: JChannel.java,v 1.17 2007/06/06 11:02:32 belaban Exp $
- Author:
- Bela Ban
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChannelListener(ChannelListener listener) voidblockOk()voidclose()voidvoidcreate()voiddestroy()voidvoidbooleanbooleanintintbooleanlonglongbooleanlonglongbooleanbooleanintgetView()booleanbooleanisOpen()peek(long timeout) printProtocolSpec(boolean include_properties) receive(long timeout) voidvoidvoidreturnState(byte[] state) voidreturnState(byte[] state, String state_id) voidsend(Address dst, Address src, Serializable obj) voidvoidvoidsetAutoGetState(boolean flag) voidsetAutoReconnect(boolean flag) voidsetChannelListener(ChannelListener channel_listener) Deprecated.Use addChannelListener() insteadvoidsetClusterConfig(Element config) To configure via XML filevoidsetClusterName(String cluster_name) voidsetGroupName(String group_name) voidvoidsetObjectName(String name) voidsetProperties(String props) voidsetReceiveBlockEvents(boolean flag) voidsetReceiveLocalMessages(boolean flag) voidsetStatsEnabled(boolean flag) protected final voidvoidshutdown()voidstart()voidstop()toString(boolean print_details)
-
Constructor Details
-
JChannel
public JChannel() -
JChannel
-
-
Method Details
-
setValues
protected final void setValues() -
getChannel
- Specified by:
getChannelin interfaceJChannelMBean
-
getVersion
- Specified by:
getVersionin interfaceJChannelMBean
-
getMBeanServerName
-
setMBeanServerName
-
getProperties
- Specified by:
getPropertiesin interfaceJChannelMBean
-
setProperties
- Specified by:
setPropertiesin interfaceJChannelMBean
-
getObjectName
- Specified by:
getObjectNamein interfaceJChannelMBean
-
setObjectName
- Specified by:
setObjectNamein interfaceJChannelMBean
-
getNumberOfTasksInTimer
public int getNumberOfTasksInTimer()- Specified by:
getNumberOfTasksInTimerin interfaceJChannelMBean
-
dumpTimerQueue
- Specified by:
dumpTimerQueuein interfaceJChannelMBean
-
setClusterConfig
Description copied from interface:JChannelMBeanTo configure via XML file- Specified by:
setClusterConfigin interfaceJChannelMBean
-
getGroupName
- Specified by:
getGroupNamein interfaceJChannelMBean
-
setGroupName
- Specified by:
setGroupNamein interfaceJChannelMBean
-
getClusterName
- Specified by:
getClusterNamein interfaceJChannelMBean
-
setClusterName
- Specified by:
setClusterNamein interfaceJChannelMBean
-
getReceiveBlockEvents
public boolean getReceiveBlockEvents()- Specified by:
getReceiveBlockEventsin interfaceJChannelMBean
-
setReceiveBlockEvents
public void setReceiveBlockEvents(boolean flag) - Specified by:
setReceiveBlockEventsin interfaceJChannelMBean
-
getReceiveLocalMessages
public boolean getReceiveLocalMessages()- Specified by:
getReceiveLocalMessagesin interfaceJChannelMBean
-
setReceiveLocalMessages
public void setReceiveLocalMessages(boolean flag) - Specified by:
setReceiveLocalMessagesin interfaceJChannelMBean
-
getAutoReconnect
public boolean getAutoReconnect()- Specified by:
getAutoReconnectin interfaceJChannelMBean
-
setAutoReconnect
public void setAutoReconnect(boolean flag) - Specified by:
setAutoReconnectin interfaceJChannelMBean
-
getAutoGetState
public boolean getAutoGetState()- Specified by:
getAutoGetStatein interfaceJChannelMBean
-
setAutoGetState
public void setAutoGetState(boolean flag) - Specified by:
setAutoGetStatein interfaceJChannelMBean
-
getStatsEnabled
public boolean getStatsEnabled()- Specified by:
getStatsEnabledin interfaceJChannelMBean
-
setStatsEnabled
public void setStatsEnabled(boolean flag) - Specified by:
setStatsEnabledin interfaceJChannelMBean
-
dumpStats
- Specified by:
dumpStatsin interfaceJChannelMBean
-
resetStats
public void resetStats()- Specified by:
resetStatsin interfaceJChannelMBean
-
getSentMessages
public long getSentMessages()- Specified by:
getSentMessagesin interfaceJChannelMBean
-
getSentBytes
public long getSentBytes()- Specified by:
getSentBytesin interfaceJChannelMBean
-
getReceivedMessages
public long getReceivedMessages()- Specified by:
getReceivedMessagesin interfaceJChannelMBean
-
getReceivedBytes
public long getReceivedBytes()- Specified by:
getReceivedBytesin interfaceJChannelMBean
-
getTimerThreads
public int getTimerThreads()- Specified by:
getTimerThreadsin interfaceJChannelMBean
-
create
- Specified by:
createin interfaceJChannelMBean- Throws:
Exception
-
start
- Specified by:
startin interfaceJChannelMBean- Throws:
Exception
-
stop
public void stop()- Specified by:
stopin interfaceJChannelMBean
-
destroy
public void destroy()- Specified by:
destroyin interfaceJChannelMBean
-
getView
- Specified by:
getViewin interfaceJChannelMBean
-
getViewAsString
- Specified by:
getViewAsStringin interfaceJChannelMBean
-
getLocalAddress
- Specified by:
getLocalAddressin interfaceJChannelMBean
-
getLocalAddressAsString
- Specified by:
getLocalAddressAsStringin interfaceJChannelMBean
-
setChannelListener
Deprecated.Use addChannelListener() instead- Specified by:
setChannelListenerin interfaceJChannelMBean
-
addChannelListener
-
removeChannelListener
-
isOpen
public boolean isOpen()- Specified by:
isOpenin interfaceJChannelMBean
-
isConnected
public boolean isConnected()- Specified by:
isConnectedin interfaceJChannelMBean
-
getNumMessages
public int getNumMessages()- Specified by:
getNumMessagesin interfaceJChannelMBean
-
dumpQueue
- Specified by:
dumpQueuein interfaceJChannelMBean
-
printProtocolSpec
- Specified by:
printProtocolSpecin interfaceJChannelMBean
-
toString
- Specified by:
toStringin interfaceJChannelMBean
-
connect
- Specified by:
connectin interfaceJChannelMBean- Throws:
ChannelException
-
disconnect
public void disconnect()- Specified by:
disconnectin interfaceJChannelMBean
-
close
public void close()- Specified by:
closein interfaceJChannelMBean
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceJChannelMBean
-
send
- Specified by:
sendin interfaceJChannelMBean- Throws:
ChannelNotConnectedExceptionChannelClosedException
-
send
public void send(Address dst, Address src, Serializable obj) throws ChannelNotConnectedException, ChannelClosedException - Specified by:
sendin interfaceJChannelMBean- Throws:
ChannelNotConnectedExceptionChannelClosedException
-
sendToAll
- Specified by:
sendToAllin interfaceJChannelMBean- Throws:
ChannelNotConnectedExceptionChannelClosedException
-
down
- Specified by:
downin interfaceJChannelMBean- Parameters:
evt-
-
receive
public Object receive(long timeout) throws ChannelNotConnectedException, ChannelClosedException, TimeoutException - Specified by:
receivein interfaceJChannelMBean- Throws:
ChannelNotConnectedExceptionChannelClosedExceptionTimeoutException
-
peek
public Object peek(long timeout) throws ChannelNotConnectedException, ChannelClosedException, TimeoutException - Specified by:
peekin interfaceJChannelMBean- Throws:
ChannelNotConnectedExceptionChannelClosedExceptionTimeoutException
-
blockOk
public void blockOk()- Specified by:
blockOkin interfaceJChannelMBean
-
getState
public boolean getState(Address target, long timeout) throws ChannelNotConnectedException, ChannelClosedException - Specified by:
getStatein interfaceJChannelMBean- Throws:
ChannelNotConnectedExceptionChannelClosedException
-
returnState
public void returnState(byte[] state) - Specified by:
returnStatein interfaceJChannelMBean
-
returnState
- Specified by:
returnStatein interfaceJChannelMBean
-