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.IBufferProviderIBufferProvider.Introspection, IBufferProvider.Notification
 - 
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.container.IContainerorg.eclipse.net4j.util.container.IContainer.Modifiable<E extends java.lang.Object>, org.eclipse.net4j.util.container.IContainer.Persistable<E extends java.lang.Object>, org.eclipse.net4j.util.container.IContainer.Persistence<E extends java.lang.Object>
 - 
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.lifecycle.ILifecycleorg.eclipse.net4j.util.lifecycle.ILifecycle.DeferrableActivation
 - 
Nested classes/interfaces inherited from interface org.eclipse.net4j.ILocationAwareILocationAware.Location
 - 
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifierorg.eclipse.net4j.util.event.INotifier.INotifier2
 - 
Nested classes/interfaces inherited from interface org.eclipse.spi.net4j.InternalChannelMultiplexerInternalChannelMultiplexer.BufferMultiplexer
 
- 
 - 
Field Summary- 
Fields inherited from interface org.eclipse.net4j.channel.IChannelMultiplexerDEFAULT_OPEN_CHANNEL_TIMEOUT, NO_CHANNEL_TIMEOUT
 - 
Fields inherited from interface org.eclipse.spi.net4j.InternalChannelMultiplexerCONTEXT_MULTIPLEXER, RESERVED_CHANNEL
 
- 
 - 
Constructor SummaryConstructors Constructor Description ChannelMultiplexer()
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidcloseChannel(InternalChannel channel)protected InternalChannelcreateChannel()protected abstract org.eclipse.net4j.util.security.INegotiationContextcreateNegotiationContext()protected <INFRA_STRUCTURE>
 IProtocol<INFRA_STRUCTURE>createProtocol(java.lang.String type, INFRA_STRUCTURE infraStructure)protected org.eclipse.net4j.util.factory.IFactoryKeycreateProtocolFactoryKey(java.lang.String type)protected abstract voidderegisterChannelFromPeer(InternalChannel channel)protected voiddoBeforeOpenChannel(IProtocol<?> protocol)protected voiddoDeactivate()InternalChannelgetChannel(short channelID)java.util.Collection<IChannel>getChannels()Returns a collection of currently open channels.ITransportConfiggetConfig()Returns the current transport configuration if there is one, a new empty one otherwise.IChannel[]getElements()java.util.concurrent.ExecutorServicegetExecutorService()longgetOpenChannelTimeout()protected voidinitChannel(InternalChannel channel, IProtocol<?> protocol)voidinverseClose()voidinverseCloseChannel(short channelID)InternalChannelinverseOpenChannel(short channelID, java.lang.String protocolID)Deprecated.InternalChannelinverseOpenChannel(short channelID, java.lang.String protocolID, int protocolVersion)booleanisEmpty()InternalChannelopenChannel()Synchronous request to open a newIChannelwith an undefined channel protocol.InternalChannelopenChannel(java.lang.String protocolID, java.lang.Object infraStructure)Synchronous request to open a newIChannelwith a channel protocol defined by a given protocol identifier.InternalChannelopenChannel(IProtocol<?> protocol)Synchronous request to open a newIChannelwith the given channel protocol .org.eclipse.net4j.util.registry.IRegistry<java.lang.String,java.lang.Object>properties()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.ContainerfireContainerEvent, fireContainerEvent, fireContainerEvent, fireElementAddedEvent, fireElementRemovedEvent, fireElementsAddedEvent, fireElementsRemovedEvent, fireEvent, newContainerEvent, newContainerEvent
 - 
Methods inherited from class org.eclipse.net4j.util.lifecycle.Lifecycleactivate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doActivate, doAfterActivate, doBeforeActivate, doBeforeDeactivate, dump, getLifecycleState, isActive, isDeferredActivation, toString
 - 
Methods inherited from class org.eclipse.net4j.util.event.NotifieraddListener, addUniqueListener, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListener, hasListeners, lastListenerRemoved, listenerAdded, listenerRemoved, removeListener
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface org.eclipse.net4j.buffer.IBufferProvidergetBufferCapacity, provideBuffer, retainBuffer
 - 
Methods inherited from interface org.eclipse.net4j.ILocationAwaregetLocation, isClient, isServer
 - 
Methods inherited from interface org.eclipse.net4j.util.event.INotifieraddListener, getListeners, hasListeners, removeListener
 - 
Methods inherited from interface org.eclipse.spi.net4j.InternalChannelMultiplexermultiplexChannel
 
- 
 
- 
- 
- 
Method Detail- 
propertiespublic final org.eclipse.net4j.util.registry.IRegistry<java.lang.String,java.lang.Object> properties() - Specified by:
- propertiesin interface- org.eclipse.net4j.util.properties.IPropertiesContainer
- Since:
- 4.12
 
 - 
getConfigpublic ITransportConfig getConfig() Description copied from interface:ITransportConfigAwareReturns the current transport configuration if there is one, a new empty one otherwise.- Specified by:
- getConfigin interface- ITransportConfigAware
 
 - 
setConfigpublic void setConfig(ITransportConfig config) Description copied from interface:ITransportConfigAwareSets a new transport configuration by copying the given one.- Specified by:
- setConfigin interface- ITransportConfigAware
 
 - 
getExecutorServicepublic java.util.concurrent.ExecutorService getExecutorService() - Specified by:
- getExecutorServicein interface- org.eclipse.net4j.util.concurrent.IExecutorServiceProvider
 
 - 
getOpenChannelTimeoutpublic long getOpenChannelTimeout() - Specified by:
- getOpenChannelTimeoutin interface- IChannelMultiplexer
 
 - 
setOpenChannelTimeoutpublic void setOpenChannelTimeout(long openChannelTimeout) - Specified by:
- setOpenChannelTimeoutin interface- IChannelMultiplexer
 
 - 
getChannelpublic final InternalChannel getChannel(short channelID) 
 - 
getChannelspublic final java.util.Collection<IChannel> getChannels() Description copied from interface:IChannelMultiplexerReturns a collection of currently open channels.- Specified by:
- getChannelsin interface- IChannelMultiplexer
 
 - 
isEmptypublic boolean isEmpty() 
 - 
getElementspublic IChannel[] getElements() - Specified by:
- getElementsin interface- org.eclipse.net4j.util.container.IContainer<IChannel>
 
 - 
openChannelpublic InternalChannel openChannel() throws ChannelException 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 interface- IChannelMultiplexer
- Throws:
- ChannelException
- See Also:
- IChannelMultiplexer.openChannel(String, Object),- IChannelMultiplexer.openChannel(IProtocol)
 
 - 
openChannelpublic InternalChannel openChannel(java.lang.String protocolID, java.lang.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 interface- IChannelMultiplexer
- Throws:
- ChannelException
- See Also:
- IChannelMultiplexer.openChannel(),- IChannelMultiplexer.openChannel(IProtocol)
 
 - 
openChannelpublic InternalChannel openChannel(IProtocol<?> protocol) throws ChannelException 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 interface- IChannelMultiplexer
- Throws:
- ChannelException
- See Also:
- IChannelMultiplexer.openChannel(),- IChannelMultiplexer.openChannel(String, Object)
 
 - 
inverseOpenChannel@Deprecated public InternalChannel inverseOpenChannel(short channelID, java.lang.String protocolID) Deprecated.
 - 
inverseOpenChannelpublic InternalChannel inverseOpenChannel(short channelID, java.lang.String protocolID, int protocolVersion) - Since:
- 4.2
 
 - 
closeChannelpublic void closeChannel(InternalChannel channel) throws ChannelException - Specified by:
- closeChannelin interface- InternalChannelMultiplexer
- Throws:
- ChannelException
 
 - 
inverseCloseChannelpublic void inverseCloseChannel(short channelID) throws ChannelException- Throws:
- ChannelException
 
 - 
inverseClosepublic void inverseClose() - Specified by:
- inverseClosein interface- InverseCloseable
 
 - 
createChannelprotected InternalChannel createChannel() 
 - 
initChannelprotected void initChannel(InternalChannel channel, IProtocol<?> protocol) 
 - 
createProtocolprotected <INFRA_STRUCTURE> IProtocol<INFRA_STRUCTURE> createProtocol(java.lang.String type, INFRA_STRUCTURE infraStructure) 
 - 
createProtocolFactoryKeyprotected org.eclipse.net4j.util.factory.IFactoryKey createProtocolFactoryKey(java.lang.String type) 
 - 
doBeforeOpenChannelprotected void doBeforeOpenChannel(IProtocol<?> protocol) 
 - 
doDeactivateprotected void doDeactivate() throws java.lang.Exception- Overrides:
- doDeactivatein class- org.eclipse.net4j.util.lifecycle.Lifecycle
- Throws:
- java.lang.Exception
 
 - 
createNegotiationContextprotected abstract org.eclipse.net4j.util.security.INegotiationContext createNegotiationContext() 
 - 
registerChannelWithPeerprotected abstract void registerChannelWithPeer(short channelID, long timeout, IProtocol<?> protocol) throws ChannelException- Throws:
- ChannelException
 
 - 
deregisterChannelFromPeerprotected abstract void deregisterChannelFromPeer(InternalChannel channel) throws ChannelException - Throws:
- ChannelException
 
 
- 
 
-