electric.proxy.handler
Class Proxy

java.lang.Object
  extended byelectric.proxy.handler.Proxy
All Implemented Interfaces:
IContextHolder, IEXMLLoggingConstants, IGLUELoggingConstants, ILoggingConstants, java.lang.reflect.InvocationHandler, IProxy
Direct Known Subclasses:
StubImpl

public class Proxy
extends java.lang.Object
implements java.lang.reflect.InvocationHandler, IProxy, IContextHolder, IGLUELoggingConstants

Proxy is an adaptor that allows a dynamic proxy to wrap an IReference. All methods invoked on the proxy are forwarded to the contained IReference, except for those defined in Object and IContextHolder, which are handled specially.

Author:
webMethods

Field Summary
protected  Context context
           
protected  IReference reference
           
 
Fields inherited from interface electric.glue.IGLUELoggingConstants
CLUSTER_DEBUG_EVENT, CLUSTER_EVENT, CONSOLE_DEBUG_EVENT, DEPLOY_EVENT, DETECTORS_EVENT, HTTP_EVENT, JMS_EVENT, REBINDING_EVENT, SECURITY_DEBUG_EVENT, SECURITY_DETAIL_EVENT, SERVLET_EVENT, SOAP_EVENT
 
Fields inherited from interface electric.xml.IEXMLLoggingConstants
MAPPING_EVENT, SCHEMA_EVENT
 
Fields inherited from interface electric.util.log.ILoggingConstants
CLASSLOADER_EVENT, COMMAND_EVENT, COMMENT_EVENT, CONFIG_EVENT, DEBUG_EVENT, ELECTRIC_LOGGING_PROPERTY, ERROR_EVENT, EXCEPTION_EVENT, FILE_EVENT, LICENSE_EVENT, RESOURCES_EVENT, SECURITY_EVENT, SHUTDOWN_EVENT, SOURCE_EVENT, SQL_EVENT, STARTUP_EVENT, WARNING_EVENT
 
Constructor Summary
Proxy()
          Construct a Proxy without an associated IReference.
Proxy(IReference reference)
          Construct a Proxy that wraps the specified IReference.
Proxy(IReference reference, Context context)
          Construct a Proxy that wraps the specified IReference.
 
Method Summary
 Context getContext()
           
 IReference getReference()
          Return the IReference that I use for messaging.
 WSDL getWSDL()
          Return WSDL for the service that I reference.
 java.lang.Object invoke(java.lang.reflect.Method method, java.lang.Object[] args)
          Invoke the operation associated with a particular method, using the specified arguments.
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
          Invoke the operation associated with a particular method, using the specified arguments.
 java.lang.Object invoke(java.lang.String method, java.lang.Object[] args)
          Invoke the operation associated with a particular method, using the specified arguments.
 java.lang.Object invoke(java.lang.String method, java.lang.Object[] args, java.lang.Class[] argTypes)
          Invoke the operation associated with a particular method, using the specified arguments.
 java.lang.Object invoke(java.lang.String method, java.lang.String[] args)
          Invoke the operation associated with a particular method, using the specified arguments.
 void setContext(Context context)
           
 void setReference(IReference reference)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

reference

protected IReference reference

context

protected Context context
Constructor Detail

Proxy

public Proxy()
Construct a Proxy without an associated IReference.


Proxy

public Proxy(IReference reference)
Construct a Proxy that wraps the specified IReference.

Parameters:
reference -

Proxy

public Proxy(IReference reference,
             Context context)
Construct a Proxy that wraps the specified IReference.

Parameters:
reference -
context -
Method Detail

getContext

public Context getContext()
Specified by:
getContext in interface IContextHolder

setContext

public void setContext(Context context)
Specified by:
setContext in interface IContextHolder
Parameters:
context -

getReference

public IReference getReference()
Description copied from interface: IProxy
Return the IReference that I use for messaging.

Specified by:
getReference in interface IProxy

setReference

public void setReference(IReference reference)
Parameters:
reference -

invoke

public java.lang.Object invoke(java.lang.Object proxy,
                               java.lang.reflect.Method method,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
Invoke the operation associated with a particular method, using the specified arguments.

Specified by:
invoke in interface java.lang.reflect.InvocationHandler
Parameters:
proxy - The proxy.
method - The method to invoke
args - The arguments.
Throws:
java.lang.Throwable - If an exception occurs.

getWSDL

public WSDL getWSDL()
Return WSDL for the service that I reference.

Specified by:
getWSDL in interface IProxy

invoke

public java.lang.Object invoke(java.lang.reflect.Method method,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
Invoke the operation associated with a particular method, using the specified arguments.

Specified by:
invoke in interface IProxy
Parameters:
method - The method to invoke
args - The arguments.
Throws:
java.lang.Throwable - If an exception occurs.

invoke

public java.lang.Object invoke(java.lang.String method,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
Invoke the operation associated with a particular method, using the specified arguments.

Specified by:
invoke in interface IProxy
Parameters:
method - The method to invoke
args - The arguments.
Throws:
java.lang.Throwable - If an exception occurs.

invoke

public java.lang.Object invoke(java.lang.String method,
                               java.lang.Object[] args,
                               java.lang.Class[] argTypes)
                        throws java.lang.Throwable
Invoke the operation associated with a particular method, using the specified arguments.

Specified by:
invoke in interface IProxy
Parameters:
method - The method to invoke
args - The arguments.
argTypes -
Throws:
java.lang.Throwable - If an exception occurs.

invoke

public java.lang.Object invoke(java.lang.String method,
                               java.lang.String[] args)
                        throws java.lang.Throwable
Invoke the operation associated with a particular method, using the specified arguments.

Specified by:
invoke in interface IProxy
Parameters:
method - The method to invoke
args - The arguments.
Throws:
java.lang.Throwable - If an exception occurs.


copyright© 2001-2004 by webMethods All Rights Reserved.