SolarMetric Kodo JDO 2.4.3 generated on March 27 2003

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.
 
Constructor Summary
protected SocketDistributedCache.SocketCacheListener(int port)
          Construct a new SocketCacheListener configured to use the specified port.
 
Method Summary
protected  void addCache(SocketDistributedCache cache)
          All caches added here will be notified of any incoming cache messages.
protected  void handle(InputStream in)
          Process an InputStream containing objects written by SocketDistributedCache.broadcastUpdate(java.util.Map, java.util.Map, java.util.Collection).
 
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
 

Field Detail

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.
Constructor Detail

SocketDistributedCache.SocketCacheListener

protected SocketDistributedCache.SocketCacheListener(int port)
                                              throws UnknownHostException
Construct a new SocketCacheListener configured to use the specified port.
Method Detail

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).

SolarMetric Kodo JDO 2.4.3 generated on March 27 2003

Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.