Package org.eclipse.spi.net4j
Class ChannelMultiplexer
java.lang.Object
org.eclipse.net4j.util.event.Notifier
org.eclipse.net4j.util.lifecycle.Lifecycle
org.eclipse.net4j.util.lifecycle.ShareableLifecycle
org.eclipse.net4j.util.container.Container<IChannel>
org.eclipse.spi.net4j.ChannelMultiplexer
- All Implemented Interfaces:
IBufferProvider,IChannelMultiplexer,ILocationAware,ITransportConfigAware,org.eclipse.net4j.util.concurrent.IExecutorServiceProvider,org.eclipse.net4j.util.container.IContainer<IChannel>,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.properties.IPropertiesContainer,InternalChannelMultiplexer,InverseCloseable
- Direct Known Subclasses:
Connector
public abstract class ChannelMultiplexer
extends org.eclipse.net4j.util.container.Container<IChannel>
implements InternalChannelMultiplexer, org.eclipse.net4j.util.concurrent.IExecutorServiceProvider, InverseCloseable
If the meaning of this type isn't clear, there really should be more of a description here...
- Since:
- 2.0
- Author:
- Eike Stepper
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.net4j.buffer.IBufferProvider
IBufferProvider.Introspection, IBufferProvider.NotificationNested classes/interfaces inherited from interface org.eclipse.net4j.util.container.IContainer
org.eclipse.net4j.util.container.IContainer.Modifiable<E extends Object>, org.eclipse.net4j.util.container.IContainer.Persistable<E extends Object>, org.eclipse.net4j.util.container.IContainer.Persistence<E extends Object>Nested classes/interfaces inherited from interface org.eclipse.net4j.util.lifecycle.ILifecycle
org.eclipse.net4j.util.lifecycle.ILifecycle.DeferrableActivationNested classes/interfaces inherited from interface org.eclipse.net4j.ILocationAware
ILocationAware.LocationNested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifier
org.eclipse.net4j.util.event.INotifier.INotifier2Nested classes/interfaces inherited from interface org.eclipse.spi.net4j.InternalChannelMultiplexer
InternalChannelMultiplexer.BufferMultiplexer -
Field Summary
Fields inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle
USE_LABELFields inherited from interface org.eclipse.net4j.channel.IChannelMultiplexer
DEFAULT_OPEN_CHANNEL_TIMEOUT, NO_CHANNEL_TIMEOUTFields inherited from interface org.eclipse.spi.net4j.InternalChannelMultiplexer
CONTEXT_MULTIPLEXER, RESERVED_CHANNEL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcloseChannel(InternalChannel channel) protected InternalChannelprotected abstract org.eclipse.net4j.util.security.INegotiationContextprotected <INFRA_STRUCTURE>
IProtocol<INFRA_STRUCTURE>createProtocol(String type, INFRA_STRUCTURE infraStructure) protected org.eclipse.net4j.util.factory.IFactoryKeyprotected abstract voidderegisterChannelFromPeer(InternalChannel channel) protected voiddoBeforeOpenChannel(IProtocol<?> protocol) protected voidfinal InternalChannelgetChannel(short channelID) final Collection<IChannel>Returns a collection of currently open channels.Returns the current transport configuration if there is one, a new empty one otherwise.IChannel[]longprotected voidinitChannel(InternalChannel channel, IProtocol<?> protocol) voidvoidinverseCloseChannel(short channelID) inverseOpenChannel(short channelID, String protocolID) Deprecated.inverseOpenChannel(short channelID, String protocolID, int protocolVersion) booleanisEmpty()booleanSynchronous request to open a newIChannelwith an undefined channel protocol.openChannel(String protocolID, Object infraStructure) Synchronous request to open a newIChannelwith a channel protocol defined by a given protocol identifier.openChannel(IProtocol<?> protocol) Synchronous request to open a newIChannelwith the given channel protocol .protected abstract voidregisterChannelWithPeer(short channelID, long timeout, IProtocol<?> protocol) voidsetConfig(ITransportConfig config) Sets a new transport configuration by copying the given one.voidsetOpenChannelTimeout(long openChannelTimeout) Methods inherited from class org.eclipse.net4j.util.container.Container
fireContainerEvent, fireContainerEvent, fireContainerEvent, fireElementAddedEvent, fireElementRemovedEvent, fireElementsAddedEvent, fireElementsRemovedEvent, fireEvent, newContainerEvent, newContainerEventMethods inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle
activate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doActivate, doAfterActivate, doBeforeActivate, doBeforeDeactivate, dump, getLifecycleState, isActive, isDeferredActivation, toStringMethods inherited from class org.eclipse.net4j.util.event.Notifier
addListener, addUniqueListener, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListener, hasListeners, lastListenerRemoved, listenerAdded, listenerRemoved, removeListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.net4j.buffer.IBufferProvider
getBufferCapacity, provideBuffer, retainBufferMethods inherited from interface org.eclipse.net4j.ILocationAware
getLocation, isClient, isServerMethods inherited from interface org.eclipse.net4j.util.event.INotifier
addListener, getListeners, hasListeners, removeListenerMethods inherited from interface org.eclipse.spi.net4j.InternalChannelMultiplexer
multiplexChannel
-
Constructor Details
-
ChannelMultiplexer
public ChannelMultiplexer()
-
-
Method Details
-
properties
- Specified by:
propertiesin interfaceorg.eclipse.net4j.util.properties.IPropertiesContainer- Since:
- 4.12
-
needsBufferProvider
public boolean needsBufferProvider()- Specified by:
needsBufferProviderin interfaceInternalChannelMultiplexer
-
getConfig
Description copied from interface:ITransportConfigAwareReturns the current transport configuration if there is one, a new empty one otherwise.- Specified by:
getConfigin interfaceITransportConfigAware
-
setConfig
Description copied from interface:ITransportConfigAwareSets a new transport configuration by copying the given one.- Specified by:
setConfigin interfaceITransportConfigAware
-
getExecutorService
- Specified by:
getExecutorServicein interfaceorg.eclipse.net4j.util.concurrent.IExecutorServiceProvider
-
getOpenChannelTimeout
public long getOpenChannelTimeout()- Specified by:
getOpenChannelTimeoutin interfaceIChannelMultiplexer
-
setOpenChannelTimeout
public void setOpenChannelTimeout(long openChannelTimeout) - Specified by:
setOpenChannelTimeoutin interfaceIChannelMultiplexer
-
getChannel
-
getChannels
Description copied from interface:IChannelMultiplexerReturns a collection of currently open channels.- Specified by:
getChannelsin interfaceIChannelMultiplexer
-
isEmpty
public boolean isEmpty() -
getElements
- Specified by:
getElementsin interfaceorg.eclipse.net4j.util.container.IContainer<IChannel>
-
openChannel
Description copied from interface:IChannelMultiplexerSynchronous request to open a newIChannelwith an undefined channel protocol. Since the peer connector can't lookup a protocolfactorywithout a protocol identifier theIBufferHandlerof the peerIChannelcan only be provided by externally provided channellifecyclelisteners.- Specified by:
openChannelin interfaceIChannelMultiplexer- Throws:
ChannelException- See Also:
-
openChannel
public InternalChannel openChannel(String protocolID, Object infraStructure) throws ChannelException Description copied from interface:IChannelMultiplexerSynchronous request to open a newIChannelwith a channel protocol defined by a given protocol identifier. The peer connector will lookup a protocolfactorywith the protocol identifier, create aIBufferHandlerand inject it into the peerIChannel.- Specified by:
openChannelin interfaceIChannelMultiplexer- Throws:
ChannelException- See Also:
-
openChannel
Description copied from interface:IChannelMultiplexerSynchronous request to open a newIChannelwith the given channel protocol . The peer connector will lookup a protocolfactorywith the protocol identifier, create aIBufferHandlerand inject it into the peer channel.- Specified by:
openChannelin interfaceIChannelMultiplexer- Throws:
ChannelException- See Also:
-
inverseOpenChannel
Deprecated. -
inverseOpenChannel
- Since:
- 4.2
-
closeChannel
- Specified by:
closeChannelin interfaceInternalChannelMultiplexer- Throws:
ChannelException
-
inverseCloseChannel
- Throws:
ChannelException
-
inverseClose
public void inverseClose()- Specified by:
inverseClosein interfaceInverseCloseable
-
createChannel
-
initChannel
-
createProtocol
-
createProtocolFactoryKey
-
doBeforeOpenChannel
-
doDeactivate
- Overrides:
doDeactivatein classorg.eclipse.net4j.util.lifecycle.Lifecycle- Throws:
Exception
-
createNegotiationContext
protected abstract org.eclipse.net4j.util.security.INegotiationContext createNegotiationContext() -
registerChannelWithPeer
protected abstract void registerChannelWithPeer(short channelID, long timeout, IProtocol<?> protocol) throws ChannelException - Throws:
ChannelException
-
deregisterChannelFromPeer
- Throws:
ChannelException
-
inverseOpenChannel(short, String, int).