org.lsst.ccs.config.remote.scripts
Class ConfigurationBusClient

java.lang.Object
  extended by org.lsst.ccs.config.remote.scripts.ConfigurationBusClient
All Implemented Interfaces:
Closeable

public class ConfigurationBusClient
extends Object
implements Closeable

operates on Buses and send commands to the configuration service , receives responses

Author:
bamade

Field Summary
static long TIME_OUT
           
 
Constructor Summary
ConfigurationBusClient()
           
ConfigurationBusClient(String serverName, String clientName)
           
 
Method Summary
 void close()
           
 Object invoke(long timeout, String methodName, Object... args)
          Invokes a method remotely on the Configuration service server.
 Object invoke(String methodName, Object... args)
          Invokes a method remotely on the Configuration service server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TIME_OUT

public static long TIME_OUT
Constructor Detail

ConfigurationBusClient

public ConfigurationBusClient(String serverName,
                              String clientName)

ConfigurationBusClient

public ConfigurationBusClient()
Method Detail

invoke

public Object invoke(long timeout,
                     String methodName,
                     Object... args)
              throws Exception
Invokes a method remotely on the Configuration service server. The call is synchronous: it waits for a response or fails on time out

Parameters:
timeout - if negative the command is ssent asynchronously
methodName -
args -
Returns:
the result of the remote call or null is command is asynchronous
Throws:
Exception - can be the result of remote execution or timeout

invoke

public Object invoke(String methodName,
                     Object... args)
              throws Exception
Invokes a method remotely on the Configuration service server. The call is synchronous: it waits for a response or fails on time out (which is of 10 seconds).

Parameters:
methodName -
args -
Returns:
Throws:
Exception - can be the result of remote execution or timeout

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Throws:
IOException


Copyright © 2013 LSST. All Rights Reserved.