com.tibco.be.custom.channel.framework

## Interface Channel

- All Known Implementing Classes:
    BaseChannel

      public interface Channel

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Closes the channel and frees up all its resources.
    `void` | `connect()` Connects the `Channel` to the underlying transport so that it can send outbound messages.
    `Channel.State` | `getState()` Get current `Channel.State` of this channel.
    `void` | `init()` Initializes the `Channel` by allocating necessary resources, creating pools, etc.
    `void` | `start()` Starts the channel, so that it can receive data through its underlying transport.
    `void` | `stop()`

- - ### Method Detail

    - #### init

          void init()

      Initializes the `Channel` by allocating necessary resources, creating pools, etc.

      Only valid on an uninitialized or closed channel. After this call, you will be able to `connect` or `close` the `Channel`.

      Throws:
        `java.lang.Exception` - Exception when initialization failed
      Since:
        5.4
      See Also:
        `Channel.connect()`, `Channel.close()`

    - #### connect

          void connect()

      Connects the `Channel` to the underlying transport so that it can send outbound messages. This in turn could mean connecting to the server etc. Once successfully connected, the connections could be added to the pool.

      Only valid on an initialized channel. After this call, you will be able to `start` or `close` the `Channel`.

      Do not start receiving data data here.

      The implementor must connect all the destinations of this `Channel` .

      Throws:
        `java.lang.Exception` - encountered exception
      Since:
        5.4
      See Also:
        `Destination.connect()`, `Channel.init()`, `Channel.close()`

    - #### start

          void start()

      Starts the channel, so that it can receive data through its underlying transport.

      Only valid on a connected channel. After this call, you will be able to `stop` and `close` the `Channel`.

      The implementor must start all the bound destinations of this `Channel` .

      Throws:
        `java.lang.Exception` - encountered exception
      Since:
        5.4
      See Also:
        `Destination.start()`, `Channel.connect()`, `Channel.close()`

    - #### stop

          void stop()

    - #### close

          void close()

      Closes the channel and frees up all its resources.

      Only valid on a started channel. After this call, you will be able to `init` the `Channel`.

      The implementor must close all the destinations of this `Channel` .

      Throws:
        `java.lang.Exception` - encountered exception
      Since:
        5.4
      See Also:
        `Channel.init()`

    - #### getState

          Channel.State getState()

      Get current `Channel.State` of this channel.
      Since:
        5.6