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)
See Also:
Serialized Form

Field Summary
protected  boolean _hasSafePassword
          Has the user changed the password yet?
protected  ConfigurationProvider configProvider
          Our go-to guy for configuration...
protected  WSDDGlobalConfiguration myGlobalConfig
           
protected  DeploymentRegistry myRegistry
           
static java.lang.String PROP_DEBUG_FILE
           
static java.lang.String PROP_DEBUG_LEVEL
           
static java.lang.String PROP_DOMULTIREFS
           
static java.lang.String PROP_PASSWORD
           
static java.lang.String PROP_SEND_XSI
           
static java.lang.String PROP_SYNC_CONFIG
           
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
name, options
 
Constructor Summary
AxisEngine()
          No-arg constructor.
AxisEngine(ConfigurationProvider configProvider)
           
 
Method Summary
 void deployHandler(java.lang.String key, Handler handler)
          Deploy a Handler into our handler registry
 void deployService(java.lang.String key, SOAPService service)
          Deploy a Service into our service registry
 void deployTransport(java.lang.String key, SimpleTargetedChain transport)
          Deploy a Transport
 void deployWSDD(WSDDDocument doc)
          Deploy a WSDD document to this engine.
 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")
abstract  AxisEngine getClientEngine()
          Client engine access An AxisEngine may define another specific AxisEngine to be used by newly created Clients.
static MessageContext getCurrentMessageContext()
          Get the active message context.
 DeploymentRegistry getDeploymentRegistry()
           
 Handler getGlobalRequest()
           
 Handler getGlobalResponse()
           
 Handler getHandler(java.lang.String name)
          (should throw more specific exceptions)
 Handler getService(java.lang.String name)
          (should throw more specific exceptions)
 Handler getTransport(java.lang.String name)
           
 TypeMappingRegistry getTypeMappingRegistry()
           
 boolean hasSafePassword()
           
 void init()
          (re)initialize - What should really go in here???
 void registerTypeMapping(QName qName, java.lang.Class cls, DeserializerFactory deserFactory, Serializer serializer)
          Register a new global type mapping
 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)
           
 void undeployHandler(java.lang.String key)
          Undeploy (remove) a Handler from the handler registry
 void undeployService(java.lang.String key)
          Undeploy (remove) a Service from the handler registry
 void undeployTransport(java.lang.String key)
          Undeploy (remove) a client Transport
 void unregisterTypeMapping(QName qName, java.lang.Class cls)
          Unregister a global type mapping
 
Methods inherited from class org.apache.axis.handlers.BasicHandler
addOption, canHandleBlock, cleanup, generateWSDL, getDeploymentData, getName, getOption, getOptions, invoke, setName, setOption, setOptions, undo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_XML_DECL

public static final java.lang.String PROP_XML_DECL

PROP_DEBUG_LEVEL

public static final java.lang.String PROP_DEBUG_LEVEL

PROP_DEBUG_FILE

public static final java.lang.String PROP_DEBUG_FILE

PROP_DOMULTIREFS

public static final java.lang.String PROP_DOMULTIREFS

PROP_PASSWORD

public static final java.lang.String PROP_PASSWORD

PROP_SYNC_CONFIG

public static final java.lang.String PROP_SYNC_CONFIG

PROP_SEND_XSI

public static final java.lang.String PROP_SEND_XSI

configProvider

protected ConfigurationProvider configProvider
Our go-to guy for configuration...

myRegistry

protected DeploymentRegistry myRegistry

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

myGlobalConfig

protected WSDDGlobalConfiguration myGlobalConfig
Constructor Detail

AxisEngine

public AxisEngine()
No-arg constructor.

AxisEngine

public AxisEngine(ConfigurationProvider configProvider)
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???
Overrides:
init in class BasicHandler

saveConfiguration

public void saveConfiguration()
Write out our engine configuration.

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
(should throw more specific exceptions)

getService

public Handler getService(java.lang.String name)
                   throws AxisFault
(should throw more specific exceptions)

getTransport

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

getDeploymentRegistry

public DeploymentRegistry getDeploymentRegistry()

getTypeMappingRegistry

public TypeMappingRegistry getTypeMappingRegistry()

getGlobalRequest

public Handler getGlobalRequest()
                         throws java.lang.Exception

getGlobalResponse

public Handler getGlobalResponse()
                          throws java.lang.Exception

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.

registerTypeMapping

public void registerTypeMapping(QName qName,
                                java.lang.Class cls,
                                DeserializerFactory deserFactory,
                                Serializer serializer)
Register a new global type mapping

unregisterTypeMapping

public void unregisterTypeMapping(QName qName,
                                  java.lang.Class cls)
Unregister a global type mapping

deployWSDD

public void deployWSDD(WSDDDocument doc)
                throws DeploymentException
Deploy a WSDD document to this engine. This will either add or remove Handlers/Services/Transports/etc. depending on whether the WSDD is a or an
Parameters:
doc - the WSDD document to deploy.
Throws:
DeploymentException - if there is a problem.

deployHandler

public void deployHandler(java.lang.String key,
                          Handler handler)
                   throws DeploymentException
Deploy a Handler into our handler registry

undeployHandler

public void undeployHandler(java.lang.String key)
                     throws DeploymentException
Undeploy (remove) a Handler from the handler registry

deployService

public void deployService(java.lang.String key,
                          SOAPService service)
                   throws DeploymentException
Deploy a Service into our service registry

undeployService

public void undeployService(java.lang.String key)
                     throws DeploymentException
Undeploy (remove) a Service from the handler registry

deployTransport

public void deployTransport(java.lang.String key,
                            SimpleTargetedChain transport)
                     throws DeploymentException
Deploy a Transport

undeployTransport

public void undeployTransport(java.lang.String key)
                       throws DeploymentException
Undeploy (remove) a client Transport

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")


Copyright © 2001 Apache XML Project. All Rights Reserved.