org.apache.axis.configuration

Class FileProvider

Implemented Interfaces:
EngineConfiguration, WSDDEngineConfiguration
Known Direct Subclasses:
XMLStringProvider

public class FileProvider
extends java.lang.Object
implements WSDDEngineConfiguration

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

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

Field Summary

protected static Log
log

Fields inherited from interface org.apache.axis.EngineConfiguration

PROPERTY_NAME

Constructor Summary

FileProvider(InputStream is)
Constructor which takes an input stream directly.
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.

Method Summary

void
configureEngine(AxisEngine engine)
Iterator
getDeployedServices()
Get an enumeration of the services deployed to this engine
WSDDDeployment
getDeployment()
Hashtable
getGlobalOptions()
Returns the global configuration options.
Handler
getGlobalRequest()
Returns a global request handler.
Handler
getGlobalResponse()
Returns a global response handler.
Handler
getHandler(QName qname)
retrieve an instance of the named handler
List
getRoles()
Get a list of roles that this engine plays globally.
SOAPService
getService(QName qname)
retrieve an instance of the named service
SOAPService
getServiceByNamespaceURI(String namespace)
Get a service which has been mapped to a particular namespace
Handler
getTransport(QName qname)
retrieve an instance of the named transport
TypeMappingRegistry
getTypeMappingRegistry()
void
setDeployment(WSDDDeployment deployment)
void
setInputStream(InputStream is)
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.
void
writeEngineConfig(AxisEngine engine)
Save the engine configuration.

Field Details

log

protected static Log log

Constructor Details

FileProvider

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


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)
            throws ConfigurationException
Constructor which accesses a file relative to a specific base path.

Method Details

configureEngine

public void configureEngine(AxisEngine engine)
            throws ConfigurationException
Specified by:
configureEngine in interface EngineConfiguration


getDeployedServices

public Iterator getDeployedServices()
            throws ConfigurationException
Get an enumeration of the services deployed to this engine
Specified by:
getDeployedServices in interface EngineConfiguration


getDeployment

public WSDDDeployment getDeployment()
Specified by:
getDeployment in interface WSDDEngineConfiguration


getGlobalOptions

public Hashtable getGlobalOptions()
            throws ConfigurationException
Returns the global configuration options.
Specified by:
getGlobalOptions in interface EngineConfiguration


getGlobalRequest

public Handler getGlobalRequest()
            throws ConfigurationException
Returns a global request handler.
Specified by:
getGlobalRequest in interface EngineConfiguration


getGlobalResponse

public Handler getGlobalResponse()
            throws ConfigurationException
Returns a global response handler.
Specified by:
getGlobalResponse in interface EngineConfiguration


getHandler

public Handler getHandler(QName qname)
            throws ConfigurationException
retrieve an instance of the named handler
Specified by:
getHandler in interface EngineConfiguration

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.
Specified by:
getRoles in interface EngineConfiguration

Returns:
a List of the roles for this engine


getService

public SOAPService getService(QName qname)
            throws ConfigurationException
retrieve an instance of the named service
Specified by:
getService in interface EngineConfiguration

Parameters:
qname - XXX

Returns:
XXX

Throws:
ConfigurationException - XXX


getServiceByNamespaceURI

public SOAPService getServiceByNamespaceURI(String namespace)
            throws ConfigurationException
Get a service which has been mapped to a particular namespace
Specified by:
getServiceByNamespaceURI in interface EngineConfiguration

Parameters:
namespace - a namespace URI

Returns:
an instance of the appropriate Service, or null


getTransport

public Handler getTransport(QName qname)
            throws ConfigurationException
retrieve an instance of the named transport
Specified by:
getTransport in interface EngineConfiguration

Parameters:
qname - XXX

Returns:
XXX

Throws:
ConfigurationException - XXX


getTypeMappingRegistry

public TypeMappingRegistry getTypeMappingRegistry()
            throws ConfigurationException
Specified by:
getTypeMappingRegistry in interface EngineConfiguration


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)
            throws ConfigurationException
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.
Specified by:
writeEngineConfig in interface EngineConfiguration


Copyright B) 2005 Apache Web Services Project. All Rights Reserved.