|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.codehaus.enunciate.modules.BasicDeploymentModule
org.codehaus.enunciate.modules.FreemarkerDeploymentModule
org.codehaus.enunciate.modules.jboss.JBossDeploymentModule
public class JBossDeploymentModule
The JBoss module assembles a JBoss-based server-side application for hosting the WS endpoints.
The "generate" step generates the configuration files.
Enuncite provides content type negotiation (conneg) to Jersey that conforms to the content type negotiation of the Enunciate REST module. This means that each resource is mounted from the REST subcontext (see above) but ALSO from a subcontext that conforms to the id of each content type that the resource supports. So, if the content type id of the "application/xml" content type is "xml" then the resource at path "mypath" will be mounted at both "/rest/mypath" and "/xml/mypath".
The content types for each JAX-RS resource are declared by the @Produces annotation. The content type ids are customized with the "enunciate/services/rest/content-types" element in the Enunciate configuration. Enunciate supplies providers for the "application/xml" and "application/json" content types by default.
The JBoss module supports the following configuration attributes:
The JBoss module also supports a list of option child elements that each support a 'name' and 'value' attribute. This can be used to configure the RESTEasy mechanism, and the properties will be passed along as context parameters. See the RESTEasy docs for details.
The JBoss deployment module exports no artifacts.
| Field Summary |
|---|
| Fields inherited from class org.codehaus.enunciate.modules.BasicDeploymentModule |
|---|
enunciate |
| Constructor Summary | |
|---|---|
JBossDeploymentModule()
|
|
| Method Summary | |
|---|---|
void |
addOption(java.lang.String name,
java.lang.String value)
|
protected void |
doBuild()
Default implementation is a no-op. |
void |
doFreemarkerGenerate()
Generate using Freemarker. |
org.apache.commons.digester.RuleSet |
getConfigurationRules()
Default implementation returns null. |
java.lang.String |
getName()
The name of the deployment module. |
protected java.lang.String |
getRestSubcontext()
|
Validator |
getValidator()
Get the validator for this module, or null if none. |
void |
init(Enunciate enunciate)
Sets the enunciate mechanism. |
void |
initModel(EnunciateFreemarkerModel model)
Initialize the model. |
boolean |
isDisabled()
Whether this deployment module has been disabled, e.g. |
boolean |
isJaxrsProvider()
Whether this module is a JAX-RS provider module. |
boolean |
isJaxwsProvider()
Whether this module is a JAX-WS provider module. |
boolean |
isUsePathBasedConneg()
Whether to use path-based conneg. |
void |
onClassesFound(java.util.Set<java.lang.String> classes)
Logic for handling a set of classes that were found on the Enunciate classpath. |
void |
setEnableJaxrs(boolean enableJaxrs)
|
void |
setEnableJaxws(boolean enableJaxws)
|
void |
setUsePathBasedConneg(boolean usePathBasedConneg)
Whether to use path-based conneg. |
void |
setUseSubcontext(boolean useSubcontext)
Whether to use the REST subcontext. |
| Methods inherited from class org.codehaus.enunciate.modules.FreemarkerDeploymentModule |
|---|
close, doGenerate, getConfiguration, getModel, getModelInternal, getObjectWrapper, getTemplateExceptionHandler, getTemplateLoader, processTemplate, processTemplate, processTemplate, processTemplate |
| Methods inherited from class org.codehaus.enunciate.modules.BasicDeploymentModule |
|---|
debug, doCompile, doPackage, getAliases, getBuildDir, getCompileDir, getEnunciate, getGenerateDir, getOrder, getPackageDir, info, setBuildDir, setCompileDir, setDisabled, setGenerateDir, setPackageDir, step, warn |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JBossDeploymentModule()
| Method Detail |
|---|
public java.lang.String getName()
DeploymentModule
getName in interface DeploymentModulegetName in class BasicDeploymentModulepublic void onClassesFound(java.util.Set<java.lang.String> classes)
EnunciateClasspathListener
onClassesFound in interface EnunciateClasspathListenerclasses - The classes that were found.public void initModel(EnunciateFreemarkerModel model)
EnunciateModelAware
initModel in interface EnunciateModelAwareinitModel in class FreemarkerDeploymentModulemodel - The model to initialize.
public void init(Enunciate enunciate)
throws EnunciateException
BasicDeploymentModule
init in interface DeploymentModuleinit in class BasicDeploymentModuleenunciate - The enunciate mechanism.
EnunciateException
public void doFreemarkerGenerate()
throws java.io.IOException,
freemarker.template.TemplateException
FreemarkerDeploymentModuleFreemarkerDeploymentModule.doGenerate() but can throw a TemplateException.
doFreemarkerGenerate in class FreemarkerDeploymentModulejava.io.IOException
freemarker.template.TemplateException
protected void doBuild()
throws EnunciateException,
java.io.IOException
BasicDeploymentModule
doBuild in class BasicDeploymentModuleEnunciateException
java.io.IOExceptionpublic Validator getValidator()
DeploymentModule
getValidator in interface DeploymentModulegetValidator in class BasicDeploymentModulepublic boolean isJaxwsProvider()
SpecProviderModule
isJaxwsProvider in interface SpecProviderModulepublic boolean isJaxrsProvider()
SpecProviderModule
isJaxrsProvider in interface SpecProviderModulepublic void setEnableJaxrs(boolean enableJaxrs)
public void setEnableJaxws(boolean enableJaxws)
public boolean isUsePathBasedConneg()
public void setUsePathBasedConneg(boolean usePathBasedConneg)
usePathBasedConneg - Whether to use path-based conneg.public void setUseSubcontext(boolean useSubcontext)
useSubcontext - Whether to use the REST subcontext.protected java.lang.String getRestSubcontext()
public void addOption(java.lang.String name,
java.lang.String value)
public org.apache.commons.digester.RuleSet getConfigurationRules()
BasicDeploymentModule
getConfigurationRules in interface DeploymentModulegetConfigurationRules in class BasicDeploymentModulepublic boolean isDisabled()
DeploymentModule
isDisabled in interface DeploymentModuleisDisabled in class BasicDeploymentModule
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||