Package org.apache.axis
Class AxisEngine
java.lang.Object
org.apache.axis.handlers.BasicHandler
org.apache.axis.AxisEngine
- All Implemented Interfaces:
Serializable,Handler
- Direct Known Subclasses:
AxisClient,AxisServer
An
AxisEngine is 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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanHas the user changed the password yet? True if they have.protected ClassCacheJava class cache.protected EngineConfigurationOur go-to guy for configuration...static final Stringstatic final Stringstatic final Stringstatic final Stringprotected static org.apache.commons.logging.LogTheLogfor all message logging.static final Stringstatic final Stringstatic final Stringstatic final StringCompliance with WS-I Basic Profile.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringSet 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 final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected booleanShould 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
ConstructorsConstructorDescriptionAxisEngine(EngineConfiguration config) Construct an AxisEngine using the specified engine configuration. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddActorURI(String uri) Add an actor by uri that will hold for the entire engine.voidcleanup()Cleanup routine removes application scoped objects.Get a list of actor URIs that hold for the entire engine.Get theSessionobject associated with the application session.Get theClassCacheassociated with this engine.abstract AxisEngineClient engine access.Get theEngineConfigurationused throughout thisAxisEngineinstance.static MessageContextGet the active message context.Get the global requestHandler.Get the global responesHandler.getHandler(String name) Get theHandlerfor a particular local name.getService(String name) Get theSOAPServicefor a particular local name.getTransport(String name) Get theHandlerthat implements the transport for a local name.Get theTypeMappingRegistryfor this axis engine.booleanDiscover if thisAxisEnginehas a safe password.voidinit()Initialize the engine.static voidnormaliseOptions(Handler handler) Normalise the engine's options.void(Re-)load the global options from the registry.voidremoveActorURI(String uri) Remove an actor by uri that will hold for the entire engine.voidWrite out our engine configuration.voidSet the administration password.protected static voidSet 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 Details
-
log
protected static org.apache.commons.logging.Log logTheLogfor all message logging. -
PROP_XML_DECL
- See Also:
-
PROP_DEBUG_LEVEL
- See Also:
-
PROP_DEBUG_FILE
- See Also:
-
PROP_DOMULTIREFS
- See Also:
-
PROP_DISABLE_PRETTY_XML
- See Also:
-
PROP_ENABLE_NAMESPACE_PREFIX_OPTIMIZATION
- See Also:
-
PROP_PASSWORD
- See Also:
-
PROP_SYNC_CONFIG
- See Also:
-
PROP_SEND_XSI
- See Also:
-
PROP_ATTACHMENT_DIR
- See Also:
-
PROP_ATTACHMENT_IMPLEMENTATION
- See Also:
-
PROP_ATTACHMENT_CLEANUP
- See Also:
-
PROP_DEFAULT_CONFIG_CLASS
- See Also:
-
PROP_SOAP_VERSION
- See Also:
-
PROP_SOAP_ALLOWED_VERSION
- See Also:
-
PROP_TWOD_ARRAY_ENCODING
- See Also:
-
PROP_XML_ENCODING
- See Also:
-
PROP_XML_REUSE_SAX_PARSERS
- See Also:
-
PROP_BYTE_BUFFER_BACKING
- See Also:
-
PROP_BYTE_BUFFER_CACHE_INCREMENT
- See Also:
-
PROP_BYTE_BUFFER_RESIDENT_MAX_SIZE
- See Also:
-
PROP_BYTE_BUFFER_WORK_BUFFER_SIZE
- See Also:
-
PROP_EMIT_ALL_TYPES
- See Also:
-
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:
-
PROP_BP10_COMPLIANCE
Compliance with WS-I Basic Profile.- See Also:
-
DEFAULT_ATTACHMENT_IMPL
- See Also:
-
ENV_ATTACHMENT_DIR
- See Also:
-
ENV_SERVLET_REALPATH
- See Also:
-
ENV_SERVLET_CONTEXT
- See Also:
-
config
Our go-to guy for configuration... -
_hasSafePassword
protected boolean _hasSafePasswordHas the user changed the password yet? True if they have. -
shouldSaveConfig
protected boolean shouldSaveConfigShould we save the engine config each time we modify it? True if we should. -
classCache
Java class cache.
-
-
Constructor Details
-
AxisEngine
Construct an AxisEngine using the specified engine configuration.- Parameters:
config- the EngineConfiguration for this engine
-
-
Method Details
-
setCurrentMessageContext
Set the active message context.- Parameters:
mc- - the new active message context.
-
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
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
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
Get theHandlerfor a particular local name.- Parameters:
name- the local name of the request type- Returns:
- the
Handlerfor this request type - Throws:
AxisFault
-
getService
Get theSOAPServicefor a particular local name.- Parameters:
name- the local name of the request type- Returns:
- the
SOAPServicefor this request type - Throws:
AxisFault
-
getTransport
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
Get theTypeMappingRegistryfor this axis engine.- Returns:
- the
TypeMappingRegistryif possible, or null if there is any error resolving it
-
getGlobalRequest
Get the global requestHandler.- Returns:
- the
Handlerused for global requests - Throws:
ConfigurationException
-
getGlobalResponse
Get the global responesHandler.- Returns:
- the
Handlerused for global responses - Throws:
ConfigurationException
-
getActorURIs
Get a list of actor URIs that hold for the entire engine.- Returns:
- an
ArrayListof all actor URIs asStrings
-
addActorURI
Add an actor by uri that will hold for the entire engine.- Parameters:
uri- aStringgiving the uri of the actor to add
-
removeActorURI
Remove an actor by uri that will hold for the entire engine.- Parameters:
uri- aStringgiving the uri of the actor to remove
-
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
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
(Re-)load the global options from the registry.- Throws:
ConfigurationException
-
getApplicationSession
Get theSessionobject associated with the application session.- Returns:
- a
Sessionscoped to the application
-
getClassCache
Get theClassCacheassociated with this engine.- Returns:
- the class cache
-