org.jboss.axis.configuration
Class FileProvider

java.lang.Object
  extended byorg.jboss.axis.configuration.FileProvider
All Implemented Interfaces:
EngineConfiguration (src) , WSDDEngineConfiguration (src)
Direct Known Subclasses:
XMLResourceProvider (src) , XMLStringProvider (src)

public class FileProvider
extends java.lang.Object
implements WSDDEngineConfiguration (src)

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


Field Summary
 
Fields inherited from interface org.jboss.axis.EngineConfiguration (src)
PROPERTY_NAME
 
Constructor Summary
FileProvider(java.io.InputStream is)
          Constructor which takes an input stream directly.
FileProvider(java.lang.String filename)
          Constructor which accesses a file in the current directory of the engine or at an absolute path.
FileProvider(java.lang.String basepath, java.lang.String filename)
          Constructor which accesses a file relative to a specific base path.
 
Method Summary
 void configureEngine(AxisEngine (src)  engine)
          Configure this AxisEngine using whatever data source we have.
 java.util.Iterator getDeployedServices()
          Get an enumeration of the services deployed to this engine
 WSDDDeployment (src) getDeployment()
           
 java.util.Hashtable getGlobalOptions()
          Returns the global configuration options.
 Handler (src) getGlobalRequest()
          Returns a global request handler.
 Handler (src) getGlobalResponse()
          Returns a global response handler.
 Handler (src) getHandler(QName (src)  qname)
          retrieve an instance of the named handler
 SOAPService (src) getService(QName (src)  qname)
          retrieve an instance of the named service
 SOAPService (src) getServiceByNamespaceURI(java.lang.String namespace)
          Get a service which has been mapped to a particular namespace
 Handler (src) getTransport(QName (src)  qname)
          retrieve an instance of the named transport
 TypeMappingRegistry (src) getTypeMappingRegistry()
          Retrieve the TypeMappingRegistry for this engine
 void setDeployment(WSDDDeployment (src)  deployment)
           
 void setInputStream(java.io.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 (src)  engine)
          Save the engine configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileProvider

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


FileProvider

public FileProvider(java.lang.String basepath,
                    java.lang.String filename)
             throws ConfigurationException (src) 
Constructor which accesses a file relative to a specific base path.


FileProvider

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

Method Detail

setInputStream

public void setInputStream(java.io.InputStream is)

getDeployment

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

setDeployment

public void setDeployment(WSDDDeployment (src)  deployment)

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

configureEngine

public void configureEngine(AxisEngine (src)  engine)
                     throws ConfigurationException (src) 
Description copied from interface: EngineConfiguration (src)
Configure this AxisEngine using whatever data source we have.

Specified by:
configureEngine in interface EngineConfiguration (src)
Parameters:
engine - the AxisEngine we'll deploy state to
Throws:
ConfigurationException (src) - if there was a problem

writeEngineConfig

public void writeEngineConfig(AxisEngine (src)  engine)
                       throws ConfigurationException (src) 
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 (src)
Parameters:
engine - the AxisEngine from which to read state.
Throws:
ConfigurationException (src) - if there was a problem

getHandler

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

Specified by:
getHandler in interface EngineConfiguration (src)
Parameters:
qname - XXX
Returns:
XXX
Throws:
ConfigurationException (src) - XXX

getService

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

Specified by:
getService in interface EngineConfiguration (src)
Parameters:
qname - XXX
Returns:
XXX
Throws:
ConfigurationException (src) - XXX

getServiceByNamespaceURI

public SOAPService (src)  getServiceByNamespaceURI(java.lang.String namespace)
                                     throws ConfigurationException (src) 
Get a service which has been mapped to a particular namespace

Specified by:
getServiceByNamespaceURI in interface EngineConfiguration (src)
Parameters:
namespace - a namespace URI
Returns:
an instance of the appropriate Service, or null
Throws:
ConfigurationException (src)

getTransport

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

Specified by:
getTransport in interface EngineConfiguration (src)
Parameters:
qname - XXX
Returns:
XXX
Throws:
ConfigurationException (src) - XXX

getTypeMappingRegistry

public TypeMappingRegistry (src)  getTypeMappingRegistry()
                                           throws ConfigurationException (src) 
Description copied from interface: EngineConfiguration (src)
Retrieve the TypeMappingRegistry for this engine

Specified by:
getTypeMappingRegistry in interface EngineConfiguration (src)
Throws:
ConfigurationException (src)

getGlobalRequest

public Handler (src)  getGlobalRequest()
                         throws ConfigurationException (src) 
Returns a global request handler.

Specified by:
getGlobalRequest in interface EngineConfiguration (src)
Throws:
ConfigurationException (src)

getGlobalResponse

public Handler (src)  getGlobalResponse()
                          throws ConfigurationException (src) 
Returns a global response handler.

Specified by:
getGlobalResponse in interface EngineConfiguration (src)
Throws:
ConfigurationException (src)

getGlobalOptions

public java.util.Hashtable getGlobalOptions()
                                     throws ConfigurationException (src) 
Returns the global configuration options.

Specified by:
getGlobalOptions in interface EngineConfiguration (src)
Throws:
ConfigurationException (src)

getDeployedServices

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

Specified by:
getDeployedServices in interface EngineConfiguration (src)
Returns:
something to iterate with
Throws:
ConfigurationException (src)
See Also:
ServiceDesc (src)