com.solarmetric.kodo.runtime.datacache.plugins
Class SocketDistributedCache.SocketCacheListener
java.lang.Object
|
+--com.solarmetric.kodo.runtime.datacache.plugins.SocketDistributedCache.SocketCacheListener
- All Implemented Interfaces:
- Runnable
- Enclosing class:
- SocketDistributedCache
- protected abstract static class SocketDistributedCache.SocketCacheListener
- extends Object
- implements Runnable
Responsible for listening for packets and processing the
received packets. There is a single listener per JVM. This is
because only a single socket can bind to a given port
|
Field Summary |
protected boolean |
isRunning
Should be set to true once the listener is
listening. |
protected int |
port
The port that this listener should listen on. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.lang.Runnable |
run |
port
protected int port
- The port that this listener should listen on. Configured
by SocketDistributedCache.
isRunning
protected boolean isRunning
- Should be set to
true once the listener is
listening.
SocketDistributedCache.SocketCacheListener
protected SocketDistributedCache.SocketCacheListener(int port)
throws UnknownHostException
- Construct a new SocketCacheListener configured to use the
specified port.
addCache
protected void addCache(SocketDistributedCache cache)
- All caches added here will be notified of any incoming
cache messages. There will be one of these per
PersistenceManagerFactory in a given JVM.
SocketDistributedCache.endConfiguration() invokes
addCache with this upon
completion of configuration.
handle
protected void handle(InputStream in)
throws IOException,
ClassNotFoundException,
OptionalDataException
- Process an
InputStream containing objects written
by SocketDistributedCache.broadcastUpdate(java.util.Map, java.util.Map, java.util.Collection).
Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.