|
JXTA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.impl.endpoint.servlethttp.HttpMessageSender
class HttpMessageSender
Simple Client MessageSender
Constructor Summary | |
---|---|
HttpMessageSender(ServletHttpTransport servletHttpTransport,
EndpointAddress publicAddress)
constructor |
Method Summary | |
---|---|
boolean |
allowsRouting()
Returns true if the Message Transport can be used by the EndpointRouter. |
EndpointService |
getEndpointService()
Returns the endpoint service with which this MessageTransport is registered. |
Messenger |
getMessenger(EndpointAddress destAddr,
Object hintIgnored)
Return a Messenger for sending messages to the specified
destination EndpointAddress . |
String |
getProtocolName()
Returns a String containing the name of the protocol used by this MessageTransport. |
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)
Returns true if the specified destination address is reachable
via this Message Transport otherwise returns false . |
void |
start()
shut down all client connections. |
void |
stop()
shut down all client connections. |
Object |
transportControl(Object operation,
Object Value)
Pass a transport control object to a message transport. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HttpMessageSender(ServletHttpTransport servletHttpTransport, EndpointAddress publicAddress) throws PeerGroupException
PeerGroupException
Method Detail |
---|
public 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.
getPublicAddress
in interface MessageSender
public 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.
isConnectionOriented
in interface MessageSender
true
if the Message Transport is connection oriented.public boolean allowsRouting()
getReachableEndpointAddresses
.
allowsRouting
in interface MessageSender
public Object transportControl(Object operation, Object Value)
transportControl
in interface MessageTransport
operation
- Object that specifies the type of control operation
to be performedValue
- Object that specifies a value object associated
with the control operation
public void start() throws PeerGroupException
PeerGroupException
public void stop()
public Messenger getMessenger(EndpointAddress destAddr, Object hintIgnored)
Messenger
for sending messages to the specified
destination EndpointAddress
.
getMessenger
in interface MessageSender
destAddr
- The destination address for which a messenger is requested.hintIgnored
- 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.public boolean ping(EndpointAddress addr)
true
if the specified destination address is reachable
via this Message Transport otherwise returns false
.
ping
in interface MessageSender
addr
- Address to ping
true
if the specified destination address is reachable
via this Message Transport otherwise returns false
.public String getProtocolName()
EndpointAddress
.
getProtocolName
in interface MessageTransport
public EndpointService getEndpointService()
getEndpointService
in interface MessageTransport
|
JXSE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |