public interface AgreementPartner
AgreementHandler
, which is
allowed slight control of the request and response. Each agreement handler
typically checks some type of underlying system for a valid contract with
the end user, as defined by the request.
The agreement could be verified given that a specific cookie is set, or that the value of a cookie validates to some specific mathematical formula. Should the agreement not be valid, then the handler may redirect the client to a login page, or some other page, on which an agreement may be made (typically, a payment made)
It is also conceivable that the agreement handler could check for the presence of a session scoped attribute, request parameter, or the user ID and/or password combination, or in fact, to require a login to be performed.
Modifier and Type | Method and Description |
---|---|
AgreementConfig |
getAgreementConfig()
Returns a configuration object which identifies the pieces of information
that this agreement partner requires.
|
void |
service(AgreementRequest request,
AgreementResponse response)
Handle one request for agreement validation, as defined by the
request and response parameters. |
AgreementConfig getAgreementConfig()
request
parameter
to the @{link #service} method.void service(AgreementRequest request, AgreementResponse response)
request
and response
parameters. The request
encapsulates the incoming HTTP request, although somewhat abstractly.
The response object allows for interaction with the final response object.
Note that several calls to service could happen at the same time.
It is therefore requred that service()
is thread safe.
request
- an encapsulation of the incoming requestrespons
- an encapsulation of the outgoing response© 1998- 2021 Escenic AS