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

Quick Search    Search Deep

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

java.lang.Object
  extended byorg.apache.axis.configuration.FileProvider
All Implemented Interfaces:
org.apache.axis.EngineConfiguration, org.apache.axis.WSDDEngineConfiguration
Direct Known Subclasses:
XMLStringProvider

public class FileProvider
extends java.lang.Object
implements org.apache.axis.WSDDEngineConfiguration

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


Field Summary
private  java.io.File configFile
           
private  org.apache.axis.deployment.wsdd.WSDDDeployment deployment
           
private  java.lang.String filename
           
protected static org.apache.commons.logging.Log log
           
private  java.io.InputStream myInputStream
           
private  boolean readOnly
           
private  boolean searchClasspath
           
 
Fields inherited from interface org.apache.axis.EngineConfiguration
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
private  void check()
          Check the configuration file attributes and remember whether or not the file is read-only.
 void configureEngine(org.apache.axis.AxisEngine engine)
          Configure this AxisEngine using whatever data source we have.
 java.util.Iterator getDeployedServices()
          Get an enumeration of the services deployed to this engine
 org.apache.axis.deployment.wsdd.WSDDDeployment getDeployment()
          Get the WSDDDeployment for this engine configuration.
 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
private  java.io.InputStream getInputStream()
           
 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.TypeMappingRegistry getTypeMappingRegistry()
          Retrieve the TypeMappingRegistry for this engine.
 void setDeployment(org.apache.axis.deployment.wsdd.WSDDDeployment 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(org.apache.axis.AxisEngine engine)
          Save the engine configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.commons.logging.Log log

deployment

private org.apache.axis.deployment.wsdd.WSDDDeployment deployment

filename

private java.lang.String filename

configFile

private java.io.File configFile

myInputStream

private java.io.InputStream myInputStream

readOnly

private boolean readOnly

searchClasspath

private boolean searchClasspath
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 org.apache.axis.ConfigurationException
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

check

private void check()
Check the configuration file attributes and remember whether or not the file is read-only.


setInputStream

public void setInputStream(java.io.InputStream is)

getInputStream

private java.io.InputStream getInputStream()

getDeployment

public org.apache.axis.deployment.wsdd.WSDDDeployment getDeployment()
Description copied from interface: org.apache.axis.WSDDEngineConfiguration
Get the WSDDDeployment for this engine configuration.

Specified by:
getDeployment in interface org.apache.axis.WSDDEngineConfiguration

setDeployment

public void setDeployment(org.apache.axis.deployment.wsdd.WSDDDeployment 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.


configureEngine

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

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

writeEngineConfig

public void writeEngineConfig(org.apache.axis.AxisEngine engine)
                       throws org.apache.axis.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 org.apache.axis.EngineConfiguration

getHandler

public org.apache.axis.Handler getHandler(javax.xml.namespace.QName qname)
                                   throws org.apache.axis.ConfigurationException
retrieve an instance of the named handler

Specified by:
getHandler 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
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

getTransport

public org.apache.axis.Handler getTransport(javax.xml.namespace.QName qname)
                                     throws org.apache.axis.ConfigurationException
retrieve an instance of the named transport

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

getTypeMappingRegistry

public org.apache.axis.encoding.TypeMappingRegistry getTypeMappingRegistry()
                                                                    throws org.apache.axis.ConfigurationException
Description copied from interface: org.apache.axis.EngineConfiguration
Retrieve the TypeMappingRegistry for this engine.

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

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

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

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

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

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