|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.dream.AbstractComponent
org.objectweb.dream.protocol.channel.MultiplexBindProtocolImpl
public class MultiplexBindProtocolImpl
Implementation of a binding multiplexer protocol. This protocol allows a client to establish multiple bindings to the same exported channel using a single lower level binding.
Field Summary |
---|
Fields inherited from class org.objectweb.dream.AbstractComponent |
---|
bindingLogger, fcNeedAsyncStart, fcState, lifeCycleLogger, logger, weaveableC |
Fields inherited from interface org.objectweb.dream.protocol.Protocol |
---|
ITF_NAME, LOWER_PROTOCOL_ITF_NAME |
Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController |
---|
STARTED, STOPPED |
Constructor Summary | |
---|---|
MultiplexBindProtocolImpl()
|
Method Summary | |
---|---|
OutgoingPush |
bind(ExportIdentifier exportId,
IncomingPush toClientPush,
Map<String,Object> hints)
Binds to a previously exported ChannelFactory interface designated
by the given export identifier. |
void |
bindFc(String clientItfName,
Object serverItf)
|
ExportIdentifier |
createExportIdentifier(Map<String,Object> info,
ExportIdentifier[] next)
Creates a new export identifier with the provided info |
ExportIdentifier |
export(ChannelFactory channel,
Map<String,Object> hints)
Exports a ChannelFactory interface using this protocol. |
String |
getMultiplexChunkName()
Returns the name of the MultiplexChunk that the protocol will add
to outgoing messages. |
String[] |
listFc()
|
void |
setMultiplexChunkName(String multiplexChunkName)
Sets the value of the multiplexChunkName attribute. |
void |
unexport(ExportIdentifier exportIdentifier)
Closes the export of a previously exported ChannelFactory
interface. |
Methods inherited from class org.objectweb.dream.AbstractComponent |
---|
beforeFirstStart, bindFc, getFcNeedAsyncStart, getFcState, initComponent, lookupFc, prepareStopFc, setLogger, startFc, stopFc, unbindFc |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MultiplexBindProtocolImpl()
Method Detail |
---|
public OutgoingPush bind(ExportIdentifier exportId, IncomingPush toClientPush, Map<String,Object> hints) throws InvalidExportIdentifierException, BindException
ChannelProtocol
ChannelFactory
interface designated
by the given export identifier. This methods instantiate a new
communication channel and returns an interface on which messages can be
sent to the server. In addition the toClientPush
interface
is the interface on which the client want to receive messages from the
server.
bind
in interface ChannelProtocol
exportId
- the identifier of the exported interface.toClientPush
- the interface on which the client want to receive
messages from the server, may be null
if no
messages are expected from the server.hints
- additional parameters, can be null
.
OutgoingPush
interface on which message can be
send over the new communication channel.
InvalidExportIdentifierException
- if the given export identifier is
incorrect.
BindException
- if the binding process fails.ChannelProtocol.bind(ExportIdentifier, IncomingPush, Map)
public ExportIdentifier export(ChannelFactory channel, Map<String,Object> hints) throws ExportException
ChannelProtocol
ChannelFactory
interface using this protocol. This method
informs the protocol that the provided ChannelFactory
is
willing to accept connection. The returned export identifier is a specific
name for the exported channel.
export
in interface ChannelProtocol
channel
- a ChannelFactory
interface to export.hints
- additional parameters, can be null
.
ExportException
- if the export process fails.ChannelProtocol.export(ChannelFactory, Map)
public void unexport(ExportIdentifier exportIdentifier) throws InvalidExportIdentifierException
ChannelProtocol
ChannelFactory
interface. This methods do not close communication channels created by the
exported channel factory.
unexport
in interface ChannelProtocol
exportIdentifier
- the export identifier of the channel.
InvalidExportIdentifierException
- if the given export identifier is
incorrect.ChannelProtocol.unexport(ExportIdentifier)
public ExportIdentifier createExportIdentifier(Map<String,Object> info, ExportIdentifier[] next) throws InvalidExportIdentifierException
Protocol
createExportIdentifier
in interface Protocol
info
- the info used to create the export identifier.next
- the export identifier of the lower level protocols.
InvalidExportIdentifierException
- if the export identifier can't be
created.Protocol.createExportIdentifier(Map, ExportIdentifier[])
public String getMultiplexChunkName()
MultiplexProtocolAttributeController
MultiplexChunk
that the protocol will add
to outgoing messages.
getMultiplexChunkName
in interface MultiplexProtocolAttributeController
multiplexChunkName
attribute.MultiplexProtocolAttributeController.getMultiplexChunkName()
public void setMultiplexChunkName(String multiplexChunkName)
MultiplexProtocolAttributeController
multiplexChunkName
attribute.
setMultiplexChunkName
in interface MultiplexProtocolAttributeController
multiplexChunkName
- the new value of the
multiplexChunkName
attribute.MultiplexProtocolAttributeController.setMultiplexChunkName(String)
public String[] listFc()
listFc
in interface BindingController
BindingController.listFc()
public void bindFc(String clientItfName, Object serverItf) throws NoSuchInterfaceException, IllegalBindingException, IllegalLifeCycleException
bindFc
in interface BindingController
bindFc
in class AbstractComponent
NoSuchInterfaceException
IllegalBindingException
IllegalLifeCycleException
BindingController.bindFc(String,
Object)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |