org.eclipse.net4j.channel

## Interface IChannelMultiplexer

- All Superinterfaces:
    IContainer<IChannel>, ILocationAware, INotifier
  All Known Subinterfaces:
    IConnector, IHTTPConnector, IJVMConnector, InternalChannelMultiplexer, InternalConnector, IServerConnector, ITCPConnector
  All Known Implementing Classes:
    ChannelMultiplexer, Connector

      public interface IChannelMultiplexer
      extends ILocationAware, IContainer<IChannel>

  Manages and multiplexes virtual data `channels` over a shared physical connection.
  Author:
    Eike Stepper
  No Implement
    This interface is not intended to be implemented by clients.
  No Extend
    This interface is not intended to be extended by clients.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.eclipse.net4j.ILocationAware

      `ILocationAware.Location`

    - ### Nested classes/interfaces inherited from interface org.eclipse.net4j.util.container.IContainer

      `IContainer.Modifiable<E>, IContainer.Persistable<E>, IContainer.Persistence<E>`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static long` | `DEFAULT_OPEN_CHANNEL_TIMEOUT` Indicates to use the timeout that is configured via debug property `open.channel.timeout` (see .options file) which has a default of 10 seconds.
    `static long` | `NO_CHANNEL_TIMEOUT`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Collection<IChannel>` | `getChannels()` Returns a collection of currently open channels.
    `long` | `getOpenChannelTimeout()`
    `IChannel` | `openChannel()` Synchronous request to open a new `IChannel` with an undefined channel protocol.
    `IChannel` | `openChannel(IProtocol<?> protocol)` Synchronous request to open a new `IChannel` with the given channel protocol .
    `IChannel` | `openChannel(java.lang.String protocolID, java.lang.Object infraStructure)` Synchronous request to open a new `IChannel` with a channel protocol defined by a given protocol identifier.
    `void` | `setOpenChannelTimeout(long openChannelTimeout)`

    - ### Methods inherited from interface org.eclipse.net4j.ILocationAware

      `getLocation, isClient, isServer`

    - ### Methods inherited from interface org.eclipse.net4j.util.container.IContainer

      `getElements, isEmpty`

    - ### Methods inherited from interface org.eclipse.net4j.util.event.INotifier

      `addListener, getListeners, hasListeners, removeListener`

- - ### Field Detail

    - #### NO_CHANNEL_TIMEOUT

          static final long NO_CHANNEL_TIMEOUT

      Since:
        2.0
      See Also:
        Constant Field Values

    - #### DEFAULT_OPEN_CHANNEL_TIMEOUT

          static final long DEFAULT_OPEN_CHANNEL_TIMEOUT

      Indicates to use the timeout that is configured via debug property `open.channel.timeout` (see .options file) which has a default of 10 seconds.
      Since:
        2.0
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### openChannel

          IChannel openChannel()
                        throws ChannelException

      Synchronous request to open a new `IChannel` with an undefined channel protocol. Since the peer connector can't lookup a protocol `factory` without a protocol identifier the `IBufferHandler` of the peer `IChannel` can only be provided by externally provided channel `lifecycle` `listeners`.

      Throws:
        `ChannelException`
      Since:
        2.0
      See Also:
        `openChannel(String, Object)`, `openChannel(IProtocol)`

    - #### openChannel

          IChannel openChannel(java.lang.String protocolID,
                               java.lang.Object infraStructure)
                        throws ChannelException

      Synchronous request to open a new `IChannel` with a channel protocol defined by a given protocol identifier. The peer connector will lookup a protocol `factory` with the protocol identifier, create a `IBufferHandler` and inject it into the peer `IChannel`.

      Throws:
        `ChannelException`
      Since:
        2.0
      See Also:
        `openChannel()`, `openChannel(IProtocol)`

    - #### openChannel

          IChannel openChannel(IProtocol<?> protocol)
                        throws ChannelException

      Synchronous request to open a new `IChannel` with the given channel protocol . The peer connector will lookup a protocol `factory` with the protocol identifier, create a `IBufferHandler` and inject it into the peer channel.

      Throws:
        `ChannelException`
      Since:
        2.0
      See Also:
        `openChannel()`, `openChannel(String, Object)`

    - #### getChannels

          java.util.Collection<IChannel> getChannels()

      Returns a collection of currently open channels.
      Since:
        2.0

    - #### getOpenChannelTimeout

          long getOpenChannelTimeout()

      Since:
        2.0

    - #### setOpenChannelTimeout

          void setOpenChannelTimeout(long openChannelTimeout)

      Since:
        2.0

Copyright (c) 2004-2019 Eike Stepper (Loehne, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html