electric.registry.local
Class LocalRegistry

java.lang.Object
  extended byelectric.registry.local.LocalRegistry
All Implemented Interfaces:
IEXMLLoggingConstants, IGLUELoggingConstants, ILoggingConstants, IRegistry, IWSDLConstants

public class LocalRegistry
extends java.lang.Object
implements IRegistry, IWSDLConstants, IGLUELoggingConstants

LocalRegistry allows binding to a service published in the same jvm as the caller, but whose implementation is loaded from a different classloader.

For example, for a method: hireNewEmployee( EmployeeInfo info ) although there may be an "EmployeeInfo" class on both sides of the call, direct invocation is not possible if EmployeeInfo has been loaded by different classloaders. Converting to SOAP and back avoids the problem, at the expense of serializing and deserializing the call. It is still possible to optimize away any network traffic by using the "soaplocal" transport.

In certain special cases (where the EmployeeInfo was loaded by a classloader that is an ancestor to the classloaders on both the client and service sides) a direct call is possible.

Author:
webMethods
See Also:
SOAPLocalTransport

Field Summary
 
Fields inherited from interface electric.wsdl.IWSDLConstants
ADDRESS, BINDING, DEFINITIONS, DESCRIPTION, DOCUMENT, DOCUMENTATION, ELEMENT, ENCODED, ENCODING_STYLE, ENDPOINT, FAULT, FAULT_DETAIL, GET, GETPOST, HTTP, INPUT, LITERAL, LOCATION, MESSAGE, METHOD_NAMESPACE, MIME, NAME, NAMESPACE, OPERATION, OUTPUT, PARAMETER_ORDER, PARAMETERS, PART, PORT, PORT_TYPE, POST, RPC, SERVICE, SOAP, SOAP_ACTION, STYLE, TARGET_NAMESPACE, TARGET_NAMESPACE_PREFIX, TNS, TRANSPORT, TYPE, USE, VERB, WSDL_EXTENSION, WSDL_NAMESPACE, WSDL_PREFIX, WSDL_SOAP_NAMESPACE, WSDL_SOAP_PREFIX, WSDL_SOAP11_NAMESPACE, WSDL_SOAP11_PREFIX, WSDL_SOAP12_NAMESPACE, WSDL_SOAP12_PREFIX
 
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
LocalRegistry()
           
 
Method Summary
 IReference bind(java.lang.String path, java.lang.Class[] interfaces, Context context)
          Return a reference to the object at the specified path.
 boolean publish(java.lang.String path, java.lang.Object object, Context context)
          Publish the object to the specified path.
 boolean unpublish(java.lang.String path)
          Unpublish the object from the specified path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalRegistry

public LocalRegistry()
Method Detail

bind

public IReference bind(java.lang.String path,
                       java.lang.Class[] interfaces,
                       Context context)
                throws RegistryException
Return a reference to the object at the specified path. If the path is not a local path, immediately return null.

Specified by:
bind in interface IRegistry
Parameters:
path - The path.
interfaces - The interfaces.
context - The context
Returns:
A reference to the service.
Throws:
RegistryException

publish

public boolean publish(java.lang.String path,
                       java.lang.Object object,
                       Context context)
                throws RegistryException
Publish the object to the specified path. If the path is not a local path, immediately return false.

Specified by:
publish in interface IRegistry
Parameters:
path -
object -
context -
Returns:
True if the object was published.
Throws:
RegistryException

unpublish

public boolean unpublish(java.lang.String path)
                  throws RegistryException
Unpublish the object from the specified path. If the path is not a local path, immediately return false.

Specified by:
unpublish in interface IRegistry
Parameters:
path -
Returns:
True if the object was unpublished.
Throws:
RegistryException


copyright© 2001-2004 by webMethods All Rights Reserved.