org.apache.axis.configuration

Class FileProvider

public class FileProvider extends Object implements WSDDEngineConfiguration

A simple ConfigurationProvider that uses the Admin class to read + write XML files.

Author: Glen Daniels (gdaniels@apache.org) Glyn Normington (glyn@apache.org)

Field Summary
protected static Loglog
Constructor Summary
FileProvider(String filename)
Constructor which accesses a file in the current directory of the engine or at an absolute path.
FileProvider(String basepath, String filename)
Constructor which accesses a file relative to a specific base path.
FileProvider(InputStream is)
Constructor which takes an input stream directly.
Method Summary
voidconfigureEngine(AxisEngine engine)
IteratorgetDeployedServices()
Get an enumeration of the services deployed to this engine
WSDDDeploymentgetDeployment()
HashtablegetGlobalOptions()
Returns the global configuration options.
HandlergetGlobalRequest()
Returns a global request handler.
HandlergetGlobalResponse()
Returns a global response handler.
HandlergetHandler(QName qname)
retrieve an instance of the named handler
ListgetRoles()
Get a list of roles that this engine plays globally.
SOAPServicegetService(QName qname)
retrieve an instance of the named service
SOAPServicegetServiceByNamespaceURI(String namespace)
Get a service which has been mapped to a particular namespace
HandlergetTransport(QName qname)
retrieve an instance of the named transport
TypeMappingRegistrygetTypeMappingRegistry()
voidsetDeployment(WSDDDeployment deployment)
voidsetInputStream(InputStream is)
voidsetSearchClasspath(boolean searchClasspath)
Determine whether or not we will look for a "*-config.wsdd" file on the classpath if we don't find it in the specified location.
voidwriteEngineConfig(AxisEngine engine)
Save the engine configuration.

Field Detail

log

protected static Log log

Constructor Detail

FileProvider

public FileProvider(String filename)
Constructor which accesses a file in the current directory of the engine or at an absolute path.

FileProvider

public FileProvider(String basepath, String filename)
Constructor which accesses a file relative to a specific base path.

FileProvider

public FileProvider(InputStream is)
Constructor which takes an input stream directly. Note: The configuration will be read-only in this case!

Method Detail

configureEngine

public void configureEngine(AxisEngine engine)

getDeployedServices

public Iterator getDeployedServices()
Get an enumeration of the services deployed to this engine

getDeployment

public WSDDDeployment getDeployment()

getGlobalOptions

public Hashtable getGlobalOptions()
Returns the global configuration options.

getGlobalRequest

public Handler getGlobalRequest()
Returns a global request handler.

getGlobalResponse

public Handler getGlobalResponse()
Returns a global response handler.

getHandler

public Handler getHandler(QName qname)
retrieve an instance of the named handler

Parameters: qname XXX

Returns: XXX

Throws: ConfigurationException XXX

getRoles

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

Returns: a List of the roles for this engine

getService

public SOAPService getService(QName qname)
retrieve an instance of the named service

Parameters: qname XXX

Returns: XXX

Throws: ConfigurationException XXX

getServiceByNamespaceURI

public SOAPService getServiceByNamespaceURI(String namespace)
Get a service which has been mapped to a particular namespace

Parameters: namespace a namespace URI

Returns: an instance of the appropriate Service, or null

getTransport

public Handler getTransport(QName qname)
retrieve an instance of the named transport

Parameters: qname XXX

Returns: XXX

Throws: ConfigurationException XXX

getTypeMappingRegistry

public TypeMappingRegistry getTypeMappingRegistry()

setDeployment

public void setDeployment(WSDDDeployment deployment)

setInputStream

public void setInputStream(InputStream is)

setSearchClasspath

public void setSearchClasspath(boolean searchClasspath)
Determine whether or not we will look for a "*-config.wsdd" file on the classpath if we don't find it in the specified location.

Parameters: searchClasspath true if we should search the classpath

writeEngineConfig

public void writeEngineConfig(AxisEngine engine)
Save the engine configuration. In case there's a problem, we write it to a string before saving it out to the actual file so we don't screw up the file.
Copyright B) 2005 Apache Web Services Project. All Rights Reserved.