Package org.apache.axis
Class AxisEngine
- java.lang.Object
-
- org.apache.axis.handlers.BasicHandler
-
- org.apache.axis.AxisEngine
-
- All Implemented Interfaces:
java.io.Serializable,Handler
- Direct Known Subclasses:
AxisClient,AxisServer
public abstract class AxisEngine extends BasicHandler
AnAxisEngineis the base class for AxisClient and AxisServer. Handles common functionality like dealing with the handler/service registries and loading properties.- Author:
- Glen Daniels (gdaniels@apache.org), Glyn Normington (glyn@apache.org)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean_hasSafePasswordHas the user changed the password yet? True if they have.protected ClassCacheclassCacheJava class cache.protected EngineConfigurationconfigOur go-to guy for configuration...static java.lang.StringDEFAULT_ATTACHMENT_IMPLstatic java.lang.StringENV_ATTACHMENT_DIRstatic java.lang.StringENV_SERVLET_CONTEXTstatic java.lang.StringENV_SERVLET_REALPATHprotected static org.apache.commons.logging.LoglogTheLogfor all message logging.static java.lang.StringPROP_ATTACHMENT_CLEANUPstatic java.lang.StringPROP_ATTACHMENT_DIRstatic java.lang.StringPROP_ATTACHMENT_IMPLEMENTATIONstatic java.lang.StringPROP_BP10_COMPLIANCECompliance with WS-I Basic Profile.static java.lang.StringPROP_BYTE_BUFFER_BACKINGstatic java.lang.StringPROP_BYTE_BUFFER_CACHE_INCREMENTstatic java.lang.StringPROP_BYTE_BUFFER_RESIDENT_MAX_SIZEstatic java.lang.StringPROP_BYTE_BUFFER_WORK_BUFFER_SIZEstatic java.lang.StringPROP_DEBUG_FILEstatic java.lang.StringPROP_DEBUG_LEVELstatic java.lang.StringPROP_DEFAULT_CONFIG_CLASSstatic java.lang.StringPROP_DISABLE_PRETTY_XMLstatic java.lang.StringPROP_DOMULTIREFSstatic java.lang.StringPROP_DOTNET_SOAPENC_FIXSet this property to 'true' when you want Axis to avoid soap encoded types to work around a .NET problem where it wont accept soap encoded types for a (soap encoded!) array.static java.lang.StringPROP_EMIT_ALL_TYPESstatic java.lang.StringPROP_ENABLE_NAMESPACE_PREFIX_OPTIMIZATIONstatic java.lang.StringPROP_PASSWORDstatic java.lang.StringPROP_SEND_XSIstatic java.lang.StringPROP_SOAP_ALLOWED_VERSIONstatic java.lang.StringPROP_SOAP_VERSIONstatic java.lang.StringPROP_SYNC_CONFIGstatic java.lang.StringPROP_TWOD_ARRAY_ENCODINGstatic java.lang.StringPROP_XML_DECLstatic java.lang.StringPROP_XML_ENCODINGstatic java.lang.StringPROP_XML_REUSE_SAX_PARSERSprotected booleanshouldSaveConfigShould we save the engine config each time we modify it? True if we should.-
Fields inherited from class org.apache.axis.handlers.BasicHandler
makeLockable, name, options
-
-
Constructor Summary
Constructors Constructor Description AxisEngine(EngineConfiguration config)Construct an AxisEngine using the specified engine configuration.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddActorURI(java.lang.String uri)Add an actor by uri that will hold for the entire engine.voidcleanup()Cleanup routine removes application scoped objects.java.util.ArrayListgetActorURIs()Get a list of actor URIs that hold for the entire engine.SessiongetApplicationSession()Get theSessionobject associated with the application session.ClassCachegetClassCache()Get theClassCacheassociated with this engine.abstract AxisEnginegetClientEngine()Client engine access.EngineConfigurationgetConfig()Get theEngineConfigurationused throughout thisAxisEngineinstance.static MessageContextgetCurrentMessageContext()Get the active message context.HandlergetGlobalRequest()Get the global requestHandler.HandlergetGlobalResponse()Get the global responesHandler.HandlergetHandler(java.lang.String name)Get theHandlerfor a particular local name.SOAPServicegetService(java.lang.String name)Get theSOAPServicefor a particular local name.HandlergetTransport(java.lang.String name)Get theHandlerthat implements the transport for a local name.TypeMappingRegistrygetTypeMappingRegistry()Get theTypeMappingRegistryfor this axis engine.booleanhasSafePassword()Discover if thisAxisEnginehas a safe password.voidinit()Initialize the engine.static voidnormaliseOptions(Handler handler)Normalise the engine's options.voidrefreshGlobalOptions()(Re-)load the global options from the registry.voidremoveActorURI(java.lang.String uri)Remove an actor by uri that will hold for the entire engine.voidsaveConfiguration()Write out our engine configuration.voidsetAdminPassword(java.lang.String pw)Set the administration password.protected static voidsetCurrentMessageContext(MessageContext mc)Set the active message context.voidsetShouldSaveConfig(boolean shouldSaveConfig)Set the flag that controls if the configuration should be saved.-
Methods inherited from class org.apache.axis.handlers.BasicHandler
canHandleBlock, generateWSDL, getDeploymentData, getName, getOption, getOptions, getUnderstoodHeaders, initHashtable, onFault, setName, setOption, setOptionDefault, setOptions, setOptionsLockable
-
-
-
-
Field Detail
-
log
protected static org.apache.commons.logging.Log log
TheLogfor all message logging.
-
PROP_XML_DECL
public static final java.lang.String PROP_XML_DECL
- See Also:
- Constant Field Values
-
PROP_DEBUG_LEVEL
public static final java.lang.String PROP_DEBUG_LEVEL
- See Also:
- Constant Field Values
-
PROP_DEBUG_FILE
public static final java.lang.String PROP_DEBUG_FILE
- See Also:
- Constant Field Values
-
PROP_DOMULTIREFS
public static final java.lang.String PROP_DOMULTIREFS
- See Also:
- Constant Field Values
-
PROP_DISABLE_PRETTY_XML
public static final java.lang.String PROP_DISABLE_PRETTY_XML
- See Also:
- Constant Field Values
-
PROP_ENABLE_NAMESPACE_PREFIX_OPTIMIZATION
public static final java.lang.String PROP_ENABLE_NAMESPACE_PREFIX_OPTIMIZATION
- See Also:
- Constant Field Values
-
PROP_PASSWORD
public static final java.lang.String PROP_PASSWORD
- See Also:
- Constant Field Values
-
PROP_SYNC_CONFIG
public static final java.lang.String PROP_SYNC_CONFIG
- See Also:
- Constant Field Values
-
PROP_SEND_XSI
public static final java.lang.String PROP_SEND_XSI
- See Also:
- Constant Field Values
-
PROP_ATTACHMENT_DIR
public static final java.lang.String PROP_ATTACHMENT_DIR
- See Also:
- Constant Field Values
-
PROP_ATTACHMENT_IMPLEMENTATION
public static final java.lang.String PROP_ATTACHMENT_IMPLEMENTATION
- See Also:
- Constant Field Values
-
PROP_ATTACHMENT_CLEANUP
public static final java.lang.String PROP_ATTACHMENT_CLEANUP
- See Also:
- Constant Field Values
-
PROP_DEFAULT_CONFIG_CLASS
public static final java.lang.String PROP_DEFAULT_CONFIG_CLASS
- See Also:
- Constant Field Values
-
PROP_SOAP_VERSION
public static final java.lang.String PROP_SOAP_VERSION
- See Also:
- Constant Field Values
-
PROP_SOAP_ALLOWED_VERSION
public static final java.lang.String PROP_SOAP_ALLOWED_VERSION
- See Also:
- Constant Field Values
-
PROP_TWOD_ARRAY_ENCODING
public static final java.lang.String PROP_TWOD_ARRAY_ENCODING
- See Also:
- Constant Field Values
-
PROP_XML_ENCODING
public static final java.lang.String PROP_XML_ENCODING
- See Also:
- Constant Field Values
-
PROP_XML_REUSE_SAX_PARSERS
public static final java.lang.String PROP_XML_REUSE_SAX_PARSERS
- See Also:
- Constant Field Values
-
PROP_BYTE_BUFFER_BACKING
public static final java.lang.String PROP_BYTE_BUFFER_BACKING
- See Also:
- Constant Field Values
-
PROP_BYTE_BUFFER_CACHE_INCREMENT
public static final java.lang.String PROP_BYTE_BUFFER_CACHE_INCREMENT
- See Also:
- Constant Field Values
-
PROP_BYTE_BUFFER_RESIDENT_MAX_SIZE
public static final java.lang.String PROP_BYTE_BUFFER_RESIDENT_MAX_SIZE
- See Also:
- Constant Field Values
-
PROP_BYTE_BUFFER_WORK_BUFFER_SIZE
public static final java.lang.String PROP_BYTE_BUFFER_WORK_BUFFER_SIZE
- See Also:
- Constant Field Values
-
PROP_EMIT_ALL_TYPES
public static final java.lang.String PROP_EMIT_ALL_TYPES
- See Also:
- Constant Field Values
-
PROP_DOTNET_SOAPENC_FIX
public static final java.lang.String PROP_DOTNET_SOAPENC_FIX
Set this property to 'true' when you want Axis to avoid soap encoded types to work around a .NET problem where it wont accept soap encoded types for a (soap encoded!) array.- See Also:
- Constant Field Values
-
PROP_BP10_COMPLIANCE
public static final java.lang.String PROP_BP10_COMPLIANCE
Compliance with WS-I Basic Profile.- See Also:
- Constant Field Values
-
DEFAULT_ATTACHMENT_IMPL
public static final java.lang.String DEFAULT_ATTACHMENT_IMPL
- See Also:
- Constant Field Values
-
ENV_ATTACHMENT_DIR
public static final java.lang.String ENV_ATTACHMENT_DIR
- See Also:
- Constant Field Values
-
ENV_SERVLET_REALPATH
public static final java.lang.String ENV_SERVLET_REALPATH
- See Also:
- Constant Field Values
-
ENV_SERVLET_CONTEXT
public static final java.lang.String ENV_SERVLET_CONTEXT
- See Also:
- Constant Field Values
-
config
protected EngineConfiguration config
Our go-to guy for configuration...
-
_hasSafePassword
protected boolean _hasSafePassword
Has the user changed the password yet? True if they have.
-
shouldSaveConfig
protected boolean shouldSaveConfig
Should we save the engine config each time we modify it? True if we should.
-
classCache
protected transient ClassCache classCache
Java class cache.
-
-
Constructor Detail
-
AxisEngine
public AxisEngine(EngineConfiguration config)
Construct an AxisEngine using the specified engine configuration.- Parameters:
config- the EngineConfiguration for this engine
-
-
Method Detail
-
setCurrentMessageContext
protected static void setCurrentMessageContext(MessageContext mc)
Set the active message context.- Parameters:
mc- - the new active message context.
-
getCurrentMessageContext
public static MessageContext getCurrentMessageContext()
Get the active message context.- Returns:
- the current active message context
-
init
public void init()
Initialize the engine. Multiple calls will (may?) return the engine to the intialized state.- Specified by:
initin interfaceHandler- Overrides:
initin classBasicHandler
-
cleanup
public void cleanup()
Cleanup routine removes application scoped objects. There is a small risk of this being called more than once so the cleanup should be designed to resist that event.- Specified by:
cleanupin interfaceHandler- Overrides:
cleanupin classBasicHandler
-
saveConfiguration
public void saveConfiguration()
Write out our engine configuration.
-
getConfig
public EngineConfiguration getConfig()
Get theEngineConfigurationused throughout thisAxisEngineinstance.- Returns:
- the engine configuration instance
-
hasSafePassword
public boolean hasSafePassword()
Discover if thisAxisEnginehas a safe password.- Returns:
- true if it is safe, false otherwise
-
setAdminPassword
public void setAdminPassword(java.lang.String pw)
Set the administration password.- Parameters:
pw- the literal value of the password as aString
-
setShouldSaveConfig
public void setShouldSaveConfig(boolean shouldSaveConfig)
Set the flag that controls if the configuration should be saved.- Parameters:
shouldSaveConfig- true if the configuration should be changed, false otherwise
-
getHandler
public Handler getHandler(java.lang.String name) throws AxisFault
Get theHandlerfor a particular local name.- Parameters:
name- the local name of the request type- Returns:
- the
Handlerfor this request type - Throws:
AxisFault
-
getService
public SOAPService getService(java.lang.String name) throws AxisFault
Get theSOAPServicefor a particular local name.- Parameters:
name- the local name of the request type- Returns:
- the
SOAPServicefor this request type - Throws:
AxisFault
-
getTransport
public Handler getTransport(java.lang.String name) throws AxisFault
Get theHandlerthat implements the transport for a local name.- Parameters:
name- the local name to fetch the transport for- Returns:
- a
Handlerfor this local name - Throws:
AxisFault
-
getTypeMappingRegistry
public TypeMappingRegistry getTypeMappingRegistry()
Get theTypeMappingRegistryfor this axis engine.- Returns:
- the
TypeMappingRegistryif possible, or null if there is any error resolving it
-
getGlobalRequest
public Handler getGlobalRequest() throws ConfigurationException
Get the global requestHandler.- Returns:
- the
Handlerused for global requests - Throws:
ConfigurationException
-
getGlobalResponse
public Handler getGlobalResponse() throws ConfigurationException
Get the global responesHandler.- Returns:
- the
Handlerused for global responses - Throws:
ConfigurationException
-
getActorURIs
public java.util.ArrayList getActorURIs()
Get a list of actor URIs that hold for the entire engine.- Returns:
- an
ArrayListof all actor URIs asStrings
-
addActorURI
public void addActorURI(java.lang.String uri)
Add an actor by uri that will hold for the entire engine.- Parameters:
uri- aStringgiving the uri of the actor to add
-
removeActorURI
public void removeActorURI(java.lang.String uri)
Remove an actor by uri that will hold for the entire engine.- Parameters:
uri- aStringgiving the uri of the actor to remove
-
getClientEngine
public abstract AxisEngine getClientEngine()
Client engine access.An AxisEngine may define another specific AxisEngine to be used by newly created Clients. For instance, a server may create an AxisClient and allow deployment to it. Then the server's services may access the AxisClient's deployed handlers and transports.
- Returns:
- an
AxisEnginethat is the client engine
-
normaliseOptions
public static void normaliseOptions(Handler handler)
Normalise the engine's options.Convert boolean options from String to Boolean and default any ommitted boolean options to TRUE. Default the admin. password.
- Parameters:
handler- theHandlerto normalise; instances ofAxisEngineget extra data normalised
-
refreshGlobalOptions
public void refreshGlobalOptions() throws ConfigurationException(Re-)load the global options from the registry.- Throws:
ConfigurationException
-
getApplicationSession
public Session getApplicationSession()
Get theSessionobject associated with the application session.- Returns:
- a
Sessionscoped to the application
-
getClassCache
public ClassCache getClassCache()
Get theClassCacheassociated with this engine.- Returns:
- the class cache
-
-