com.solarmetric.kodo.runtime.event.impl
Class TCPRemoteCommitProvider.TCPPortListener
java.lang.Object
|
+--com.solarmetric.kodo.runtime.event.impl.TCPRemoteCommitProvider.TCPPortListener
- All Implemented Interfaces:
- Runnable
- Enclosing class:
- TCPRemoteCommitProvider
- protected static class TCPRemoteCommitProvider.TCPPortListener
- 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 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 |
port
protected int port
- The port that this listener should listen on. Configured
by TCPRemoteCommitProvider.
TCPRemoteCommitProvider.TCPPortListener
protected TCPRemoteCommitProvider.TCPPortListener(int port)
throws UnknownHostException,
IOException
- Construct a new TCPPortListener configured to use the
specified port.
addProvider
protected void addProvider(TCPRemoteCommitProvider provider)
- All providers added here will be notified of any incoming
provider messages. There will be one of these per
PersistenceManagerFactory in a given JVM.
TCPRemoteCommitProvider.endConfiguration() invokes
addProvider with this upon
completion of configuration.
removeProvider
protected void removeProvider(TCPRemoteCommitProvider provider)
- Remove a provider from the list of providers to notify of
commit events.
handle
protected void handle(InputStream in)
throws IOException,
ClassNotFoundException,
OptionalDataException
- Process an
InputStream containing objects written
by #broadcastUpdate.
listen
protected void listen()
isRunning
protected boolean isRunning()
run
public void run()
- Specified by:
run in interface Runnable
Copyright 2001,2002,2003 SolarMetric, Inc. All Rights Reserved.