org.idoox.wasp
Class Context

java.lang.Object
  extended byorg.idoox.wasp.Context

public class Context
extends java.lang.Object

Context is used to get references to singleton implementations of WSO2 SOA Enablement Server interfaces. See the getInstance method for a list of currently obtainable interfaces.

Since:
4.0
Component:
Core

Field Summary
static java.lang.String CALL_CONTEXT_HOLDER
          Use this in getInstance(java.lang.String) to obtain a holder of a call context.
protected static java.util.Map classReferences
          Hashtable containing the initial references with String keys.
static java.lang.String CONFIGURATOR
          Use this in getInstance(java.lang.String) to obtain configurator.
static java.lang.String CONNECTION_FACTORY
          Use this in getInstance(java.lang.String) to obtain connection factory.
static java.lang.String CONNECTOR
          Use this in getInstance(java.lang.String) to obtain connection implementation.
static java.lang.String DISPATCHER
          Use this in getInstance(java.lang.String) to obtain dispatcher.
protected static boolean doInitialization
          true if the context should perform initialization before looking for the instance.
static java.lang.String ENCODING_REPOSITORY
          Use this in getInstance(java.lang.String) to obtain encoding repository.
static java.lang.String HEADER_HELPER
          Use this in getInstance(java.lang.String) to obtain org.idoox.xmlrpc.header.HeaderHelper instance.
static java.lang.String HEADER_PROCESSOR_REPOSITORY
          Use this in getInstance(java.lang.String) to obtain header processor repository.
static java.lang.String INTERCEPTOR_REPOSITORY
          Use this in getInstance(java.lang.String) to obtain interceptor repository.
static java.lang.String MODULE_REPOSITORY
          Use this in getInstance(java.lang.String) to obtain module repository.
static java.lang.String PACKAGE_REPOSITORY
          use this in getInstance(java.lang.String) to obtain package repository.
static java.lang.String PORT_TYPE_MAPPING_REGISTRY
          Use this in getInstance(java.lang.String) to obtain portType mapping registry.
static java.lang.String PROTOCOL_REPOSITORY
          Use this in getInstance(java.lang.String) to obtain protocol repository.
protected static java.util.Map references
          Hashtable containing the initial references with String keys.
static java.lang.String SERIALIZATION_REPOSITORY
          Use this in getInstance(java.lang.String) to obtain serialization repository.
static java.lang.String SERVICE_MANAGER
          Use this in getInstance(java.lang.String) to obtain service manager.
static java.lang.String SERVICE_STATE_MANAGER
          Use this in getInstance(java.lang.String) to obtain service state manager.
static java.lang.String SERVLET_DATA_HOLDER
           
static java.lang.String SESSION_CONTEXT_HOLDER
          Use this in getInstance(java.lang.String) to obtain a holder of a session context.
static java.lang.String TRANSPORT_REPOSITORY
          Use this in getInstance(java.lang.String) to obtain transport repository.
static java.lang.String WASP
          Use this in getInstance(java.lang.String) to obtain old (WASP 4.0) implementation.
static java.lang.String WASP_CONFIGURATION
          Use this in getInstance(java.lang.String) to obtain WSO2 SOA Enablement Server configuration.
static java.lang.String WASP_NEW
          Use this in getInstance(java.lang.String) to obtain WSO2 SOA Enablement Server implementation.
static java.lang.String WEBSERVICE_CONTEXT_HOLDER
          Use this in getInstance(java.lang.String) to obtain a holder of a web service context.
static java.lang.String WEBSERVICE_LOOKUP
          Use this in getInstance(java.lang.String) to obtain web service lookup.
static java.lang.String WS_CONTEXT_HOLDER
          Use this in getInstance(java.lang.String) to obtain a holder of a ws context.
static java.lang.String WSDL_REPOSITORY
          Use this in getInstance(java.lang.String) to obtain org.idoox.wasp.wsdl.WSDLRepository instance.
static java.lang.String XMLTOKENIZER_FACTORY
          Use this to get TokenizerFactory.
static java.lang.String XMLTOKENWRITER_FACTORY
          Use this to get TokenizerFactory.
 
Constructor Summary
Context()
           
 
Method Summary
static void destroy()
          Called upon WSO2 SOA Enablement Server destroy all registered instances.
static void doInitialization(boolean doIt)
          Sets whether or not to do initialization.
static java.lang.Object getInstance(java.lang.Class interfaceClass)
          Returns instance of given interface.
static java.lang.Object getInstance(java.lang.String name)
          Returns instance of given interface.
static boolean isRegistered(java.lang.Class interfaceClass)
          Returns true if the interfaceClass has been registered within the context.
static boolean isRegistered(java.lang.String name)
          Returns true if given name is registered.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

references

protected static java.util.Map references
Hashtable containing the initial references with String keys.

Since:
4.0

classReferences

protected static java.util.Map classReferences
Hashtable containing the initial references with String keys. This map can contain only a subset of references, because it is being used and filled in the getInstance(Class) method only.

Since:
4.6.1

doInitialization

protected static boolean doInitialization
true if the context should perform initialization before looking for the instance. On client, the initialization means to load the config file. On server, this variable is cleared by the server during the server's initialization. As a result, the client or a web service do not need to perform any initialization steps to use the initial references.


XMLTOKENIZER_FACTORY

public static final java.lang.String XMLTOKENIZER_FACTORY
Use this to get TokenizerFactory.

See Also:
Constant Field Values

XMLTOKENWRITER_FACTORY

public static final java.lang.String XMLTOKENWRITER_FACTORY
Use this to get TokenizerFactory.

See Also:
Constant Field Values

CALL_CONTEXT_HOLDER

public static final java.lang.String CALL_CONTEXT_HOLDER
Use this in getInstance(java.lang.String) to obtain a holder of a call context.

See Also:
Constant Field Values

WS_CONTEXT_HOLDER

public static final java.lang.String WS_CONTEXT_HOLDER
Use this in getInstance(java.lang.String) to obtain a holder of a ws context.

See Also:
Constant Field Values

SERVLET_DATA_HOLDER

public static final java.lang.String SERVLET_DATA_HOLDER
See Also:
Constant Field Values

WEBSERVICE_CONTEXT_HOLDER

public static final java.lang.String WEBSERVICE_CONTEXT_HOLDER
Use this in getInstance(java.lang.String) to obtain a holder of a web service context.

See Also:
Constant Field Values

SESSION_CONTEXT_HOLDER

public static final java.lang.String SESSION_CONTEXT_HOLDER
Use this in getInstance(java.lang.String) to obtain a holder of a session context.

See Also:
Constant Field Values

CONFIGURATOR

public static final java.lang.String CONFIGURATOR
Use this in getInstance(java.lang.String) to obtain configurator.

See Also:
Constant Field Values

MODULE_REPOSITORY

public static final java.lang.String MODULE_REPOSITORY
Use this in getInstance(java.lang.String) to obtain module repository.

See Also:
Constant Field Values

ENCODING_REPOSITORY

public static final java.lang.String ENCODING_REPOSITORY
Use this in getInstance(java.lang.String) to obtain encoding repository.

See Also:
Constant Field Values

HEADER_PROCESSOR_REPOSITORY

public static final java.lang.String HEADER_PROCESSOR_REPOSITORY
Use this in getInstance(java.lang.String) to obtain header processor repository.

See Also:
Constant Field Values

PROTOCOL_REPOSITORY

public static final java.lang.String PROTOCOL_REPOSITORY
Use this in getInstance(java.lang.String) to obtain protocol repository.

See Also:
Constant Field Values

SERIALIZATION_REPOSITORY

public static final java.lang.String SERIALIZATION_REPOSITORY
Use this in getInstance(java.lang.String) to obtain serialization repository.

See Also:
Constant Field Values

CONNECTION_FACTORY

public static final java.lang.String CONNECTION_FACTORY
Use this in getInstance(java.lang.String) to obtain connection factory.

See Also:
Constant Field Values

TRANSPORT_REPOSITORY

public static final java.lang.String TRANSPORT_REPOSITORY
Use this in getInstance(java.lang.String) to obtain transport repository.

See Also:
Constant Field Values

INTERCEPTOR_REPOSITORY

public static final java.lang.String INTERCEPTOR_REPOSITORY
Use this in getInstance(java.lang.String) to obtain interceptor repository.

See Also:
Constant Field Values

WEBSERVICE_LOOKUP

public static final java.lang.String WEBSERVICE_LOOKUP
Use this in getInstance(java.lang.String) to obtain web service lookup.

See Also:
Constant Field Values

WASP

public static final java.lang.String WASP
Use this in getInstance(java.lang.String) to obtain old (WASP 4.0) implementation.

See Also:
Constant Field Values

WASP_NEW

public static final java.lang.String WASP_NEW
Use this in getInstance(java.lang.String) to obtain WSO2 SOA Enablement Server implementation.

See Also:
Constant Field Values

CONNECTOR

public static final java.lang.String CONNECTOR
Use this in getInstance(java.lang.String) to obtain connection implementation.

See Also:
Constant Field Values

PACKAGE_REPOSITORY

public static final java.lang.String PACKAGE_REPOSITORY
use this in getInstance(java.lang.String) to obtain package repository.

See Also:
Constant Field Values

SERVICE_STATE_MANAGER

public static final java.lang.String SERVICE_STATE_MANAGER
Use this in getInstance(java.lang.String) to obtain service state manager.

See Also:
Constant Field Values

SERVICE_MANAGER

public static final java.lang.String SERVICE_MANAGER
Use this in getInstance(java.lang.String) to obtain service manager.

See Also:
Constant Field Values

DISPATCHER

public static final java.lang.String DISPATCHER
Use this in getInstance(java.lang.String) to obtain dispatcher.

See Also:
Constant Field Values

HEADER_HELPER

public static final java.lang.String HEADER_HELPER
Use this in getInstance(java.lang.String) to obtain org.idoox.xmlrpc.header.HeaderHelper instance.

See Also:
Constant Field Values

WSDL_REPOSITORY

public static final java.lang.String WSDL_REPOSITORY
Use this in getInstance(java.lang.String) to obtain org.idoox.wasp.wsdl.WSDLRepository instance.

See Also:
Constant Field Values

PORT_TYPE_MAPPING_REGISTRY

public static final java.lang.String PORT_TYPE_MAPPING_REGISTRY
Use this in getInstance(java.lang.String) to obtain portType mapping registry.

See Also:
Constant Field Values

WASP_CONFIGURATION

public static final java.lang.String WASP_CONFIGURATION
Use this in getInstance(java.lang.String) to obtain WSO2 SOA Enablement Server configuration.

See Also:
Constant Field Values
Constructor Detail

Context

public Context()
Method Detail

getInstance

public static java.lang.Object getInstance(java.lang.String name)
                                    throws InstanceNotFoundException
Returns instance of given interface. The interface is specified by it's fully qualified name.

Parameters:
name - one of the defined instance
Returns:
the given instance
Throws:
InstanceNotFoundException - if the instance has not been found

isRegistered

public static boolean isRegistered(java.lang.String name)
Returns true if given name is registered.

Parameters:
name - see getInstance(java.lang.String) for possible values
Returns:
true if given name is known, false otherwise

getInstance

public static java.lang.Object getInstance(java.lang.Class interfaceClass)
                                    throws InstanceNotFoundException
Returns instance of given interface. The interface is specified by it's class. This method is generally faster than the getInstance(String).

Parameters:
interfaceClass - the class of the interface
Returns:
the given instance
Throws:
InstanceNotFoundException - if the instance has not been found

isRegistered

public static boolean isRegistered(java.lang.Class interfaceClass)
Returns true if the interfaceClass has been registered within the context.

Parameters:
interfaceClass - the class of the interface
Returns:
true if given name is known, false otherwise

doInitialization

public static void doInitialization(boolean doIt)
Sets whether or not to do initialization. Default value is true.

Parameters:
doIt - if true context will do initialization before returning from getInstance(java.lang.String) otherwise not

destroy

public static void destroy()
Called upon WSO2 SOA Enablement Server destroy all registered instances.