|
|||||||||
| Home >> All >> net >> jxta >> util >> [ endpoint overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
net.jxta.util.endpoint
Class WeakMessengerCache

java.lang.Objectjava.util.AbstractMap
java.util.WeakHashMap
net.jxta.util.endpoint.WeakMessengerCache
- All Implemented Interfaces:
- java.util.Map
Deprecated. The new endpoint implemenation introduced in JXTA J2SE 2.3 makes this cache largely unnecessary. It should not be used in new code.
- public class WeakMessengerCache
- extends java.util.WeakHashMap
This class implements a cache of Messenger, indexed by their EndpointAddress based on WeakReference.
The life time of an Messenger in the cache is the same as the life time of the Messenger itself. This allow applications and services to reuse an existing Messenger for sending a new message.
| Nested Class Summary |
| Nested classes inherited from class java.util.WeakHashMap |
|
| Nested classes inherited from class java.util.AbstractMap |
|
| Nested classes inherited from class java.util.Map |
java.util.Map.Entry |
| Field Summary |
| Fields inherited from class java.util.WeakHashMap |
|
| Fields inherited from class java.util.AbstractMap |
|
| Constructor Summary | |
WeakMessengerCache()
Deprecated. Default Constructor |
|
WeakMessengerCache(int initialCapacity)
Deprecated. Constructor which includes a capacity hint. |
|
WeakMessengerCache(int initialCapacity,
float loadFactor)
Deprecated. Constructor which includes a capacity hint and a required loading factor. |
|
WeakMessengerCache(java.util.Map t)
Deprecated. Constructor which includes an initial map content. |
|
| Method Summary | |
net.jxta.endpoint.Messenger |
getMessenger(net.jxta.endpoint.EndpointAddress addr)
Deprecated. Return, if any, a cached Messenger. |
net.jxta.endpoint.Messenger |
putMessenger(net.jxta.endpoint.Messenger messenger)
Deprecated. Cache an Messenger. |
| Methods inherited from class java.util.WeakHashMap |
clear, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
| Methods inherited from class java.util.AbstractMap |
clone, equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
equals, hashCode |
| Constructor Detail |
WeakMessengerCache
public WeakMessengerCache()
- Deprecated.
- Default Constructor
- Default Constructor
WeakMessengerCache
public WeakMessengerCache(int initialCapacity)
- Deprecated.
- Constructor which includes a capacity hint.
- Constructor which includes a capacity hint.
WeakMessengerCache
public WeakMessengerCache(int initialCapacity,
float loadFactor)
- Deprecated.
- Constructor which includes a capacity hint and a required loading factor.
- Constructor which includes a capacity hint and a required loading factor.
WeakMessengerCache
public WeakMessengerCache(java.util.Map t)
- Deprecated.
- Constructor which includes an initial map content.
- Constructor which includes an initial map content.
| Method Detail |
putMessenger
public net.jxta.endpoint.Messenger putMessenger(net.jxta.endpoint.Messenger messenger)
- Deprecated.
- Cache an Messenger. If there was already an Messenger cached for the same EndpointAddress, the old cached EndpointMeseenger it returned, and messenger Messenger is cached. This method is not thread-safe: if required, synchronization must be performed by the caller.
- Cache an Messenger. If there was already an Messenger cached for the same EndpointAddress, the old cached EndpointMeseenger it returned, and messenger Messenger is cached. This method is not thread-safe: if required, synchronization must be performed by the caller.
getMessenger
public net.jxta.endpoint.Messenger getMessenger(net.jxta.endpoint.EndpointAddress addr)
- Deprecated.
- Return, if any, a cached Messenger. This method is not thread-safe: if required, synchronization must be performed by the caller.
- Return, if any, a cached Messenger. This method is not thread-safe: if required, synchronization must be performed by the caller.
|
|||||||||
| Home >> All >> net >> jxta >> util >> [ endpoint overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC