org.apache.activemq.artemis.api.core

## Class JGroupsBroadcastEndpoint.JChannelWrapper

- java.lang.Object
- - org.apache.activemq.artemis.api.core.JGroupsBroadcastEndpoint.JChannelWrapper

- Enclosing class:
    JGroupsBroadcastEndpoint

      protected static class JGroupsBroadcastEndpoint.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(String channelName, org.jgroups.JChannel channel)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addReceiver(org.apache.activemq.artemis.api.core.JGroupsBroadcastEndpoint.JGroupsReceiver jGroupsReceiver)`
    `JGroupsBroadcastEndpoint.JChannelWrapper` | `addRef()`
    `void` | `close()`
    `void` | `connect()`
    `void` | `removeReceiver(org.apache.activemq.artemis.api.core.JGroupsBroadcastEndpoint.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(String channelName,
                                 org.jgroups.JChannel channel)
                          throws Exception

      Throws:
        `Exception`

  - ### Method Detail

    - #### close

          public void close()

    - #### removeReceiver

          public void removeReceiver(org.apache.activemq.artemis.api.core.JGroupsBroadcastEndpoint.JGroupsReceiver receiver)

    - #### connect

          public void connect()
                       throws Exception

      Throws:
        `Exception`

    - #### addReceiver

          public void addReceiver(org.apache.activemq.artemis.api.core.JGroupsBroadcastEndpoint.JGroupsReceiver jGroupsReceiver)

    - #### send

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

      Throws:
        `Exception`

    - #### addRef

          public JGroupsBroadcastEndpoint.JChannelWrapper addRef()

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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