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 TypeMethodDescriptionvoid
addChannelListener
(ChannelListener listener) void
blockOk()
void
close()
void
void
create()
void
destroy()
void
void
boolean
boolean
int
int
boolean
long
long
boolean
long
long
boolean
boolean
int
getView()
boolean
boolean
isOpen()
peek
(long timeout) printProtocolSpec
(boolean include_properties) receive
(long timeout) void
void
void
returnState
(byte[] state) void
returnState
(byte[] state, String state_id) void
send
(Address dst, Address src, Serializable obj) void
void
void
setAutoGetState
(boolean flag) void
setAutoReconnect
(boolean flag) void
setChannelListener
(ChannelListener channel_listener) Deprecated.Use addChannelListener() insteadvoid
setClusterConfig
(Element config) To configure via XML filevoid
setClusterName
(String cluster_name) void
setGroupName
(String group_name) void
void
setObjectName
(String name) void
setProperties
(String props) void
setReceiveBlockEvents
(boolean flag) void
setReceiveLocalMessages
(boolean flag) void
setStatsEnabled
(boolean flag) protected final void
void
shutdown()
void
start()
void
stop()
toString
(boolean print_details)
-
Constructor Details
-
JChannel
public JChannel() -
JChannel
-
-
Method Details
-
setValues
protected final void setValues() -
getChannel
- Specified by:
getChannel
in interfaceJChannelMBean
-
getVersion
- Specified by:
getVersion
in interfaceJChannelMBean
-
getMBeanServerName
-
setMBeanServerName
-
getProperties
- Specified by:
getProperties
in interfaceJChannelMBean
-
setProperties
- Specified by:
setProperties
in interfaceJChannelMBean
-
getObjectName
- Specified by:
getObjectName
in interfaceJChannelMBean
-
setObjectName
- Specified by:
setObjectName
in interfaceJChannelMBean
-
getNumberOfTasksInTimer
public int getNumberOfTasksInTimer()- Specified by:
getNumberOfTasksInTimer
in interfaceJChannelMBean
-
dumpTimerQueue
- Specified by:
dumpTimerQueue
in interfaceJChannelMBean
-
setClusterConfig
Description copied from interface:JChannelMBean
To configure via XML file- Specified by:
setClusterConfig
in interfaceJChannelMBean
-
getGroupName
- Specified by:
getGroupName
in interfaceJChannelMBean
-
setGroupName
- Specified by:
setGroupName
in interfaceJChannelMBean
-
getClusterName
- Specified by:
getClusterName
in interfaceJChannelMBean
-
setClusterName
- Specified by:
setClusterName
in interfaceJChannelMBean
-
getReceiveBlockEvents
public boolean getReceiveBlockEvents()- Specified by:
getReceiveBlockEvents
in interfaceJChannelMBean
-
setReceiveBlockEvents
public void setReceiveBlockEvents(boolean flag) - Specified by:
setReceiveBlockEvents
in interfaceJChannelMBean
-
getReceiveLocalMessages
public boolean getReceiveLocalMessages()- Specified by:
getReceiveLocalMessages
in interfaceJChannelMBean
-
setReceiveLocalMessages
public void setReceiveLocalMessages(boolean flag) - Specified by:
setReceiveLocalMessages
in interfaceJChannelMBean
-
getAutoReconnect
public boolean getAutoReconnect()- Specified by:
getAutoReconnect
in interfaceJChannelMBean
-
setAutoReconnect
public void setAutoReconnect(boolean flag) - Specified by:
setAutoReconnect
in interfaceJChannelMBean
-
getAutoGetState
public boolean getAutoGetState()- Specified by:
getAutoGetState
in interfaceJChannelMBean
-
setAutoGetState
public void setAutoGetState(boolean flag) - Specified by:
setAutoGetState
in interfaceJChannelMBean
-
getStatsEnabled
public boolean getStatsEnabled()- Specified by:
getStatsEnabled
in interfaceJChannelMBean
-
setStatsEnabled
public void setStatsEnabled(boolean flag) - Specified by:
setStatsEnabled
in interfaceJChannelMBean
-
dumpStats
- Specified by:
dumpStats
in interfaceJChannelMBean
-
resetStats
public void resetStats()- Specified by:
resetStats
in interfaceJChannelMBean
-
getSentMessages
public long getSentMessages()- Specified by:
getSentMessages
in interfaceJChannelMBean
-
getSentBytes
public long getSentBytes()- Specified by:
getSentBytes
in interfaceJChannelMBean
-
getReceivedMessages
public long getReceivedMessages()- Specified by:
getReceivedMessages
in interfaceJChannelMBean
-
getReceivedBytes
public long getReceivedBytes()- Specified by:
getReceivedBytes
in interfaceJChannelMBean
-
getTimerThreads
public int getTimerThreads()- Specified by:
getTimerThreads
in interfaceJChannelMBean
-
create
- Specified by:
create
in interfaceJChannelMBean
- Throws:
Exception
-
start
- Specified by:
start
in interfaceJChannelMBean
- Throws:
Exception
-
stop
public void stop()- Specified by:
stop
in interfaceJChannelMBean
-
destroy
public void destroy()- Specified by:
destroy
in interfaceJChannelMBean
-
getView
- Specified by:
getView
in interfaceJChannelMBean
-
getViewAsString
- Specified by:
getViewAsString
in interfaceJChannelMBean
-
getLocalAddress
- Specified by:
getLocalAddress
in interfaceJChannelMBean
-
getLocalAddressAsString
- Specified by:
getLocalAddressAsString
in interfaceJChannelMBean
-
setChannelListener
Deprecated.Use addChannelListener() instead- Specified by:
setChannelListener
in interfaceJChannelMBean
-
addChannelListener
-
removeChannelListener
-
isOpen
public boolean isOpen()- Specified by:
isOpen
in interfaceJChannelMBean
-
isConnected
public boolean isConnected()- Specified by:
isConnected
in interfaceJChannelMBean
-
getNumMessages
public int getNumMessages()- Specified by:
getNumMessages
in interfaceJChannelMBean
-
dumpQueue
- Specified by:
dumpQueue
in interfaceJChannelMBean
-
printProtocolSpec
- Specified by:
printProtocolSpec
in interfaceJChannelMBean
-
toString
- Specified by:
toString
in interfaceJChannelMBean
-
connect
- Specified by:
connect
in interfaceJChannelMBean
- Throws:
ChannelException
-
disconnect
public void disconnect()- Specified by:
disconnect
in interfaceJChannelMBean
-
close
public void close()- Specified by:
close
in interfaceJChannelMBean
-
shutdown
public void shutdown()- Specified by:
shutdown
in interfaceJChannelMBean
-
send
- Specified by:
send
in interfaceJChannelMBean
- Throws:
ChannelNotConnectedException
ChannelClosedException
-
send
public void send(Address dst, Address src, Serializable obj) throws ChannelNotConnectedException, ChannelClosedException - Specified by:
send
in interfaceJChannelMBean
- Throws:
ChannelNotConnectedException
ChannelClosedException
-
sendToAll
- Specified by:
sendToAll
in interfaceJChannelMBean
- Throws:
ChannelNotConnectedException
ChannelClosedException
-
down
- Specified by:
down
in interfaceJChannelMBean
- Parameters:
evt
-
-
receive
public Object receive(long timeout) throws ChannelNotConnectedException, ChannelClosedException, TimeoutException - Specified by:
receive
in interfaceJChannelMBean
- Throws:
ChannelNotConnectedException
ChannelClosedException
TimeoutException
-
peek
public Object peek(long timeout) throws ChannelNotConnectedException, ChannelClosedException, TimeoutException - Specified by:
peek
in interfaceJChannelMBean
- Throws:
ChannelNotConnectedException
ChannelClosedException
TimeoutException
-
blockOk
public void blockOk()- Specified by:
blockOk
in interfaceJChannelMBean
-
getState
public boolean getState(Address target, long timeout) throws ChannelNotConnectedException, ChannelClosedException - Specified by:
getState
in interfaceJChannelMBean
- Throws:
ChannelNotConnectedException
ChannelClosedException
-
returnState
public void returnState(byte[] state) - Specified by:
returnState
in interfaceJChannelMBean
-
returnState
- Specified by:
returnState
in interfaceJChannelMBean
-