Class Channel

  • All Implemented Interfaces:
    IBufferHandler, IBufferProvider, IChannel, ILocationAware, org.eclipse.net4j.util.collection.Closeable, org.eclipse.net4j.util.concurrent.IExecutorServiceProvider, org.eclipse.net4j.util.container.IManagedContainerProvider, org.eclipse.net4j.util.event.INotifier, org.eclipse.net4j.util.event.INotifier.INotifier2, org.eclipse.net4j.util.lifecycle.IDeactivateable, org.eclipse.net4j.util.lifecycle.ILifecycle, org.eclipse.net4j.util.lifecycle.ILifecycle.DeferrableActivation, org.eclipse.net4j.util.security.IUserAware, InternalChannel

    public class Channel
    extends org.eclipse.net4j.util.lifecycle.Lifecycle
    implements InternalChannel, org.eclipse.net4j.util.concurrent.IExecutorServiceProvider, org.eclipse.net4j.util.container.IManagedContainerProvider
    If the meaning of this type isn't clear, there really should be more of a description here...
    Since:
    2.0
    Author:
    Eike Stepper
    • Constructor Detail

      • Channel

        public Channel()
    • Method Detail

      • getContainer

        public org.eclipse.net4j.util.container.IManagedContainer getContainer()
        Specified by:
        getContainer in interface org.eclipse.net4j.util.container.IManagedContainerProvider
      • getUserID

        public java.lang.String getUserID()
        Specified by:
        getUserID in interface org.eclipse.net4j.util.security.IUserAware
      • getMultiplexer

        public IChannelMultiplexer getMultiplexer()
        Description copied from interface: IChannel
        Returns the multiplexer this channel is associated with. This channel multiplexer can be used, for example, to open additional channels that will be multiplexed through the same transport medium.
        Specified by:
        getMultiplexer in interface IChannel
      • getID

        public short getID()
        Description copied from interface: IChannel
        Returns the ID of this channel. The ID is unique at any time among all channels of the associated multiplexer.
        Specified by:
        getID in interface IChannel
      • getExecutorService

        public java.util.concurrent.ExecutorService getExecutorService()
        Specified by:
        getExecutorService in interface org.eclipse.net4j.util.concurrent.IExecutorServiceProvider
        Since:
        4.5
      • getReceiveExecutor

        @Deprecated
        public java.util.concurrent.ExecutorService getReceiveExecutor()
        Deprecated.
        Specified by:
        getReceiveExecutor in interface InternalChannel
      • setReceiveExecutor

        @Deprecated
        public void setReceiveExecutor​(java.util.concurrent.ExecutorService receiveExecutor)
        Deprecated.
        Specified by:
        setReceiveExecutor in interface InternalChannel
      • getReceiveHandler

        public IBufferHandler getReceiveHandler()
        Description copied from interface: IChannel
        Returns the IBufferHandler that handles buffers received from the peer channel.
        Specified by:
        getReceiveHandler in interface IChannel
      • setReceiveHandler

        public void setReceiveHandler​(IBufferHandler receiveHandler)
        Description copied from interface: IChannel
        Sets the IBufferHandler to handle buffers received from the peer channel.
        Specified by:
        setReceiveHandler in interface IChannel
      • sendBuffer

        public void sendBuffer​(IBuffer buffer)
        Description copied from interface: IChannel
        Asynchronously sends the given buffer to the receive handler of the peer channel.
        Specified by:
        sendBuffer in interface IChannel
      • createReceiverWork

        @Deprecated
        protected Channel.ReceiverWork createReceiverWork​(IBuffer buffer)
        Deprecated.
        As of 4.10 scheduled for future removal.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class org.eclipse.net4j.util.lifecycle.Lifecycle
      • doBeforeActivate

        protected void doBeforeActivate()
                                 throws java.lang.Exception
        Overrides:
        doBeforeActivate in class org.eclipse.net4j.util.lifecycle.Lifecycle
        Throws:
        java.lang.Exception
      • doActivate

        protected void doActivate()
                           throws java.lang.Exception
        Overrides:
        doActivate in class org.eclipse.net4j.util.lifecycle.Lifecycle
        Throws:
        java.lang.Exception
      • doDeactivate

        protected void doDeactivate()
                             throws java.lang.Exception
        Overrides:
        doDeactivate in class org.eclipse.net4j.util.lifecycle.Lifecycle
        Throws:
        java.lang.Exception
      • unregisterFromMultiplexer

        protected void unregisterFromMultiplexer()
      • close

        public void close()
        Specified by:
        close in interface org.eclipse.net4j.util.collection.Closeable
      • isClosed

        public boolean isClosed()
        Specified by:
        isClosed in interface org.eclipse.net4j.util.collection.Closeable