Class JChannelWrapper


  • public class JChannelWrapper
    extends java.lang.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 Detail

      • JChannelWrapper

        public JChannelWrapper​(JChannelManager manager,
                               java.lang.String channelName,
                               org.jgroups.JChannel channel)
                        throws java.lang.Exception
        Throws:
        java.lang.Exception
    • Method Detail

      • getChannel

        public org.jgroups.JChannel getChannel()
      • getChannelName

        public java.lang.String getChannelName()
      • close

        public void close​(boolean closeWrappedChannel)
      • closeChannel

        public void closeChannel()
      • removeReceiver

        public void removeReceiver​(JGroupsReceiver receiver)
      • connect

        public void connect()
                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • addReceiver

        public void addReceiver​(JGroupsReceiver jGroupsReceiver)
      • send

        public void send​(org.jgroups.Message msg)
                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object