|
JXTA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.impl.endpoint.relay.RelayServer
public class RelayServer
Relay server that maintains outgoing message queues, leases, etc.
Nested Class Summary | |
---|---|
(package private) static class |
RelayServer.BGSend
Sends a message on an synchronous messenger. |
Field Summary | |
---|---|
protected AccessList |
acl
|
protected File |
aclFile
|
protected long |
aclFileLastModified
|
protected PeerGroup |
group
|
protected String |
peerId
|
protected long |
refreshTime
|
protected net.jxta.impl.endpoint.relay.RelayServer.RelayServerCache |
relayServerCache
|
protected String |
serviceName
|
Constructor Summary | |
---|---|
RelayServer(PeerGroup group,
String serviceName,
RelayConfigAdv relayConfigAdv)
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. |
List<String> |
getRelayedClients()
Debug routine: returns the list of relayedClients with details. |
protected void |
handleRequest(Message message,
EndpointAddress dstAddr)
|
protected void |
handleRequest(Messenger messenger,
EndpointAddress connectionAddress)
|
(package private) void |
handleRequest(String request,
String clientPeerId,
Messenger messenger)
|
boolean |
isConnectionOriented()
Returns true if the Message Transport is connection oriented
(like TCP/IP). |
boolean |
messengerReady(MessengerEvent event)
A messenger is ready. |
boolean |
ping(EndpointAddress addr)
Deprecated. |
protected void |
removeClient(String clientPeerId,
RelayServerClient handler)
|
void |
run()
|
boolean |
startServer()
|
void |
stopServer()
|
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 |
Field Detail |
---|
protected final PeerGroup group
protected final String serviceName
protected final String peerId
protected final AccessList acl
protected File aclFile
protected long refreshTime
protected long aclFileLastModified
protected net.jxta.impl.endpoint.relay.RelayServer.RelayServerCache relayServerCache
Constructor Detail |
---|
public RelayServer(PeerGroup group, String serviceName, RelayConfigAdv relayConfigAdv)
Method Detail |
---|
public List<String> getRelayedClients()
public boolean startServer()
public void stopServer()
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 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.@Deprecated 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
public boolean messengerReady(MessengerEvent event)
messengerReady
in interface MessengerEventListener
event
- The Messenger Event.
true
if the listener wants to claim the Messenger.
(Normally means that it will not be offered to any other listener).protected void handleRequest(Messenger messenger, EndpointAddress connectionAddress)
protected void handleRequest(Message message, EndpointAddress dstAddr)
void handleRequest(String request, String clientPeerId, Messenger messenger)
protected void removeClient(String clientPeerId, RelayServerClient handler)
public void run()
run
in interface Runnable
|
JXSE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |