org.apache.activemq.artemis.api.core.jgroups

## 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 and Description
    `JChannelWrapper(JChannelManager manager, String channelName, org.jgroups.JChannel channel)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and 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()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### 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)

    - #### connect

          public void connect()
                       throws Exception

      Throws:
        `Exception`

    - #### addReceiver

          public void addReceiver(JGroupsReceiver jGroupsReceiver)

    - #### send

          public void send(org.jgroups.Message msg)
                    throws Exception

      Throws:
        `Exception`

    - #### addRef

          public JChannelWrapper addRef()

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2021 The Apache Software Foundation. All rights reserved.