public abstract class MFPJAXRSApplication
extends Application
An extended JAX-RS Application class made to be used by MobileFirst Java Adapters.
In addition to getSingletones() and getClasses() it also has "init" and "destroy" methods that will be called when initializing the JAX-RS application and when shutting it down.
There is an additional feature of package scanning to find JAX-RS resources. Override the getPackageToScan or getPackagesToScan methods to customize which package(s) to scan. By default, the package of the application class will be scanned. For example: if your application class is: com.acme.restapp.MyApplication, then the package 'com.acme.restapp' will be scanned for JAX-RS resources.
Constructor and Description |
---|
MFPJAXRSApplication() |
Modifier and Type | Method and Description |
---|---|
protected void |
destroy()
This method is called when un-deploying the adapter
|
protected java.lang.String[] |
getPackagesToScan()
Returns a list of packages that will be scanned to find JAX-RS resources for this application
|
protected java.lang.String |
getPackageToScan()
Returns a package that will be scanned to find JAX-RS resources for this application
|
protected void |
init()
This method is called on initialization
|
protected java.lang.String[] getPackagesToScan()
protected java.lang.String getPackageToScan()
protected void init() throws java.lang.Exception
java.lang.Exception
protected void destroy() throws java.lang.Exception
java.lang.Exception
© Copyright IBM Corp. 2006, 2015. All Rights Reserved.