Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.axis.configuration
Class SimpleProvider  view SimpleProvider download SimpleProvider.java

java.lang.Object
  extended byorg.apache.axis.configuration.SimpleProvider
All Implemented Interfaces:
org.apache.axis.EngineConfiguration
Direct Known Subclasses:
BasicClientConfig, BasicServerConfig

public class SimpleProvider
extends java.lang.Object
implements org.apache.axis.EngineConfiguration

A SimpleProvider is an EngineConfiguration which contains a simple HashMap-based registry of Handlers, Transports, and Services. This is for when you want to programatically deploy components which you create. SimpleProvider may also optionally contain a reference to a "default" EngineConfiguration, which will be scanned for components not found in the internal registry. This is handy when you want to start with a base configuration (like the default WSDD) and then quickly add stuff without changing the WSDD document.


Field Summary
(package private)  org.apache.axis.EngineConfiguration defaultConfiguration
          An optional "default" EngineConfiguration
private  org.apache.axis.AxisEngine engine
           
(package private)  java.util.Hashtable globalOptions
          Global configuration stuff
(package private)  org.apache.axis.Handler globalRequest
           
(package private)  org.apache.axis.Handler globalResponse
           
(package private)  java.util.HashMap handlers
          Handler registry
(package private)  java.util.List roles
           
(package private)  java.util.HashMap services
          Service registry
(package private)  org.apache.axis.encoding.TypeMappingRegistry tmr
          Our TypeMappingRegistry
(package private)  java.util.HashMap transports
          Transport registry
 
Fields inherited from interface org.apache.axis.EngineConfiguration
PROPERTY_NAME
 
Constructor Summary
SimpleProvider()
          Default constructor.
SimpleProvider(org.apache.axis.EngineConfiguration defaultConfiguration)
          Constructor which takes an EngineConfiguration which will be used as the default.
SimpleProvider(org.apache.axis.encoding.TypeMappingRegistry typeMappingRegistry)
          Construct a SimpleProvider using the supplied TypeMappingRegistry.
 
Method Summary
 void addRole(java.lang.String role)
          Add a role to the configuration's global list
 void configureEngine(org.apache.axis.AxisEngine engine)
          Configure an AxisEngine.
 void deployService(javax.xml.namespace.QName qname, org.apache.axis.handlers.soap.SOAPService service)
           
 void deployService(java.lang.String name, org.apache.axis.handlers.soap.SOAPService service)
           
 void deployTransport(javax.xml.namespace.QName qname, org.apache.axis.Handler transport)
           
 void deployTransport(java.lang.String name, org.apache.axis.Handler transport)
           
 java.util.Iterator getDeployedServices()
          Get an enumeration of the services deployed to this engine
 java.util.Hashtable getGlobalOptions()
          Returns the global configuration options.
 org.apache.axis.Handler getGlobalRequest()
          Returns a global request handler.
 org.apache.axis.Handler getGlobalResponse()
          Returns a global response handler.
 org.apache.axis.Handler getHandler(javax.xml.namespace.QName qname)
          Retrieve an instance of the named handler.
 java.util.List getRoles()
          Get a list of roles that this engine plays globally.
 org.apache.axis.handlers.soap.SOAPService getService(javax.xml.namespace.QName qname)
          Retrieve an instance of the named service.
 org.apache.axis.handlers.soap.SOAPService getServiceByNamespaceURI(java.lang.String namespace)
          Get a service which has been mapped to a particular namespace
 org.apache.axis.Handler getTransport(javax.xml.namespace.QName qname)
          Retrieve an instance of the named transport.
 org.apache.axis.encoding.TypeMapping getTypeMapping(java.lang.String encodingStyle)
           
 org.apache.axis.encoding.TypeMappingRegistry getTypeMappingRegistry()
          Get our TypeMappingRegistry.
 void removeRole(java.lang.String role)
          Remove a role from the configuration's global list
 void setGlobalOptions(java.util.Hashtable options)
          Set the global options Hashtable
 void setGlobalRequest(org.apache.axis.Handler globalRequest)
          Set the global request Handler
 void setGlobalResponse(org.apache.axis.Handler globalResponse)
          Set the global response Handler
 void setRoles(java.util.List roles)
          Set the global role list for this configuration.
 void writeEngineConfig(org.apache.axis.AxisEngine engine)
          We don't write ourselves out, so this is a noop.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

handlers

java.util.HashMap handlers
Handler registry


transports

java.util.HashMap transports
Transport registry


services

java.util.HashMap services
Service registry


globalOptions

java.util.Hashtable globalOptions
Global configuration stuff


globalRequest

org.apache.axis.Handler globalRequest

globalResponse

org.apache.axis.Handler globalResponse

roles

java.util.List roles

tmr

org.apache.axis.encoding.TypeMappingRegistry tmr
Our TypeMappingRegistry


defaultConfiguration

org.apache.axis.EngineConfiguration defaultConfiguration
An optional "default" EngineConfiguration


engine

private org.apache.axis.AxisEngine engine
Constructor Detail

SimpleProvider

public SimpleProvider()
Default constructor.


SimpleProvider

public SimpleProvider(org.apache.axis.EngineConfiguration defaultConfiguration)
Constructor which takes an EngineConfiguration which will be used as the default.


SimpleProvider

public SimpleProvider(org.apache.axis.encoding.TypeMappingRegistry typeMappingRegistry)
Construct a SimpleProvider using the supplied TypeMappingRegistry.

Method Detail

configureEngine

public void configureEngine(org.apache.axis.AxisEngine engine)
                     throws org.apache.axis.ConfigurationException
Configure an AxisEngine. Right now just calls the default configuration if there is one, since we don't do anything special.

Specified by:
configureEngine in interface org.apache.axis.EngineConfiguration

writeEngineConfig

public void writeEngineConfig(org.apache.axis.AxisEngine engine)
                       throws org.apache.axis.ConfigurationException
We don't write ourselves out, so this is a noop.

Specified by:
writeEngineConfig in interface org.apache.axis.EngineConfiguration

getGlobalOptions

public java.util.Hashtable getGlobalOptions()
                                     throws org.apache.axis.ConfigurationException
Returns the global configuration options.

Specified by:
getGlobalOptions in interface org.apache.axis.EngineConfiguration

setGlobalOptions

public void setGlobalOptions(java.util.Hashtable options)
Set the global options Hashtable


getGlobalRequest

public org.apache.axis.Handler getGlobalRequest()
                                         throws org.apache.axis.ConfigurationException
Returns a global request handler.

Specified by:
getGlobalRequest in interface org.apache.axis.EngineConfiguration

setGlobalRequest

public void setGlobalRequest(org.apache.axis.Handler globalRequest)
Set the global request Handler


getGlobalResponse

public org.apache.axis.Handler getGlobalResponse()
                                          throws org.apache.axis.ConfigurationException
Returns a global response handler.

Specified by:
getGlobalResponse in interface org.apache.axis.EngineConfiguration

setGlobalResponse

public void setGlobalResponse(org.apache.axis.Handler globalResponse)
Set the global response Handler


getTypeMappingRegistry

public org.apache.axis.encoding.TypeMappingRegistry getTypeMappingRegistry()
                                                                    throws org.apache.axis.ConfigurationException
Get our TypeMappingRegistry. Returns our specific one if we have one, otherwise the one from our defaultConfiguration. If we don't have one and also don't have a defaultConfiguration, we create one.

Specified by:
getTypeMappingRegistry in interface org.apache.axis.EngineConfiguration

getTypeMapping

public org.apache.axis.encoding.TypeMapping getTypeMapping(java.lang.String encodingStyle)
                                                    throws org.apache.axis.ConfigurationException

getTransport

public org.apache.axis.Handler getTransport(javax.xml.namespace.QName qname)
                                     throws org.apache.axis.ConfigurationException
Description copied from interface: org.apache.axis.EngineConfiguration
Retrieve an instance of the named transport.

Specified by:
getTransport in interface org.apache.axis.EngineConfiguration

getService

public org.apache.axis.handlers.soap.SOAPService getService(javax.xml.namespace.QName qname)
                                                     throws org.apache.axis.ConfigurationException
Description copied from interface: org.apache.axis.EngineConfiguration
Retrieve an instance of the named service.

Specified by:
getService in interface org.apache.axis.EngineConfiguration

getServiceByNamespaceURI

public org.apache.axis.handlers.soap.SOAPService getServiceByNamespaceURI(java.lang.String namespace)
                                                                   throws org.apache.axis.ConfigurationException
Get a service which has been mapped to a particular namespace

Specified by:
getServiceByNamespaceURI in interface org.apache.axis.EngineConfiguration

getHandler

public org.apache.axis.Handler getHandler(javax.xml.namespace.QName qname)
                                   throws org.apache.axis.ConfigurationException
Description copied from interface: org.apache.axis.EngineConfiguration
Retrieve an instance of the named handler.

Specified by:
getHandler in interface org.apache.axis.EngineConfiguration

deployService

public void deployService(javax.xml.namespace.QName qname,
                          org.apache.axis.handlers.soap.SOAPService service)

deployService

public void deployService(java.lang.String name,
                          org.apache.axis.handlers.soap.SOAPService service)

deployTransport

public void deployTransport(javax.xml.namespace.QName qname,
                            org.apache.axis.Handler transport)

deployTransport

public void deployTransport(java.lang.String name,
                            org.apache.axis.Handler transport)

getDeployedServices

public java.util.Iterator getDeployedServices()
                                       throws org.apache.axis.ConfigurationException
Get an enumeration of the services deployed to this engine

Specified by:
getDeployedServices in interface org.apache.axis.EngineConfiguration

setRoles

public void setRoles(java.util.List roles)
Set the global role list for this configuration. Note that we use the actual passed value, so if anyone else changes that collection, our role list will change. Be careful to pass this a cloned list if you want to change the list later without affecting the config.


addRole

public void addRole(java.lang.String role)
Add a role to the configuration's global list


removeRole

public void removeRole(java.lang.String role)
Remove a role from the configuration's global list


getRoles

public java.util.List getRoles()
Get a list of roles that this engine plays globally. Services within the engine configuration may also add additional roles.

Specified by:
getRoles in interface org.apache.axis.EngineConfiguration