org.jgroups.jmx
Class JChannel

java.lang.Object
  extended by org.jgroups.jmx.JChannel
All Implemented Interfaces:
JChannelMBean

public class JChannel
extends java.lang.Object
implements JChannelMBean

Version:
$Id: JChannel.java,v 1.10 2005/11/08 13:53:52 belaban Exp $
Author:
Bela Ban

Constructor Summary
JChannel()
           
JChannel(JChannel channel)
           
 
Method Summary
 void addChannelListener(ChannelListener listener)
           
 void blockOk()
           
 void close()
           
 void connect(java.lang.String channel_name)
           
 void create()
           
 void destroy()
           
 void disconnect()
           
 void down(Event evt)
           
 java.lang.String dumpQueue()
           
 java.util.Map dumpStats()
           
 java.lang.String dumpTimerQueue()
           
 boolean getAutoGetState()
           
 boolean getAutoReconnect()
           
 JChannel getChannel()
           
 java.lang.String getClusterName()
           
 java.lang.String getGroupName()
           
 Address getLocalAddress()
           
 java.lang.String getLocalAddressAsString()
           
 java.lang.String getMBeanServerName()
           
 int getNumberOfTasksInTimer()
           
 int getNumMessages()
           
 java.lang.String getObjectName()
           
 java.lang.String getProperties()
           
 boolean getReceiveBlockEvents()
           
 long getReceivedBytes()
           
 long getReceivedMessages()
           
 boolean getReceiveLocalMessages()
           
 boolean getReceiveStateEvents()
           
 boolean getReceiveSuspectEvents()
           
 boolean getReceiveViewEvents()
           
 long getSentBytes()
           
 long getSentMessages()
           
 boolean getState(Address target, long timeout)
           
 boolean getStatsEnabled()
           
 java.lang.String getVersion()
           
 View getView()
           
 java.lang.String getViewAsString()
           
 boolean isConnected()
           
 boolean isOpen()
           
 boolean isSuspended()
           
 java.lang.Object peek(long timeout)
           
 java.lang.String printProtocolSpec(boolean include_properties)
           
 java.lang.Object receive(long timeout)
           
 void removeChannelListener(ChannelListener l)
           
 void resetStats()
           
 void resume()
           
 void returnState(byte[] state)
           
 void send(Address dst, Address src, java.io.Serializable obj)
           
 void send(Message msg)
           
 void sendToAll(java.lang.String msg)
           
 void setAutoGetState(boolean flag)
           
 void setAutoReconnect(boolean flag)
           
 void setChannelListener(ChannelListener channel_listener)
          Deprecated. Use addChannelListener() instead
 void setClusterConfig(org.w3c.dom.Element config)
          To configure via XML file
 void setClusterName(java.lang.String cluster_name)
           
 void setGroupName(java.lang.String group_name)
           
 void setMBeanServerName(java.lang.String n)
           
 void setObjectName(java.lang.String name)
           
 void setProperties(java.lang.String props)
           
 void setReceiveBlockEvents(boolean flag)
           
 void setReceiveLocalMessages(boolean flag)
           
 void setReceiveStateEvents(boolean flag)
           
 void setReceiveSuspectEvents(boolean flag)
           
 void setReceiveViewEvents(boolean flag)
           
 void setStatsEnabled(boolean flag)
           
 void shutdown()
           
 void start()
           
 void stop()
           
 void suspend()
           
 java.lang.String toString(boolean print_details)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JChannel

public JChannel()

JChannel

public JChannel(JChannel channel)
Method Detail

getChannel

public JChannel getChannel()
Specified by:
getChannel in interface JChannelMBean

getVersion

public java.lang.String getVersion()
Specified by:
getVersion in interface JChannelMBean

getMBeanServerName

public java.lang.String getMBeanServerName()

setMBeanServerName

public void setMBeanServerName(java.lang.String n)

getProperties

public java.lang.String getProperties()
Specified by:
getProperties in interface JChannelMBean

setProperties

public void setProperties(java.lang.String props)
Specified by:
setProperties in interface JChannelMBean

getObjectName

public java.lang.String getObjectName()
Specified by:
getObjectName in interface JChannelMBean

setObjectName

public void setObjectName(java.lang.String name)
Specified by:
setObjectName in interface JChannelMBean

getNumberOfTasksInTimer

public int getNumberOfTasksInTimer()
Specified by:
getNumberOfTasksInTimer in interface JChannelMBean

dumpTimerQueue

public java.lang.String dumpTimerQueue()
Specified by:
dumpTimerQueue in interface JChannelMBean

setClusterConfig

public void setClusterConfig(org.w3c.dom.Element config)
Description copied from interface: JChannelMBean
To configure via XML file

Specified by:
setClusterConfig in interface JChannelMBean

getGroupName

public java.lang.String getGroupName()
Specified by:
getGroupName in interface JChannelMBean

setGroupName

public void setGroupName(java.lang.String group_name)
Specified by:
setGroupName in interface JChannelMBean

getClusterName

public java.lang.String getClusterName()
Specified by:
getClusterName in interface JChannelMBean

setClusterName

public void setClusterName(java.lang.String cluster_name)
Specified by:
setClusterName in interface JChannelMBean

getReceiveViewEvents

public boolean getReceiveViewEvents()
Specified by:
getReceiveViewEvents in interface JChannelMBean

setReceiveViewEvents

public void setReceiveViewEvents(boolean flag)
Specified by:
setReceiveViewEvents in interface JChannelMBean

getReceiveSuspectEvents

public boolean getReceiveSuspectEvents()
Specified by:
getReceiveSuspectEvents in interface JChannelMBean

setReceiveSuspectEvents

public void setReceiveSuspectEvents(boolean flag)
Specified by:
setReceiveSuspectEvents in interface JChannelMBean

getReceiveBlockEvents

public boolean getReceiveBlockEvents()
Specified by:
getReceiveBlockEvents in interface JChannelMBean

setReceiveBlockEvents

public void setReceiveBlockEvents(boolean flag)
Specified by:
setReceiveBlockEvents in interface JChannelMBean

getReceiveStateEvents

public boolean getReceiveStateEvents()
Specified by:
getReceiveStateEvents in interface JChannelMBean

setReceiveStateEvents

public void setReceiveStateEvents(boolean flag)
Specified by:
setReceiveStateEvents in interface JChannelMBean

getReceiveLocalMessages

public boolean getReceiveLocalMessages()
Specified by:
getReceiveLocalMessages in interface JChannelMBean

setReceiveLocalMessages

public void setReceiveLocalMessages(boolean flag)
Specified by:
setReceiveLocalMessages in interface JChannelMBean

getAutoReconnect

public boolean getAutoReconnect()
Specified by:
getAutoReconnect in interface JChannelMBean

setAutoReconnect

public void setAutoReconnect(boolean flag)
Specified by:
setAutoReconnect in interface JChannelMBean

getAutoGetState

public boolean getAutoGetState()
Specified by:
getAutoGetState in interface JChannelMBean

setAutoGetState

public void setAutoGetState(boolean flag)
Specified by:
setAutoGetState in interface JChannelMBean

getStatsEnabled

public boolean getStatsEnabled()
Specified by:
getStatsEnabled in interface JChannelMBean

setStatsEnabled

public void setStatsEnabled(boolean flag)
Specified by:
setStatsEnabled in interface JChannelMBean

dumpStats

public java.util.Map dumpStats()
Specified by:
dumpStats in interface JChannelMBean

resetStats

public void resetStats()
Specified by:
resetStats in interface JChannelMBean

getSentMessages

public long getSentMessages()
Specified by:
getSentMessages in interface JChannelMBean

getSentBytes

public long getSentBytes()
Specified by:
getSentBytes in interface JChannelMBean

getReceivedMessages

public long getReceivedMessages()
Specified by:
getReceivedMessages in interface JChannelMBean

getReceivedBytes

public long getReceivedBytes()
Specified by:
getReceivedBytes in interface JChannelMBean

suspend

public void suspend()
Specified by:
suspend in interface JChannelMBean

resume

public void resume()
Specified by:
resume in interface JChannelMBean

isSuspended

public boolean isSuspended()
Specified by:
isSuspended in interface JChannelMBean

create

public void create()
            throws java.lang.Exception
Specified by:
create in interface JChannelMBean
Throws:
java.lang.Exception

start

public void start()
           throws java.lang.Exception
Specified by:
start in interface JChannelMBean
Throws:
java.lang.Exception

stop

public void stop()
Specified by:
stop in interface JChannelMBean

destroy

public void destroy()
Specified by:
destroy in interface JChannelMBean

getView

public View getView()
Specified by:
getView in interface JChannelMBean

getViewAsString

public java.lang.String getViewAsString()
Specified by:
getViewAsString in interface JChannelMBean

getLocalAddress

public Address getLocalAddress()
Specified by:
getLocalAddress in interface JChannelMBean

getLocalAddressAsString

public java.lang.String getLocalAddressAsString()
Specified by:
getLocalAddressAsString in interface JChannelMBean

setChannelListener

public void setChannelListener(ChannelListener channel_listener)
Deprecated. Use addChannelListener() instead

Specified by:
setChannelListener in interface JChannelMBean

addChannelListener

public void addChannelListener(ChannelListener listener)

removeChannelListener

public void removeChannelListener(ChannelListener l)

isOpen

public boolean isOpen()
Specified by:
isOpen in interface JChannelMBean

isConnected

public boolean isConnected()
Specified by:
isConnected in interface JChannelMBean

getNumMessages

public int getNumMessages()
Specified by:
getNumMessages in interface JChannelMBean

dumpQueue

public java.lang.String dumpQueue()
Specified by:
dumpQueue in interface JChannelMBean

printProtocolSpec

public java.lang.String printProtocolSpec(boolean include_properties)
Specified by:
printProtocolSpec in interface JChannelMBean

toString

public java.lang.String toString(boolean print_details)
Specified by:
toString in interface JChannelMBean

connect

public void connect(java.lang.String channel_name)
             throws ChannelException,
                    ChannelClosedException
Specified by:
connect in interface JChannelMBean
Throws:
ChannelException
ChannelClosedException

disconnect

public void disconnect()
Specified by:
disconnect in interface JChannelMBean

close

public void close()
Specified by:
close in interface JChannelMBean

shutdown

public void shutdown()
Specified by:
shutdown in interface JChannelMBean

send

public void send(Message msg)
          throws ChannelNotConnectedException,
                 ChannelClosedException
Specified by:
send in interface JChannelMBean
Throws:
ChannelNotConnectedException
ChannelClosedException

send

public void send(Address dst,
                 Address src,
                 java.io.Serializable obj)
          throws ChannelNotConnectedException,
                 ChannelClosedException
Specified by:
send in interface JChannelMBean
Throws:
ChannelNotConnectedException
ChannelClosedException

sendToAll

public void sendToAll(java.lang.String msg)
               throws ChannelNotConnectedException,
                      ChannelClosedException
Specified by:
sendToAll in interface JChannelMBean
Throws:
ChannelNotConnectedException
ChannelClosedException

down

public void down(Event evt)
Specified by:
down in interface JChannelMBean

receive

public java.lang.Object receive(long timeout)
                         throws ChannelNotConnectedException,
                                ChannelClosedException,
                                TimeoutException
Specified by:
receive in interface JChannelMBean
Throws:
ChannelNotConnectedException
ChannelClosedException
TimeoutException

peek

public java.lang.Object peek(long timeout)
                      throws ChannelNotConnectedException,
                             ChannelClosedException,
                             TimeoutException
Specified by:
peek in interface JChannelMBean
Throws:
ChannelNotConnectedException
ChannelClosedException
TimeoutException

blockOk

public void blockOk()
Specified by:
blockOk in interface JChannelMBean

getState

public boolean getState(Address target,
                        long timeout)
                 throws ChannelNotConnectedException,
                        ChannelClosedException
Specified by:
getState in interface JChannelMBean
Throws:
ChannelNotConnectedException
ChannelClosedException

returnState

public void returnState(byte[] state)
Specified by:
returnState in interface JChannelMBean


Copyright ? 1998-2005 Bela Ban. All Rights Reserved.