Interface HTTPService
-
- All Superinterfaces:
ADEPT2Service
- All Known Implementing Classes:
AristaFlowHTTPService
,EmbdServContHTTPService
,NullHTTPService
public interface HTTPService extends ADEPT2Service
AHTTPService
provides the means to register and deregister handlers for replies for an activity sent via HTTP. This allows HTML-/HTTP-based activities to get all replies via a single web server that accepts the replies (normal HTTP-requests), forwards them to the corresponding activities (handlers) and sends appropriate HTTP-responses back to the clients.- Author:
- Ulrich Kreher
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
deregisterReplyHandler(SessionToken session, String sessionID)
Deregisters a reply handler for the activity with the designatedsessionID
.void
registerReplyHandler(SessionToken session, String sessionID, HTTPReplyHandler replyHandler)
Registers a reply handler for the activity with the designatedsessionID
.-
Methods inherited from interface de.aristaflow.adept2.base.service.ADEPT2Service
getLocalUris, getRelease, getRuntimeRequiredServices, getServiceInstanceName, getStartupRequiredServices, getURIs, init, ping, preShutdown, shutdown, start
-
-
-
-
Method Detail
-
registerReplyHandler
void registerReplyHandler(SessionToken session, String sessionID, HTTPReplyHandler replyHandler) throws MalformedURLException
Registers a reply handler for the activity with the designatedsessionID
. 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.- Parameters:
session
- 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.replyHandler
- The handler for the HTTP-replies sent to this service.- Throws:
MalformedURLException
- If the designated sessionID does not allow to create a valid URL, aMalformedURLException
will be thrown.
-
deregisterReplyHandler
void deregisterReplyHandler(SessionToken session, String sessionID)
Deregisters a reply handler for the activity with the designatedsessionID
. A reply handler may be deregistered any time. In case a reply handling is currently running, it will be allowed to finish.- Parameters:
session
- 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.
-
-