FreeHEP API
Version current

hep.aida.ref.remote.basic.interfaces
Interface AidaTreeClient

All Known Implementing Classes:
BasicTreeClient

public interface AidaTreeClient

Basic interface for AIDA Tree Client. TreeClient can be used in "Duplex Mode" and it has only one method that can be called by TreeServant to post messages about updates. If validation mecanism is used, setValid() method of AidaTreeServant must be called by AidaTreeClient to tell AidaTreeServant that it is ready to receive information about changes/updates of particular set of ImanagedObjects

Author:
serbo
Source Code:
AidaTreeClient.java

Method Summary
 boolean connect()
          Make initial connection to the AidaTreeServer.
 boolean disconnect()
          Disconnect from the AidaTreeServer and free all resources associated with it.
 Object find(String path)
          Get the data for IManagedObject, at a given path in the ITree.
 boolean isConnected()
          Return true if AidaTreeClient is already connected to the AidaTreeServer
 String[] listObjectNames(String path)
          Get the list of names of the IManagedObjects under a given path, including directories (but not "." and "..").
 String[] listObjectTypes(String path)
          Get the list of types of the IManagedObjects under a given path.
 void stateChanged(UpdateEvent[] events)
          This method can be called by AidaTreeServant to notify AideTreeClient about updates in the server-side ITree.
 

Method Detail

listObjectNames

public String[] listObjectNames(String path)
                         throws IllegalArgumentException
Get the list of names of the IManagedObjects under a given path, including directories (but not "." and ".."). Directories end with "/". The returned names are appended to the given path unless the latter is "." The path is an absolute path from the ITree root.

Throws:
IllegalArgumentException - if path does not exist.

listObjectTypes

public String[] listObjectTypes(String path)
                         throws IllegalArgumentException
Get the list of types of the IManagedObjects under a given path. The types are the leaf class of the Interface, e.g. "IHistogram1D", "ITuple", etc. Directories are marked with "dir". The order of the types is the same as the order for the listObjectNames() method to achieve a one-to-one correspondance between object names and types. The path is an absolute path from the ITree root.

Throws:
IllegalArgumentException - if path does not exist.

find

public Object find(String path)
            throws IllegalArgumentException
Get the data for IManagedObject, at a given path in the ITree. The path is an absolute path from the ITree root.

Throws:
IllegalArgumentException - if path does not exist, or path does not point to a directory.

stateChanged

public void stateChanged(UpdateEvent[] events)
This method can be called by AidaTreeServant to notify AideTreeClient about updates in the server-side ITree. If "Duplex Mode" is not used, AideTreeClient has to call updates() method of AideTreeServant to get a list of current updates.


isConnected

public boolean isConnected()
Return true if AidaTreeClient is already connected to the AidaTreeServer


connect

public boolean connect()
                throws AidaConnectionException
Make initial connection to the AidaTreeServer. If BasicTreeClient is already connected, throws AidaConnectionException.

Throws:
AidaConnectionException

disconnect

public boolean disconnect()
Disconnect from the AidaTreeServer and free all resources associated with it.


FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.