com.gridsystems.innergrid.api
Class ClientApiProxy

java.lang.Object
  extended by org.apache.axis.transport.http.HTTPConstants
      extended by com.gridsystems.innergrid.api.ClientApiProxy
All Implemented Interfaces:
java.lang.reflect.InvocationHandler

public class ClientApiProxy
extends org.apache.axis.transport.http.HTTPConstants
implements java.lang.reflect.InvocationHandler

Dynamic proxy InvocationHandler class.

This class wraps a Stub and Connection objects. Each time a method is invoked on a dynamic proxy using this invocation handler, the Connection is used to configure the Stub, control call retries, and manage exceptions.

Author:
Rodrigo Ruiz

Field Summary
 
Fields inherited from class org.apache.axis.transport.http.HTTPConstants
COMPRESSION_GZIP, HEADER_ACCEPT, HEADER_ACCEPT_APPL_SOAP, HEADER_ACCEPT_APPLICATION_DIME, HEADER_ACCEPT_ENCODING, HEADER_ACCEPT_MULTIPART_RELATED, HEADER_ACCEPT_TEXT_ALL, HEADER_AUTHORIZATION, HEADER_CACHE_CONTROL, HEADER_CACHE_CONTROL_NOCACHE, HEADER_CONNECTION, HEADER_CONNECTION_CLOSE, HEADER_CONNECTION_KEEPALIVE, HEADER_CONTENT_DESCRIPTION, HEADER_CONTENT_ENCODING, HEADER_CONTENT_ID, HEADER_CONTENT_LENGTH, HEADER_CONTENT_LOCATION, HEADER_CONTENT_TRANSFER_ENCODING, HEADER_CONTENT_TYPE, HEADER_CONTENT_TYPE_JMS, HEADER_COOKIE, HEADER_COOKIE2, HEADER_DEFAULT_CHAR_ENCODING, HEADER_EXPECT, HEADER_EXPECT_100_Continue, HEADER_HOST, HEADER_LOCATION, HEADER_POST, HEADER_PRAGMA, HEADER_PROTOCOL_10, HEADER_PROTOCOL_11, HEADER_PROTOCOL_V10, HEADER_PROTOCOL_V11, HEADER_PROXY_AUTHORIZATION, HEADER_SET_COOKIE, HEADER_SET_COOKIE2, HEADER_SOAP_ACTION, HEADER_TRANSFER_ENCODING, HEADER_TRANSFER_ENCODING_CHUNKED, HEADER_USER_AGENT, MC_ACCEPT_GZIP, MC_GZIP_REQUEST, MC_HTTP_SERVLET, MC_HTTP_SERVLETLOCATION, MC_HTTP_SERVLETPATHINFO, MC_HTTP_SERVLETREQUEST, MC_HTTP_SERVLETRESPONSE, MC_HTTP_SOAPACTION, MC_HTTP_STATUS_CODE, MC_HTTP_STATUS_MESSAGE, PLUGIN_ENABLE_LIST, PLUGIN_ENGINE, PLUGIN_EXCEPTION_LOG, PLUGIN_IS_DEVELOPMENT, PLUGIN_LOG, PLUGIN_NAME, PLUGIN_SERVICE_NAME, PLUGIN_WRITER, REQUEST_HEADERS, RESPONSE_HEADERS
 
Method Summary
 Connection getConnection()
          Gets the connection.
static void init()
          Initialises this class.
 java.lang.Object invoke(java.lang.Object o, java.lang.reflect.Method method, java.lang.Object[] args)
          Handle a method invocation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

invoke

public java.lang.Object invoke(java.lang.Object o,
                               java.lang.reflect.Method method,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
Handle a method invocation.

Specified by:
invoke in interface java.lang.reflect.InvocationHandler
Parameters:
o - the object to invoke relative to
method - the Method to invoke
args - the arguments to the method
Returns:
the result of the method
Throws:
java.lang.Throwable - if anything went wrong in method dispatching or the execution of the method itself

getConnection

public Connection getConnection()
Gets the connection.

Returns:
The connection

init

public static void init()
Initialises this class.

This method does not really do anything. Initialisation is performed in a static anonymous block, and only once. This method is a hook to allow programmers to load and initialise this class before using it.



Copyright © 2007-2008 Grid Systems, S.A.. All Rights Reserved.