FreeHEP API
Version v1.2.2

hep.aida.ref.remote
Class RemoteServer

java.lang.Object
  |
  +--hep.aida.ref.remote.RemoteServer
All Implemented Interfaces:
AidaTreeServer

public class RemoteServer
extends Object
implements AidaTreeServer

This is implementation of the AidaTreeServer. This class does not have any remote transport layer (RMI, CORBA, etc.), so special adapter classes, like RmiRemoteServer, are used to provide such functionality. Default is to support duplex mode.

Author:
serbo

Constructor Summary
RemoteServer(IDevTree tree)
          Creates a new instance of RemoteServer
RemoteServer(IDevTree tree, boolean duplex)
           
 
Method Summary
 void close()
          Disconnect servants for all client, server and release all allocated resources.
 AidaTreeServant connectDuplex(AidaTreeClient client)
          connect/disconnect methods for TreeClient that does support "Duplex" Mode.
 AidaTreeServant connectNonDuplex(String clientID)
          connect/disconnect methods for TreeClient that does not support "Duplex" Mode.
 boolean disconnectDuplex(AidaTreeClient client)
           
 boolean disconnectNonDuplex(String clientID)
           
 boolean supportDuplexMode()
          Returns "true" if this TreeServer/TreeServant implementation support "Duplex Mode".
 String treeName()
          Return the name of the ITree it is connected to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteServer

public RemoteServer(IDevTree tree)
Creates a new instance of RemoteServer


RemoteServer

public RemoteServer(IDevTree tree,
                    boolean duplex)
Method Detail

close

public void close()
Disconnect servants for all client, server and release all allocated resources. RemoteServer does not function after that


connectDuplex

public AidaTreeServant connectDuplex(AidaTreeClient client)
Description copied from interface: AidaTreeServer
connect/disconnect methods for TreeClient that does support "Duplex" Mode. Reference to instance of TreeClient serves also as a unique client ID.

Specified by:
connectDuplex in interface AidaTreeServer

connectNonDuplex

public AidaTreeServant connectNonDuplex(String clientID)
Description copied from interface: AidaTreeServer
connect/disconnect methods for TreeClient that does not support "Duplex" Mode. TreeClient has to provide a unique "clientID" to TreeServer. If "clientID" is not unique, TreeServer changes it, so TreeClient must check "newClientID", returned by TreeServer.

Specified by:
connectNonDuplex in interface AidaTreeServer

disconnectDuplex

public boolean disconnectDuplex(AidaTreeClient client)
Specified by:
disconnectDuplex in interface AidaTreeServer

disconnectNonDuplex

public boolean disconnectNonDuplex(String clientID)
Specified by:
disconnectNonDuplex in interface AidaTreeServer

supportDuplexMode

public boolean supportDuplexMode()
Description copied from interface: AidaTreeServer
Returns "true" if this TreeServer/TreeServant implementation support "Duplex Mode".

Specified by:
supportDuplexMode in interface AidaTreeServer

treeName

public String treeName()
Description copied from interface: AidaTreeServer
Return the name of the ITree it is connected to.

Specified by:
treeName in interface AidaTreeServer

FreeHEP API
Version v1.2.2

Copyright © 2000-2003 FreeHEP, All Rights Reserved.