org.objectweb.dream.protocol.channel
Interface ChannelProtocol

All Superinterfaces:
Protocol
All Known Subinterfaces:
MultiplexExportProtocol, TCPIPProtocol
All Known Implementing Classes:
MultiplexBindProtocolImpl, MultiplexExportProtocolImpl, TCPIPProtocolImpl

public interface ChannelProtocol
extends Protocol

A protocol is a naming context which can export ChannelFactory interfaces.


Field Summary
 
Fields inherited from interface org.objectweb.dream.protocol.Protocol
ITF_NAME, LOWER_PROTOCOL_ITF_NAME
 
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.
 ExportIdentifier export(ChannelFactory channel, Map<String,Object> hints)
          Exports a ChannelFactory interface using this protocol.
 void unexport(ExportIdentifier exportIdentifier)
          Closes the export of a previously exported ChannelFactory interface.
 
Methods inherited from interface org.objectweb.dream.protocol.Protocol
createExportIdentifier
 

Method Detail

export

ExportIdentifier export(ChannelFactory channel,
                        Map<String,Object> hints)
                        throws ExportException
Exports a 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.

Parameters:
channel - a ChannelFactory interface to export.
hints - additional parameters, can be null.
Returns:
an identifier for the exported interface.
Throws:
ExportException - if the export process fails.

unexport

void unexport(ExportIdentifier exportIdentifier)
              throws InvalidExportIdentifierException
Closes the export of a previously exported ChannelFactory interface. This methods do not close communication channels created by the exported channel factory.

Parameters:
exportIdentifier - the export identifier of the channel.
Throws:
InvalidExportIdentifierException - if the given export identifier is incorrect.

bind

OutgoingPush bind(ExportIdentifier exportId,
                  IncomingPush toClientPush,
                  Map<String,Object> hints)
                  throws InvalidExportIdentifierException,
                         BindException
Binds to a previously exported 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.

Parameters:
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.
Returns:
a OutgoingPush interface on which message can be send over the new communication channel.
Throws:
InvalidExportIdentifierException - if the given export identifier is incorrect.
BindException - if the binding process fails.


Copyright © 2003, 2005 - INRIA Rhone-Alpes - All Rights Reserved.