com.opencloud.slee.resources.mm7
Interface MM7Activity

All Known Subinterfaces:
CancelActivity, DeliverActivity, DeliveryReportActivity, ExtendedCancelActivity, ExtendedReplaceActivity, ReadReplyReportActivity, ReplaceActivity, SubmitActivity

public interface MM7Activity

Superinterface of all MM7 activity objects. It provides behaviour common to all activities: metadata and the ability to send an error response.

MM7 activities are generated in two cases:

  1. when a request is received from the MM7 peer; or
  2. when a SBB uses a sendXXX method on a MM7 Provider interface (VASPProvider or RSProvider) to send a new request

Responses may only be sent on activities generated due to an incoming request. An attempt to send a response on an activity that is in use for an outgoing request will cause an IllegalStateException to be thrown.


Method Summary
 MM7Provider getProvider()
          Get the MM7Provider which created this activity.
 java.lang.String getTransactionID()
          Get the transaction ID string for this activity.
 void sendErrorResponse(MM7StatusCode status)
          Send an error response to the incoming request this activity is responsible for.
 

Method Detail

getProvider

MM7Provider getProvider()
Get the MM7Provider which created this activity.

Returns:
a RSProvider or VASPProvider implementation

getTransactionID

java.lang.String getTransactionID()
Get the transaction ID string for this activity. This transaction ID is automatically propagated and checked as needed; it is here for information/logging purposes only.

Returns:
a unique, opaque, transaction ID string

sendErrorResponse

void sendErrorResponse(MM7StatusCode status)
                       throws ValidationException,
                              java.io.IOException,
                              java.lang.IllegalStateException
Send an error response to the incoming request this activity is responsible for. A VASPErrorResponse or RSErrorResponse is sent to the client as appropriate, depending on the role this resource adaptor is playing.

Parameters:
status - the MM7StatusCode to include in the response; must be an error status code.
Throws:
ValidationException - if status is null or is not an error status code
java.io.IOException - if the response could not be generated due to an internal error
java.lang.IllegalStateException - if this activity is not handling a request, or a response has already been sent.