Class JChannelWrapper
- java.lang.Object
-
- org.apache.activemq.artemis.api.core.jgroups.JChannelWrapper
-
public class JChannelWrapper extends Object
This class wraps a JChannel with a reference counter. The reference counter controls the life of the JChannel. When reference count is zero, the channel will be disconnected.
-
-
Constructor Summary
Constructors Constructor Description JChannelWrapper(JChannelManager manager, String channelName, org.jgroups.JChannel channel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addReceiver(JGroupsReceiver jGroupsReceiver)
JChannelWrapper
addRef()
void
close(boolean closeWrappedChannel)
void
closeChannel()
void
connect()
org.jgroups.JChannel
getChannel()
String
getChannelName()
void
removeReceiver(JGroupsReceiver receiver)
void
send(org.jgroups.Message msg)
String
toString()
-
-
-
Constructor Detail
-
JChannelWrapper
public JChannelWrapper(JChannelManager manager, String channelName, org.jgroups.JChannel channel) throws Exception
- Throws:
Exception
-
-
Method Detail
-
getChannel
public org.jgroups.JChannel getChannel()
-
getChannelName
public String getChannelName()
-
close
public void close(boolean closeWrappedChannel)
-
closeChannel
public void closeChannel()
-
removeReceiver
public void removeReceiver(JGroupsReceiver receiver)
-
addReceiver
public void addReceiver(JGroupsReceiver jGroupsReceiver)
-
addRef
public JChannelWrapper addRef()
-
-