JXTA

net.jxta.endpoint
Interface MessagePropagater

All Superinterfaces:
MessageTransport

public interface MessagePropagater
extends MessageTransport

A MessagePropagater is a MessageTransport that can send propagated (multicast) messages.

See Also:
MessageTransport, Message, Messenger, EndpointService, MessageSender, MessageReceiver

Method Summary
 EndpointAddress getPublicAddress()
          Returns the EndpointAddress which will be used as the source address for all messages sent by this message sender.
 boolean propagate(Message msg, String serviceName, String serviceParams, int initialTTL)
          Propagates a Message via this Message Transport.
 
Methods inherited from interface net.jxta.endpoint.MessageTransport
getEndpointService, getProtocolName, transportControl
 

Method Detail

getPublicAddress

EndpointAddress getPublicAddress()
Returns the EndpointAddress which will be used as the source address for all messages sent by this message sender. This is the "preferred" address to which replies should be sent. This address is not necessarily the best or only address by which the peer may be reached.

The public address may also be for a different message transport.

Returns:
an EndpointAddress containing the public address for this message receiver.

propagate

boolean propagate(Message msg,
                  String serviceName,
                  String serviceParams,
                  int initialTTL)
Propagates a Message via this Message Transport.

Parameters:
msg - The Message to be propagated.
serviceName - Contains the name of the destination service, if any. This will be integrated into the destination address.
serviceParams - Contains the parameters associated with the service, if any. This will be integrated into the destination address.
initialTTL - The requested initial TTL for this message. This value may be reduced by the implementation.
Returns:
true if the Message was propagated otherwise false.

JXSE