public class EmbdServContHTTPService extends AbstractAuthenticatedService implements HTTPService
ServletService (an embedded servlet
container). This delegates to the AristaFlowHTTPService-servlet
implementingdoGet and doPost-methods.AbstractADEPT2Service.ActiveSessions| Modifier and Type | Field and Description |
|---|---|
protected AristaFlowHTTPService |
httpService
The HTTP service (servlet) handling the requests.
|
protected static java.lang.String |
WEB_APP_CONTEXT
The hierarchical context of the servlet.
|
protected static java.lang.String |
WEB_APP_NAME
The name used for the publishing the servlet, that is as servlet name.
|
CFG_EARLY_SERVICEAUTH_ORGPOSID, CFG_EARLY_SERVICEAUTH_ORGPOSNAME, CFG_EARLY_SERVICEAUTH_PASSWORD, CFG_EARLY_SERVICEAUTH_USERNAME, CFG_SERVICEAUTH_ORGPOSID, CFG_SERVICEAUTH_ORGPOSNAME, CFG_SERVICEAUTH_PASSWORD, CFG_SERVICEAUTH_USERNAMECONF_CSV_LOGGING, configuration, logger, registry, runtimeRequiredServices, startupRequiredServices| Constructor and Description |
|---|
EmbdServContHTTPService(Configuration configuration,
Registry registry)
Registers the HTTP-service-servlet at an embedded servlet container.
|
| Modifier and Type | Method and Description |
|---|---|
void |
deregisterReplyHandler(SessionToken session,
java.lang.String sessionID)
Deregisters a reply handler for the activity with the designated
sessionID. |
boolean |
isActive()
Allows waiting reply handlers to retrieve the state of the HTTP-service.
|
void |
registerReplyHandler(SessionToken session,
java.lang.String sessionID,
HTTPReplyHandler replayHandler)
Registers a reply handler for the activity with the designated
sessionID. |
void |
shutdown(boolean emergency)
Removes the HTTP-service-servlet from the
ServletService. |
void |
start()
Adds the HTTP-service-servlet to the
ServletService. |
_sessionActive, authenticateService, awaitActiveSessions, createChildSession, createSession, getAgent, getSecurityManager, getSessionFactory, getStartupRequired, getTopLevelAgent, getUserCredentials, globalSecurityManagerAvailable, init, isEarlyService, sessionHasCapability_sessionFinished, activeOrInvalidServiceStateException, changeLogContext, changeLogContext, changeLogContext, consoleLog, csvLoggingEnabled, getClassSpecificJulLogger, getDependencyRegistry, getLocalUris, getLogger, getRelease, getRuntimeRequiredServices, getServiceInstanceName, getStartupRequiredServices, getURIs, isSessionActive, isShutdown, logMethodEntry, logMethodEntry, logMethodEntry, logMethodExit, logMethodExit, ping, preShutdown, privilegeSession, privilegeThread, revertLogContextChanges, sessionActive, sessionActive, sessionActive, sessionActive, sessionFinished, sessionFinished, signalShutdown, signalStart, unprivilegeThreadclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLocalUris, getRelease, getRuntimeRequiredServices, getServiceInstanceName, getStartupRequiredServices, getURIs, init, ping, preShutdownprotected static final java.lang.String WEB_APP_NAME
protected static final java.lang.String WEB_APP_CONTEXT
protected final AristaFlowHTTPService httpService
public EmbdServContHTTPService(Configuration configuration, Registry registry) throws ConfigurationException
configuration - The configuration providing the user credentials for
this service.registry - The registry for accessing the servlet services.ConfigurationException - If there are problems parsing the user
credentials from the configuration, a
ConfigurationException will be thrown.public void registerReplyHandler(SessionToken session, java.lang.String sessionID, HTTPReplyHandler replayHandler) throws java.net.MalformedURLException
HTTPServicesessionID. This creates an own URL for the reply handler.
It will be called as soon as a HTTP-request (the reply for the activity) is
received by this HTTP-service.registerReplyHandler in interface HTTPServicesession - The session which is used to check for access rights on this
method.sessionID - The session ID for the executed activity. It is used to
create an appropriate URL.replayHandler - The handler for the HTTP-replies sent to this service.java.net.MalformedURLException - If the designated sessionID does not allow to
create a valid URL, a MalformedURLException will
be thrown.public void deregisterReplyHandler(SessionToken session, java.lang.String sessionID)
HTTPServicesessionID. A reply handler may be deregistered any time. In
case a reply handling is currently running, it will be allowed to finish.deregisterReplyHandler in interface HTTPServicesession - The session which is used to check for access rights on this
method.sessionID - The session ID identifying the executed activity and
therefore also the handler for the reply sent via HTTP.public void start()
throws AbortServiceException
ServletService.start in interface ADEPT2Servicestart in class AbstractADEPT2ServiceAbortServiceException - If the base URL (servlet URL having the
URL-pattern appended) cannot be created, an
AbortServiceException will be thrown.ServiceNotKnownException - If the servlet container cannot be
retrieved from the registry, a
ServiceNotKnownException will be thrown.public void shutdown(boolean emergency)
ServletService.shutdown in interface ADEPT2Serviceshutdown in class AbstractAuthenticatedServiceemergency - Whether the shutdown will be an emergency shutdown.public boolean isActive()
isActive in class AbstractADEPT2Service