|
JXTA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.impl.endpoint.router.Destinations
class Destinations
This class is a repository of wisdom regarding destinations. It also provides a messenger if there is one. Currently, the wisdom is very limited and is only about direct destinations (for which a messenger once existed). The wisdom that can be obtained is:
Nested Class Summary | |
---|---|
(package private) class |
Destinations.Wisdom
Stores knowledge about one particular destination. |
(package private) class |
Destinations.WisdomGCTask
Handles cleanup of expired wisdoms |
Constructor Summary | |
---|---|
Destinations(EndpointService endpoint)
|
Method Summary | |
---|---|
boolean |
addIncomingMessenger(EndpointAddress destination,
Messenger messenger)
Here is an incoming messenger that just popped out. |
boolean |
addOutgoingMessenger(EndpointAddress destination,
Messenger messenger)
Here is a messenger that we were able to obtain. |
Collection<EndpointAddress> |
allDestinations()
|
void |
close()
Shutdown this cache. |
Messenger |
getCurrentMessenger(EndpointAddress destination)
If there is a messenger at hand (incoming or otherwise), return it. |
boolean |
isCurrentlyReachable(EndpointAddress destination)
Do we already have a messenger or is it likely that we can make one? |
boolean |
isNormallyReachable(EndpointAddress destination)
Is it likely that one can be made from this end. |
boolean |
isWelcomeNeeded(EndpointAddress destination)
Are we supposed to send a welcome to that destination (we can't remember having done it). |
void |
noOutgoingMessenger(EndpointAddress destination)
We tried to get a messenger but could not. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Destinations(EndpointService endpoint)
Method Detail |
---|
public void close()
public Collection<EndpointAddress> allDestinations()
public Messenger getCurrentMessenger(EndpointAddress destination)
destination
- The destination as an endpoint address (is automatically normalized to protocol and address only).
public boolean isNormallyReachable(EndpointAddress destination)
destination
- The destination as an endpoint address (is automatically normalized to protocol and address only).
public boolean isCurrentlyReachable(EndpointAddress destination)
true
more often than
isNormallyReachable()
since it can be true even when all we have
is an incoming messenger.
Just testing that there is an entry is no-longer the same because we
may keep the entries beyond the point where we would keep them before, so
that we can add some longer-lived information in the future, and do not
interfere as much with the gc thread.
destination
- The destination as an endpoint address (is automatically normalized to protocol and address only).
public boolean isWelcomeNeeded(EndpointAddress destination)
destination
- The destination as an endpoint address (is automatically normalized to protocol and address only).
public boolean addOutgoingMessenger(EndpointAddress destination, Messenger messenger)
destination
- The destination as an endpoint address (is automatically normalized to protocol and address only).messenger
- The incoming messenger for that destination.
public boolean addIncomingMessenger(EndpointAddress destination, Messenger messenger)
destination
- The destination as an endpoint address (is automatically normalized to protocol and address only).messenger
- The incoming messenger for that destination.
public void noOutgoingMessenger(EndpointAddress destination)
destination
- The destination as an endpoint address (is automatically normalized to protocol and address only).
|
JXSE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |