|
FreeHEP API Version current |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object hep.aida.ref.remote.RemoteClient
This is Basic implementation of AidaTreeClient that support both "Duplex" and "non-Duplex" modes of communication with the AIDA Tree server. In "Duplex" mode AidaTreeServant call stateChanged() method to notify BasicTreeClient about updates/changes in the server-side AIDA tree. In "non-Duplex" mode BasicTreeClient runs as a separate thread and periodically calls updates() method of AidaTreeServant to get information about updates/changes in the server-side AIDA tree. BasicTreeClient also implements IMutableStore, so it can be used as a Store for any IDevTree.
Field Summary | |
protected boolean |
blocking
|
protected String |
clientID
|
protected boolean |
duplex
|
protected boolean |
isConnected
|
protected boolean |
keepUpdating
|
protected RemoteUpdatableQueue |
queue
|
protected Logger |
remoteLogger
|
protected AidaTreeServant |
servant
|
protected AidaTreeServer |
server
|
protected IDevMutableStore |
store
|
protected long |
updateInterval
|
Constructor Summary | |
RemoteClient(IDevMutableStore store)
Creates a new instance of RemoteClient. |
|
RemoteClient(IDevMutableStore store,
boolean duplex)
|
Method Summary | |
boolean |
connect()
|
protected void |
connectDuplex()
Retrieves Duplex AidaTreeServant from the AidaTreeServer. |
protected void |
connectNonDuplex()
Retrieves non-Duplex AidaTreeServant from the AidaTreeServer. |
boolean |
disconnect()
|
Object |
find(String path)
|
protected abstract AidaTreeServer |
getServer()
Retrieves reference to the AidaTreeServer. |
protected void |
init()
|
boolean |
isBlocking()
|
boolean |
isConnected()
|
String[] |
listObjectNames(String path,
boolean recursive)
|
String[] |
listObjectTypes(String path,
boolean recursive)
|
static void |
main(String[] args)
|
void |
run()
|
void |
setBlocking(boolean b)
|
void |
setDuplex(boolean duplex)
Set duplex mode. |
void |
setUpdateTime(long updateInterval)
Set time interval (in milliseconds) for AidaTreeClient to check for updates. |
void |
stateChanged(AidaUpdateEvent[] events)
In this implementation stateChanged(UpdateEvent[] events) method simply schedules updates in the UpdatableQueue. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected AidaTreeServer server
protected AidaTreeServant servant
protected IDevMutableStore store
protected RemoteUpdatableQueue queue
protected boolean duplex
protected boolean blocking
protected boolean isConnected
protected long updateInterval
protected boolean keepUpdating
protected String clientID
protected Logger remoteLogger
Constructor Detail |
public RemoteClient(IDevMutableStore store)
public RemoteClient(IDevMutableStore store, boolean duplex)
Method Detail |
protected void init()
public void setBlocking(boolean b)
public boolean isBlocking()
protected abstract AidaTreeServer getServer()
public void setUpdateTime(long updateInterval)
public void setDuplex(boolean duplex)
protected void connectDuplex() throws RemoteConnectionException
RemoteConnectionException
protected void connectNonDuplex() throws RemoteConnectionException
RemoteConnectionException
public String[] listObjectNames(String path, boolean recursive) throws IllegalArgumentException
IllegalArgumentException
public String[] listObjectTypes(String path, boolean recursive) throws IllegalArgumentException
IllegalArgumentException
public Object find(String path) throws IllegalArgumentException
IllegalArgumentException
public void stateChanged(AidaUpdateEvent[] events)
stateChanged
in interface AidaTreeClient
public boolean isConnected()
public boolean connect() throws RemoteConnectionException
RemoteConnectionException
public boolean disconnect()
public void run()
run
in interface Runnable
public static void main(String[] args)
|
FreeHEP API Version current |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |