org.objectweb.dream.protocol.messagePassing
Interface UDPProtocol

All Superinterfaces:
MessagePassingProtocol, Protocol
All Known Implementing Classes:
UDPProtocolImpl

public interface UDPProtocol
extends MessagePassingProtocol

Defines constants used as hints key that can be given to a UDP protocol.


Field Summary
static String ADDRESS
          Key name for value used by the Protocol.createExportIdentifier(java.util.Map, org.objectweb.dream.protocol.ExportIdentifier[]) method to specify the address of the export identifier to create.
static String PORT
          This integer hint, used at export time, can specify the port of the UDP socket.
static String PORT_RANGE
          This integer hint, used at export time, can specify the range of ports on which the UDP protocol will try to open socket.
 
Fields inherited from interface org.objectweb.dream.protocol.messagePassing.MessagePassingProtocol
FROM_CHUNK_NAME
 
Fields inherited from interface org.objectweb.dream.protocol.Protocol
ITF_NAME, LOWER_PROTOCOL_ITF_NAME
 
Method Summary
 IPExportIdentifier createExportIdentifier(String hostName, int port)
          Utility method.
 MessagePassingOutgoingPush export(IncomingPush incomingPushItf, int port, int range, String fromChunkName)
          Utility method.
 
Methods inherited from interface org.objectweb.dream.protocol.messagePassing.MessagePassingProtocol
export
 
Methods inherited from interface org.objectweb.dream.protocol.Protocol
createExportIdentifier
 

Field Detail

PORT

static final String PORT
This integer hint, used at export time, can specify the port of the UDP socket.
If the hint is not specified, the socket will be created with an undetermined port.
This hint can also be used with the Protocol.createExportIdentifier(java.util.Map, org.objectweb.dream.protocol.ExportIdentifier[]) method to specify the port of the export identifier to create.

See Also:
Constant Field Values

PORT_RANGE

static final String PORT_RANGE
This integer hint, used at export time, can specify the range of ports on which the UDP protocol will try to open socket.
If this hint is not specified and a port has been specified (with PORT key), only the specified port will be tried before aborting.
if neither this hint nor the PORT hint are specified, the UDP protocol will create a socket with an undetermined port.

See Also:
Constant Field Values

ADDRESS

static final String ADDRESS
Key name for value used by the Protocol.createExportIdentifier(java.util.Map, org.objectweb.dream.protocol.ExportIdentifier[]) method to specify the address of the export identifier to create. The value associated with this key can be an InetAddress or a String.

See Also:
Constant Field Values
Method Detail

export

MessagePassingOutgoingPush export(IncomingPush incomingPushItf,
                                  int port,
                                  int range,
                                  String fromChunkName)
                                  throws ExportException
Utility method. Creates UDP socket using the given port and range.

Parameters:
incomingPushItf - the interface on which message received on the created access point will be passed.
port - the port of the created UDP socket.
If null, create the UDP socket with an undetermined port.
range - the range of ports on which the UDP protocol will try to open socket.
If null, only one port will be tried before aborting. If negative, range is infinite.
fromChunkName - If not null a ExportIdentifierChunk will be added to every received messages (see MessagePassingProtocol.FROM_CHUNK_NAME).
Returns:
An export identifier.
Throws:
ExportException - if the export process fails.
See Also:
MessagePassingProtocol.export(IncomingPush, java.util.Map)

createExportIdentifier

IPExportIdentifier createExportIdentifier(String hostName,
                                          int port)
Utility method.

See Also:
Protocol.createExportIdentifier(java.util.Map, org.objectweb.dream.protocol.ExportIdentifier[])


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