com.ibm.mfp.adapter.api.MFPJAXRSApplication Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of adapter-maven-api Show documentation
Show all versions of adapter-maven-api Show documentation
IBM MFP Adapter api for adapter as a maven project. BuildNumber is : 8.0.2024082809
The newest version!
/*
* © Copyright IBM Corp. 2016
* All Rights Reserved. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
*/
package com.ibm.mfp.adapter.api;
import javax.ws.rs.core.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.
*
*/
public abstract class MFPJAXRSApplication extends Application{
/**
* Returns a list of packages that will be scanned to find JAX-RS resources for this application
* @return
*/
protected String[] getPackagesToScan() {
return null;
}
/**
* Returns a package that will be scanned to find JAX-RS resources for this application
* @return
*/
protected String getPackageToScan() {
return getClass().getPackage().getName();
}
/**
* This method is called on initialization
*/
protected void init() throws Exception{
}
/**
* This method is called when un-deploying the adapter
*/
protected void destroy() throws Exception{
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy