|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.antelmann.db.remote.RemoteDatabaseChangeHandler
public class RemoteDatabaseChangeHandler
delivers changes delivered from a change notification server to its listeners.
As with a DatabaseChangeMonitor, you can add DatabaseChangeListener objects
to this instance.
You can use a MessageDelegator to listen to a connection to a ChangeNotificationServer instance.
MessageDelegator,
RemoteDBChangeNotifier,
ChangeNotificationServer,
DatabaseChangeListener,
DatabaseChangeMonitor| Constructor Summary | |
|---|---|
RemoteDatabaseChangeHandler(Database<?> db)
|
|
| Method Summary | |
|---|---|
void |
addListener(DatabaseChangeListener l)
|
void |
connectionLost(NetConnection connection)
called when a connection caused an IOException during reading or writing; the connection may not have been closed at this point. |
protected void |
deliverChanges(RemoteDBUpdateEvent[] msg)
|
DatabaseChangeListener[] |
getListeners()
|
void |
handleMessage(Object message,
NetConnection connection)
called when a message is received by the given NetConnection object |
boolean |
removeListener(DatabaseChangeListener l)
|
void |
setRemoteFilter(NetConnection con,
RemoteDBChangeFilter filter)
allows to set a remote filter on the given connection, so that not every change is delivered by the server to this connection |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RemoteDatabaseChangeHandler(Database<?> db)
| Method Detail |
|---|
public void handleMessage(Object message,
NetConnection connection)
NetConnectionHandler
handleMessage in interface NetConnectionHandlerpublic void connectionLost(NetConnection connection)
NetConnectionHandler
connectionLost in interface NetConnectionHandler
public void setRemoteFilter(NetConnection con,
RemoteDBChangeFilter filter)
throws IOException
IOExceptionpublic void addListener(DatabaseChangeListener l)
public boolean removeListener(DatabaseChangeListener l)
public DatabaseChangeListener[] getListeners()
protected void deliverChanges(RemoteDBUpdateEvent[] msg)
throws ClassNotFoundException
ClassNotFoundException
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||