|
JXTA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MessageSender
A MessageSender is a MessageTransport that is able to send messages to remote peers using some protocol. MessageSenders provide facilities for sending point-to-point (unicast) messages.
MessageSenders additionally describe themselves in terms of their abilities.isConnectionOriented()
MessageTransport
,
Message
,
Messenger
,
EndpointService
,
MessageReceiver
,
MessagePropagater
Method Summary | |
---|---|
boolean |
allowsRouting()
Returns true if the Message Transport can be used by the EndpointRouter. |
Messenger |
getMessenger(EndpointAddress dest,
Object hint)
Return a Messenger for sending messages to the specified
destination EndpointAddress . |
EndpointAddress |
getPublicAddress()
Returns the EndpointAddress which will be used as the source
address for all messages sent by this message sender. |
boolean |
isConnectionOriented()
Returns true if the Message Transport is connection oriented
(like TCP/IP). |
boolean |
ping(EndpointAddress addr)
Deprecated. This operation is often very expensive and usually duplicates the work of getMessenger(net.jxta.endpoint.EndpointAddress, java.lang.Object) . If you want to determine
the reachability of a destination, get a Messenger to the destination. |
Methods inherited from interface net.jxta.endpoint.MessageTransport |
---|
getEndpointService, getProtocolName, transportControl |
Method Detail |
---|
EndpointAddress getPublicAddress()
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.
boolean isConnectionOriented()
true
if the Message Transport is connection oriented
(like TCP/IP). Indicates that the Message Transport can provide
efficient transport of a series of messages to the same destination.
true
if the Message Transport is connection oriented.boolean allowsRouting()
getReachableEndpointAddresses
.
Messenger getMessenger(EndpointAddress dest, Object hint)
Messenger
for sending messages to the specified
destination EndpointAddress
.
dest
- The destination address for which a messenger is requested.hint
- An optional hint for the transport to use when creating the
messenger. The format of the hint is specific to each Message Transport
and may be null
if no hint is provided.
null
if the destination is not reachable.@Deprecated boolean ping(EndpointAddress addr)
getMessenger(net.jxta.endpoint.EndpointAddress, java.lang.Object)
. If you want to determine
the reachability of a destination, get a Messenger to the destination.
true
if the specified destination address is reachable
via this Message Transport otherwise returns false
.
addr
- Address to ping
true
if the specified destination address is reachable
via this Message Transport otherwise returns false
.
|
JXSE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |