org.jgroups.jmx

Class JChannel

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(String channel_name)
void
create()
void
destroy()
void
disconnect()
void
down(Event evt)
Deprecated.
String
dumpQueue()
Map
dumpStats()
String
dumpTimerQueue()
boolean
getAutoGetState()
boolean
getAutoReconnect()
JChannel
getChannel()
String
getClusterName()
String
getGroupName()
Address
getLocalAddress()
String
getLocalAddressAsString()
String
getMBeanServerName()
int
getNumMessages()
int
getNumberOfTasksInTimer()
String
getObjectName()
String
getProperties()
boolean
getReceiveBlockEvents()
boolean
getReceiveLocalMessages()
boolean
getReceiveStateEvents()
boolean
getReceiveSuspectEvents()
boolean
getReceiveViewEvents()
long
getReceivedBytes()
long
getReceivedMessages()
long
getSentBytes()
long
getSentMessages()
boolean
getState(Address target, long timeout)
boolean
getStatsEnabled()
String
getVersion()
View
getView()
String
getViewAsString()
boolean
isConnected()
boolean
isOpen()
boolean
isSuspended()
Object
peek(long timeout)
String
printProtocolSpec(boolean include_properties)
Object
receive(long timeout)
void
removeChannelListener(ChannelListener l)
void
resetStats()
void
resume()
void
returnState(byte[] state)
void
send(Address dst, Address src, Serializable obj)
void
send(Message msg)
void
sendToAll(String msg)
void
setAutoGetState(boolean flag)
void
setAutoReconnect(boolean flag)
void
setChannelListener(ChannelListener channel_listener)
Deprecated. Use addChannelListener() instead
void
setClusterConfig(Element config)
To configure via XML file
void
setClusterName(String cluster_name)
void
setGroupName(String group_name)
void
setMBeanServerName(String n)
void
setObjectName(String name)
void
setProperties(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()
String
toString(boolean print_details)

Constructor Details

JChannel

public JChannel()

JChannel

public JChannel(JChannel channel)

Method Details

addChannelListener

public void addChannelListener(ChannelListener listener)

blockOk

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

close

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

connect

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

create

public void create()
            throws Exception
Specified by:
create in interface JChannelMBean

destroy

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

disconnect

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

down

public void down(Event evt)

Deprecated.

Specified by:
down in interface JChannelMBean
Parameters:
evt -

dumpQueue

public String dumpQueue()
Specified by:
dumpQueue in interface JChannelMBean

dumpStats

public Map dumpStats()
Specified by:
dumpStats in interface JChannelMBean

dumpTimerQueue

public String dumpTimerQueue()
Specified by:
dumpTimerQueue in interface JChannelMBean

getAutoGetState

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

getAutoReconnect

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

getChannel

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

getClusterName

public String getClusterName()
Specified by:
getClusterName in interface JChannelMBean

getGroupName

public String getGroupName()
Specified by:
getGroupName in interface JChannelMBean

getLocalAddress

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

getLocalAddressAsString

public String getLocalAddressAsString()
Specified by:
getLocalAddressAsString in interface JChannelMBean

getMBeanServerName

public String getMBeanServerName()

getNumMessages

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

getNumberOfTasksInTimer

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

getObjectName

public String getObjectName()
Specified by:
getObjectName in interface JChannelMBean

getProperties

public String getProperties()
Specified by:
getProperties in interface JChannelMBean

getReceiveBlockEvents

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

getReceiveLocalMessages

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

getReceiveStateEvents

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

getReceiveSuspectEvents

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

getReceiveViewEvents

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

getReceivedBytes

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

getReceivedMessages

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

getSentBytes

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

getSentMessages

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

getState

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

getStatsEnabled

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

getVersion

public String getVersion()
Specified by:
getVersion in interface JChannelMBean

getView

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

getViewAsString

public String getViewAsString()
Specified by:
getViewAsString in interface JChannelMBean

isConnected

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

isOpen

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

isSuspended

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

peek

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

printProtocolSpec

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

receive

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

removeChannelListener

public void removeChannelListener(ChannelListener l)

resetStats

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

resume

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

returnState

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

send

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

send

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

sendToAll

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

setAutoGetState

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

setAutoReconnect

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

setChannelListener

public void setChannelListener(ChannelListener channel_listener)

Deprecated. Use addChannelListener() instead

Specified by:
setChannelListener in interface JChannelMBean

setClusterConfig

public void setClusterConfig(Element config)
To configure via XML file
Specified by:
setClusterConfig in interface JChannelMBean

setClusterName

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

setGroupName

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

setMBeanServerName

public void setMBeanServerName(String n)

setObjectName

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

setProperties

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

setReceiveBlockEvents

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

setReceiveLocalMessages

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

setReceiveStateEvents

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

setReceiveSuspectEvents

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

setReceiveViewEvents

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

setStatsEnabled

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

shutdown

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

start

public void start()
            throws Exception
Specified by:
start in interface JChannelMBean

stop

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

suspend

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

toString

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

Copyright B) 1998-2005 Bela Ban. All Rights Reserved.