org.apache.hivemind.impl
Class ProxyUtils

java.lang.Object
  |
  +--org.apache.hivemind.impl.ProxyUtils

public final class ProxyUtils
extends java.lang.Object

Contains some common code used to create proxies that defer to a service model method for thier service.

Author:
Howard Lewis Ship

Field Summary
static java.lang.String SERVICE_ACCESSOR_METHOD_NAME
           
 
Method Summary
static java.lang.Object createDelegatingProxy(java.lang.String type, ServiceModel serviceModel, java.lang.String delegationMethodName, ServicePoint servicePoint, ShutdownCoordinator shutdownCoordinator)
          Creates a class that implements the service interface.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVICE_ACCESSOR_METHOD_NAME

public static final java.lang.String SERVICE_ACCESSOR_METHOD_NAME
See Also:
Constant Field Values
Method Detail

createDelegatingProxy

public static java.lang.Object createDelegatingProxy(java.lang.String type,
                                                     ServiceModel serviceModel,
                                                     java.lang.String delegationMethodName,
                                                     ServicePoint servicePoint,
                                                     ShutdownCoordinator shutdownCoordinator)
Creates a class that implements the service interface. Implements a private synchronized method, _service(), that constructs the service as needed, and has each service interface method re-invoke on _service(). Adds a toString() method if the service interface does not define toString().