org.apache.axis
Class AxisEngine

java.lang.Object
  |
  +--org.apache.axis.handlers.BasicHandler
        |
        +--org.apache.axis.AxisEngine
All Implemented Interfaces:
Handler, java.io.Serializable
Direct Known Subclasses:
AxisClient, AxisServer

public abstract class AxisEngine
extends BasicHandler

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@macromedia.com), Glyn Normington (glyn@apache.org)
See Also:
Serialized Form

Field Summary
protected  boolean _hasSafePassword
          Has the user changed the password yet?
protected  ClassCache classCache
          Java class cache
protected  EngineConfiguration config
          Our go-to guy for configuration...
static java.lang.String DEFAULT_ATTACHMENT_IMPL
           
static java.lang.String ENV_ATTACHMENT_DIR
           
static java.lang.String ENV_SERVLET_CONTEXT
           
static java.lang.String ENV_SERVLET_REALPATH
           
protected static org.apache.commons.logging.Log log
           
static java.lang.String PROP_ATTACHMENT_CLEANUP
           
static java.lang.String PROP_ATTACHMENT_DIR
           
static java.lang.String PROP_ATTACHMENT_IMPLEMENTATION
           
static java.lang.String PROP_DEBUG_FILE
           
static java.lang.String PROP_DEBUG_LEVEL
           
static java.lang.String PROP_DEFAULT_CONFIG_CLASS
           
static java.lang.String PROP_DOMULTIREFS
           
static java.lang.String PROP_PASSWORD
           
static java.lang.String PROP_SEND_MINIMIZED_ELEMENTS
           
static java.lang.String PROP_SEND_XSI
           
static java.lang.String PROP_SOAP_ALLOWED_VERSION
           
static java.lang.String PROP_SOAP_VERSION
           
static java.lang.String PROP_SYNC_CONFIG
           
static java.lang.String PROP_TWOD_ARRAY_ENCODING
           
static java.lang.String PROP_XML_DECL
           
protected  boolean shouldSaveConfig
          Should we save the engine config each time we modify it?
 
Fields inherited from class org.apache.axis.handlers.BasicHandler
makeLockable, name, options
 
Constructor Summary
AxisEngine(EngineConfiguration config)
          Construct an AxisEngine using the specified engine configuration.
 
Method Summary
 void addActorURI(java.lang.String uri)
           
 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
 java.util.ArrayList getActorURIs()
           
 Session getApplicationSession()
          accessor only, for application session (could call it "engine session" instead, but named with reference to Apache SOAP's notion of "application scope")
 ClassCache getClassCache()
           
abstract  AxisEngine getClientEngine()
          Client engine access An AxisEngine may define another specific AxisEngine to be used by newly created Clients.
 EngineConfiguration getConfig()
           
static MessageContext getCurrentMessageContext()
          Get the active message context.
 Handler getGlobalRequest()
           
 Handler getGlobalResponse()
           
 Handler getHandler(java.lang.String name)
           
 SOAPService getService(java.lang.String name)
           
 Handler getTransport(java.lang.String name)
           
 TypeMappingRegistry getTypeMappingRegistry()
           
 boolean hasSafePassword()
           
 void init()
          (re)initialize - What should really go in here???
static void normaliseOptions(Handler handler)
          Normalise the engine's options.
 void refreshGlobalOptions()
          (Re-)load the global options from the registry.
 void removeActorURI(java.lang.String uri)
           
 void saveConfiguration()
          Write out our engine configuration.
 void setAdminPassword(java.lang.String pw)
           
protected static void setCurrentMessageContext(MessageContext mc)
          Set the active message context.
 void setShouldSaveConfig(boolean shouldSaveConfig)
           
 
Methods inherited from class org.apache.axis.handlers.BasicHandler
canHandleBlock, generateWSDL, getDeploymentData, getName, getOption, getOptions, getUnderstoodHeaders, initHashtable, invoke, onFault, setName, setOption, setOptionDefault, setOptions, setOptionsLockable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.commons.logging.Log log

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_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_SEND_MINIMIZED_ELEMENTS

public static final java.lang.String PROP_SEND_MINIMIZED_ELEMENTS
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?


shouldSaveConfig

protected boolean shouldSaveConfig
Should we save the engine config each time we modify it?


classCache

protected 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()
(re)initialize - What should really go in here???

Specified by:
init in interface Handler
Overrides:
init in class BasicHandler

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:
cleanup in interface Handler
Overrides:
cleanup in class BasicHandler

saveConfiguration

public void saveConfiguration()
Write out our engine configuration.


getConfig

public EngineConfiguration getConfig()

hasSafePassword

public boolean hasSafePassword()

setAdminPassword

public void setAdminPassword(java.lang.String pw)

setShouldSaveConfig

public void setShouldSaveConfig(boolean shouldSaveConfig)

getHandler

public Handler getHandler(java.lang.String name)
                   throws AxisFault
AxisFault

getService

public SOAPService getService(java.lang.String name)
                       throws AxisFault
AxisFault

getTransport

public Handler getTransport(java.lang.String name)
                     throws AxisFault
AxisFault

getTypeMappingRegistry

public TypeMappingRegistry getTypeMappingRegistry()

getGlobalRequest

public Handler getGlobalRequest()
                         throws ConfigurationException
ConfigurationException

getGlobalResponse

public Handler getGlobalResponse()
                          throws ConfigurationException
ConfigurationException

getActorURIs

public java.util.ArrayList getActorURIs()

addActorURI

public void addActorURI(java.lang.String uri)

removeActorURI

public void removeActorURI(java.lang.String uri)

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.


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.


refreshGlobalOptions

public void refreshGlobalOptions()
                          throws ConfigurationException
(Re-)load the global options from the registry.

ConfigurationException

getApplicationSession

public Session getApplicationSession()
accessor only, for application session (could call it "engine session" instead, but named with reference to Apache SOAP's notion of "application scope")


getClassCache

public ClassCache getClassCache()


Copyright © 2003 Apache Web Services Project. All Rights Reserved.