Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.flexstor.common.util
Class AppServerClient  view AppServerClient download AppServerClient.java

java.lang.Object
  extended bycom.flexstor.common.util.AppServerClient
All Implemented Interfaces:
java.lang.Runnable

public class AppServerClient
extends java.lang.Object
implements java.lang.Runnable

This class wraps around the proxy and encapsulates any CORBA specific code and mappings.


Field Summary
private static boolean bRetryRequest
           
private static com.flexstor.common.services.RMIServiceBrokerI broker
           
private static java.lang.String sVersion
           
 
Constructor Summary
AppServerClient()
           
 
Method Summary
static com.flexstor.common.data.ActionResult addQItem(com.flexstor.common.data.ActionData qi)
          Adds the QItem (data wrapper) to the remote service queue.
private static java.lang.String getStackTrace(java.lang.Throwable t)
           
static int getUniqueNo()
           
private  void init()
           
static void initialize(int nMilliSeconds)
          Initializes the remote connection in a new thread, tests after n milliseconds for success, otherwise throws a NamingException
static com.flexstor.common.data.ActionResult invokeImmediately(com.flexstor.common.data.ActionData qi)
          Invokes the service synchronously, i.e.
private static com.flexstor.common.data.ActionResult remoteRequest(boolean bImmediately, com.flexstor.common.data.ActionData qi)
          Performs the remote request.
 void run()
          Perform initialization in a new thread, ignores any exceptions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sVersion

private static java.lang.String sVersion

broker

private static com.flexstor.common.services.RMIServiceBrokerI broker

bRetryRequest

private static boolean bRetryRequest
Constructor Detail

AppServerClient

public AppServerClient()
Method Detail

initialize

public static void initialize(int nMilliSeconds)
                       throws java.rmi.RemoteException
Initializes the remote connection in a new thread, tests after n milliseconds for success, otherwise throws a NamingException


init

private void init()
           throws java.lang.Exception

run

public void run()
Perform initialization in a new thread, ignores any exceptions

Specified by:
run in interface java.lang.Runnable

getUniqueNo

public static int getUniqueNo()
                       throws java.rmi.RemoteException

addQItem

public static com.flexstor.common.data.ActionResult addQItem(com.flexstor.common.data.ActionData qi)
                                                      throws java.rmi.RemoteException
Adds the QItem (data wrapper) to the remote service queue. This is an asynchronous invocation. i.e. the call returns before the service has finished.


invokeImmediately

public static com.flexstor.common.data.ActionResult invokeImmediately(com.flexstor.common.data.ActionData qi)
                                                               throws java.rmi.RemoteException
Invokes the service synchronously, i.e. the call return after the service has completed.


remoteRequest

private static com.flexstor.common.data.ActionResult remoteRequest(boolean bImmediately,
                                                                   com.flexstor.common.data.ActionData qi)
                                                            throws com.flexstor.common.exceptions.AppServiceFailedException
Performs the remote request. Re-throws any exceptions and wraps them into a RemoteException. This avoids code changes in all users of this class.


getStackTrace

private static java.lang.String getStackTrace(java.lang.Throwable t)