org.apache.muse.tools.generator.util
Class LocalEnvironment
java.lang.Object
org.apache.muse.core.AbstractEnvironment
org.apache.muse.tools.generator.util.LocalEnvironment
- All Implemented Interfaces:
- Environment
- Direct Known Subclasses:
- WsdlEnvironment
public class LocalEnvironment
- extends AbstractEnvironment
An Environment that is local to a JVM. It uses the java.io.File class
to access the file system and resolve any resource paths.
- Author:
- Dan Jemiolo (danj), Andrew Eberbach (aeberbac)
Methods inherited from class org.apache.muse.core.AbstractEnvironment |
addAddressingContext, createRelativePath, createSoapClient, getAddressingContext, getClassLoader, getDefaultEPR, getDefaultURI, getDeploymentURI, getDocument, getSoapClient, removeAddressingContext, setDefaultURI, setSoapClient |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LocalEnvironment
public LocalEnvironment()
LocalEnvironment
public LocalEnvironment(File realDirectory)
LocalEnvironment
public LocalEnvironment(boolean createSoapClient)
LocalEnvironment
public LocalEnvironment(File realDirectory,
boolean createSoapClient)
getDeploymentEPR
public EndpointReference getDeploymentEPR()
- Returns:
- The copy of the EPR of the application, as viewed in
the context of the current request. When multiple endpoints
are mapped to one application/service, this method will
return different EPRs from request to request. Muse uses
this feature to host different resource types (with different
endpoints) in the same application or bundle.
getRealDirectory
public File getRealDirectory()
- Returns:
- The actual directory on the file system where the application
is deployed.
getTargetEPR
public EndpointReference getTargetEPR()
setRealDirectory
public final void setRealDirectory(File realDirectory)
setTargetEPR
public void setTargetEPR(EndpointReference target)
getDataResource
public URL getDataResource(String path)
- Specified by:
getDataResource
in interface Environment
- Overrides:
getDataResource
in class AbstractEnvironment
- Parameters:
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.
- Returns:
- The URL of the "data resource" found at the given path. If no
such resource is found, the method throws a RuntimeException.
getDataResourceStream
public InputStream getDataResourceStream(String path)
- Specified by:
getDataResourceStream
in interface Environment
- Overrides:
getDataResourceStream
in class AbstractEnvironment
- Parameters:
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.
- Returns:
- An open InputStream that can read the "data resource" found at
the given path. If no such resource is found, the method throws
a RuntimeException.
Copyright © 2005-2011 Apache Web Services - Muse. All Rights Reserved.