public abstract class RESTService extends java.lang.Object implements ServerService, SelfManaging
Modifier and Type | Class and Description |
---|---|
static class |
RESTService.DeployedService |
Modifier and Type | Field and Description |
---|---|
protected boolean |
enabled |
static Logger |
LOGGER |
static java.lang.String |
NOPATH_PREFIX |
static java.lang.String |
OPENEJB_JAXRS_PROVIDERS_AUTO_PROP |
static java.lang.String |
OPENEJB_USE_APPLICATION_PROPERTY |
Constructor and Description |
---|
RESTService() |
Modifier and Type | Method and Description |
---|---|
void |
afterApplicationCreated(AppInfo appInfo,
WebAppInfo webApp)
Deployment of JAX-RS services starts in response to a AfterApplicationCreated event
after normal deployment is done
|
void |
afterApplicationCreated(AssemblerAfterApplicationCreated event) |
protected void |
beforeStart() |
protected abstract boolean |
containsJaxRsConfiguration(java.util.Properties properties) |
protected abstract RsHttpListener |
createHttpListener()
It creates the service container (http listener).
|
java.lang.String |
getAuth() |
java.lang.String |
getIP() |
int |
getPort() |
java.lang.String |
getRealm() |
protected java.util.Map<java.lang.String,EJBRestServiceInfo> |
getRestEjbs(AppInfo appInfo,
java.lang.String webapp) |
java.util.List<RESTService.DeployedService> |
getServices() |
java.lang.String |
getVirtualHost() |
java.lang.String |
getWildcard() |
static boolean |
hasBindings(Application application) |
void |
init(java.util.Properties props) |
protected static void |
logOldDeploymentUsage(java.lang.String clazz) |
void |
service(java.io.InputStream in,
java.io.OutputStream out) |
void |
service(java.net.Socket socket) |
void |
setAuth(java.lang.String auth) |
void |
setRealm(java.lang.String realm) |
void |
setVirtualHost(java.lang.String virtualHost) |
void |
start() |
void |
stop() |
void |
undeploy(AssemblerBeforeApplicationDestroyed event) |
Application |
wrapApplication(AppInfo appInfo,
Application application) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName
public static final Logger LOGGER
public static final java.lang.String OPENEJB_USE_APPLICATION_PROPERTY
public static final java.lang.String OPENEJB_JAXRS_PROVIDERS_AUTO_PROP
public static final java.lang.String NOPATH_PREFIX
protected boolean enabled
public void afterApplicationCreated(AppInfo appInfo, WebAppInfo webApp)
appInfo
- the ear (real or auto-created) in which the webapp is containedwebApp
- the webapp containing EJB or Pojo rest services to deploypublic Application wrapApplication(AppInfo appInfo, Application application)
public static boolean hasBindings(Application application)
protected static void logOldDeploymentUsage(java.lang.String clazz)
public void afterApplicationCreated(@Observes AssemblerAfterApplicationCreated event)
protected abstract boolean containsJaxRsConfiguration(java.util.Properties properties)
protected java.util.Map<java.lang.String,EJBRestServiceInfo> getRestEjbs(AppInfo appInfo, java.lang.String webapp)
protected abstract RsHttpListener createHttpListener()
public void undeploy(@Observes AssemblerBeforeApplicationDestroyed event)
public void start() throws ServiceException
start
in interface ServerService
ServiceException
protected void beforeStart()
public void stop() throws ServiceException
stop
in interface ServerService
ServiceException
public void service(java.io.InputStream in, java.io.OutputStream out) throws ServiceException, java.io.IOException
service
in interface ServerService
ServiceException
java.io.IOException
public void service(java.net.Socket socket) throws ServiceException, java.io.IOException
service
in interface ServerService
ServiceException
java.io.IOException
public java.lang.String getIP()
getIP
in interface ServerService
public int getPort()
getPort
in interface ServerService
public void init(java.util.Properties props) throws java.lang.Exception
public java.lang.String getVirtualHost()
public void setVirtualHost(java.lang.String virtualHost)
public java.lang.String getAuth()
public void setAuth(java.lang.String auth)
public java.lang.String getRealm()
public void setRealm(java.lang.String realm)
public java.util.List<RESTService.DeployedService> getServices()
public java.lang.String getWildcard()