iaik.xkms
Interface XRequestAbstractType

All Superinterfaces:
XMessageAbstractType
All Known Subinterfaces:
CompoundRequest, LocateRequest, PendingRequest, RecoverRequest, RegisterRequest, ReissueRequest, RevokeRequest, StatusRequest, ValidateRequest, XKISSRequest, XKRSSRequest

public interface XRequestAbstractType
extends XMessageAbstractType

Abstract base type from which all XKMS request messages are derived.

[97] The RequestAbstractType abstract type is the type from which all XKMS request element types are derived. The RequestAbstractType abstract type inherits the element and attributes of the XMessageAbstractType abstract type and in addition contains the following elements and attributes:

<ResponseMechanism> [Any Number]
Specifies the extended protocol mechanisms that the client supports in connection with this request.

<RespondWith> [Any Number]
Specifies the types of data the recipient requests to be sent in the response.

<PendingNotification> [Optional]
Specifies a means by which the service may notify the requestor of the completion of a pending response. If the <PendingNotification> element is present the value 'Pending' MUST be specified as a <ResponseMechanism> value.

OriginalRequestId [Optional]
Specifies the value 'Id' of the first request made in a multi-stage protocol such as the asynchronous processing mechanism or the two-phase protocol.

ResponseLimit [Optional]
Specifies the maximum number of data items the requestor can accept in the case that the schema specifies an unbounded number of elements.


Element <PendingNotification>
[107] The <PendingNotification> element is used to specify a mechanism by means of which the service can inform a requestor that a pending request has completed asynchronously.

[108] The <PendingNotification> element contains the following attributes:

Mechanism [Required]
A URI that specifies the protocol by which the notification MAY be made.
Identifier [Required]
A URI that specifies the address to which the notification MAY be made.

[109] The following mechanisms are defined:

   Protocol  Mechanism           Identifier  Description
   SMTP      urn:ietf:rfc:822    mailto:     Notification by email.
   HTTP      urn:ietf:rfc:2616   http://     Notification by HTTP.
 
The content of the email is outside the scope of this text.
The content of the request is outside the scope of this text.


Method Summary
 boolean acceptPending()
          Checks whether the requestor accepts pending requests.
 boolean acceptRepresent()
          Checks whether the requestor accepts a response that uses the two-phase protocol.
 boolean acceptRequestSignatureValue()
          Checks whether the requestor accepts a response that carries a RequestSignatureValue element.
 void addRespondWith(RespondWith val)
          Adds the given RespondWith to the list of RespondWiths of this request.
 void addResponseMechanism(ResponseMechanism responseMechanism)
          Adds the given ResponseMechanism to the list of ResponseMechanisms of this request.
 NCName getOriginalRequestId()
          Gets value of OriginalRequestId of this request.
 String[] getPendingNotification()
          Gets the pending notification for this request.
 List<RespondWith> getRespondWith()
          Gets list of RespondWiths.
 int getResponseLimit()
          Gets the ResponseLimit of this request.
 List<ResponseMechanism> getResponseMechanism()
          Gets list of ResponseMechanisms.
 void removeRespondWith(RespondWith val)
          Removes the given RespondWith from the list of RespondWiths of this request.
 void removeResponseMechanism(ResponseMechanism responseMechanism)
          Removes the given ResponseMechanism from the list of ResponseMechanisms of this request.
 void setOriginalRequestId(NCName requestId)
          Sets OriginalRequestId of this request to the given value.
 void setPendingNotification(String identifier, String mechanism)
          Sets the pending notification for this request.
 void setResponseLimit(int limit)
          Sets ResponseLimit of this request.
 
Methods inherited from interface XMessageAbstractType
addDefaults, addOpaqueClientData, clearOpaqueClientData, getId, getMessageName, getNonce, getOpaqueClientData, getRequestSignatureValue, getService, getSignatureCertificate, hasSignature, isValid, setId, setNonce, setService, setSignature, toString
 

Method Detail

addResponseMechanism

void addResponseMechanism(ResponseMechanism responseMechanism)
Adds the given ResponseMechanism to the list of ResponseMechanisms of this request.

Parameters:
responseMechanism - ResponseMechanism to add.

removeResponseMechanism

void removeResponseMechanism(ResponseMechanism responseMechanism)
Removes the given ResponseMechanism from the list of ResponseMechanisms of this request.

Parameters:
responseMechanism - ResponseMechanism to remove.

getResponseMechanism

List<ResponseMechanism> getResponseMechanism()
Gets list of ResponseMechanisms.

This method returns a copy of the internal list, modifications will not be represented internally.

Returns:
a copy of the internal list of Responsemechanisms.

addRespondWith

void addRespondWith(RespondWith val)
Adds the given RespondWith to the list of RespondWiths of this request.

Parameters:
val - RespondWith to add.

removeRespondWith

void removeRespondWith(RespondWith val)
Removes the given RespondWith from the list of RespondWiths of this request.

Parameters:
val - RespondWith to remove.

getRespondWith

List<RespondWith> getRespondWith()
Gets list of RespondWiths.

This method returns a copy of the internal list, modifications will not be represented internally.

Returns:
a copy of the internal list of RespondWiths.

setPendingNotification

void setPendingNotification(String identifier,
                            String mechanism)
                            throws XKMSException
Sets the pending notification for this request.

Parameters:
identifier - identifier to use for pending notification
mechanism - mechanism to use for pending notification
Throws:
XKMSException - if parameters are not URIs

getPendingNotification

String[] getPendingNotification()
Gets the pending notification for this request.

Returns:
an array of 2 Strings, the first being the identifier, the second being the mechanism

setOriginalRequestId

void setOriginalRequestId(NCName requestId)
Sets OriginalRequestId of this request to the given value.

Parameters:
requestId - new value for OriginalRequestId

getOriginalRequestId

NCName getOriginalRequestId()
Gets value of OriginalRequestId of this request.

Returns:
value of OriginalRequestId

setResponseLimit

void setResponseLimit(int limit)
Sets ResponseLimit of this request.

Parameters:
limit - new value for ResponseLimit.

getResponseLimit

int getResponseLimit()
Gets the ResponseLimit of this request.

Returns:
value of ResponseLimit or -1 if the element is not set.

acceptPending

boolean acceptPending()
Checks whether the requestor accepts pending requests.

The <ResponseMechanism> tag is checked if it contains the 'Pending' value.

Returns:
true if the requestor accepts pending requests, otherwise false

acceptRepresent

boolean acceptRepresent()
Checks whether the requestor accepts a response that uses the two-phase protocol.

The <ResponseMechanism> tag is checked if it contains a 'Represent' value.

Returns:
true if the requestor is prepared to accept a response that uses the two-phase protocol, otherwise false

acceptRequestSignatureValue

boolean acceptRequestSignatureValue()
Checks whether the requestor accepts a response that carries a RequestSignatureValue element.

Returns:
true if the requestor accepts a response that carries a RequestSignatureValue element, otherwise false