|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.muse.core.AbstractEnvironment
public abstract class AbstractEnvironment
AbstractEnvironment is an abstract class that defines features related to the underlying platform as well as the endpoint's configuration. Its major responsibilities include storing request context on a per-thread basis and providing generic deployment information. Concrete isolation layers should provide concrete Environments that implement the abstract methods using the APIs of the underlying web services platform.
AbstractIsolationLayer
Constructor Summary | |
---|---|
AbstractEnvironment()
The default constructor calls this('true'). |
|
AbstractEnvironment(boolean createSoapClient)
Initializes the AbstractEnvironment with its own ClassLoader. |
|
AbstractEnvironment(ClassLoader classLoader)
This constructor calls this(classLoader, 'true'). |
|
AbstractEnvironment(ClassLoader classLoader,
boolean createSoapClient)
|
Method Summary | |
---|---|
void |
addAddressingContext(MessageHeaders context)
Records the WS-Addressing data for the current request. |
String |
createRelativePath(String originalPath,
String relativePath)
Merges the two paths to create a valid version of the second path. |
protected SoapClient |
createSoapClient()
This method can be overridden by concrete Environments to provide a different implementation of SoapClient for use by the application. |
MessageHeaders |
getAddressingContext()
|
ClassLoader |
getClassLoader()
|
URL |
getDataResource(String path)
|
InputStream |
getDataResourceStream(String path)
|
protected EndpointReference |
getDefaultEPR()
|
String |
getDefaultURI()
|
protected String |
getDeploymentURI(String uriString)
|
Document |
getDocument(String path)
This is a convenience method that loads an InputStream using getDataResourceStream() and turns it into a DOM Document. |
SoapClient |
getSoapClient()
|
void |
removeAddressingContext()
Removes the context object for the current request. |
void |
setDefaultURI(String defaultURI)
|
void |
setSoapClient(SoapClient soapClient)
Provides a new SOAP client for use by other components in the system. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.muse.core.Environment |
---|
getDeploymentEPR, getRealDirectory |
Constructor Detail |
---|
public AbstractEnvironment()
public AbstractEnvironment(boolean createSoapClient)
createSoapClient
- True if you want the SOAP client to be initialized. This requires
that you have a valid JAX-RPC SOAP implementation (not just the
interfaces) on the classpath.public AbstractEnvironment(ClassLoader classLoader)
public AbstractEnvironment(ClassLoader classLoader, boolean createSoapClient)
classLoader
- The ClassLoader that will be used to load all Java classes as well
as all file system resources.createSoapClient
- True if you want the SOAP client to be initialized. This requires
that you have a valid JAX-RPC SOAP implementation (not just the
interfaces) on the classpath.Method Detail |
---|
public void addAddressingContext(MessageHeaders context)
Environment
addAddressingContext
in interface Environment
context
- An object that can provide platform-specific information
and which is thread-unique or thread-safe.public String createRelativePath(String originalPath, String relativePath)
Environment
createRelativePath
in interface Environment
protected SoapClient createSoapClient()
public MessageHeaders getAddressingContext()
getAddressingContext
in interface Environment
public ClassLoader getClassLoader()
getClassLoader
in interface Environment
public URL getDataResource(String path)
getDataResource
in interface Environment
path
- A path that is relative to the environment's context root.
In J2EE applications this is the WAR root, in OSGi applications
this is the bundle's root.
public InputStream getDataResourceStream(String path)
getDataResourceStream
in interface Environment
path
- A path that is relative to the environment's context root.
In J2EE applications this is the WAR root, in OSGi applications
this is the bundle's root.
protected EndpointReference getDefaultEPR()
public String getDefaultURI()
getDefaultURI
in interface Environment
protected String getDeploymentURI(String uriString)
uriString
-
public Document getDocument(String path)
Environment
getDocument
in interface Environment
Environment.getDataResourceStream(String)
public SoapClient getSoapClient()
getSoapClient
in interface Environment
SimpleSoapClient
public void removeAddressingContext()
Environment
removeAddressingContext
in interface Environment
public void setDefaultURI(String defaultURI)
setDefaultURI
in interface Environment
defaultURI
- The URI to use when some address context is needed, but there
is no request data to provide it.public void setSoapClient(SoapClient soapClient)
setSoapClient
in interface Environment
soapClient
- The SOAP client that should be used by components needing to
invoke other web services.SimpleSoapClient
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |