public interface CommunicationSession extends OsidSession
This session defines methods to process communications. Notifications are cancelled when this session is closed.
Modifier and Type | Method and Description |
---|---|
void |
acknowledge(Id communiqueId)
Sends a nonce response indicating that operations should continue or
abort.
|
ResponseForm |
getResponseForm(Id communiqueId)
Gets the response form for submitting form-based responses.
|
void |
registerForCommuniques()
Register for notifications of new communiques.
|
void |
respondViaForm(ResponseForm responseForm)
Responds to a communique requiring form input.
|
void |
respondViaOption(Id responseOptionId)
Responds to a communique requiring a response option.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
void registerForCommuniques() throws OperationFailedException, PermissionDeniedException
CommunicationReceiver.newCommunique()
is invoked when a new
Communique
is sent.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void acknowledge(Id communiqueId) throws OperationFailedException, PermissionDeniedException
communiqueId
- the Id
of a communiqueIllegalStateException
-
Communique.respondViaOption()
or
Communique.respondViaForm()
is true
,
or a response was already suppliedInvalidArgumentException
- communiqueId
not validNullArgumentException
- communiqueId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void respondViaOption(Id responseOptionId) throws OperationFailedException, PermissionDeniedException
responseOptionId
- the Id
of a response optionIllegalStateException
-
Communique.respondViaOption()
is false or a
response was already supplied
InvalidArgumentException
- responseOptionId
not validNullArgumentException
- responseOptionId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ResponseForm getResponseForm(Id communiqueId) throws OperationFailedException, PermissionDeniedException
communiqueId
- the Id
of a communiqueIllegalStateException
-
Communique.respondViaForm()
is false
InvalidArgumentException
- communiqueId
not validNullArgumentException
- communiqueId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void respondViaForm(ResponseForm responseForm) throws OperationFailedException, PermissionDeniedException
responseForm
- a response formIllegalStateException
- responseForm
already used in a response transactionInvalidArgumentException
- the form contains an invalid
valueNullArgumentException
- responseForm
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- responseForm
did
not originate from getResponseForm()
mandatory
- This method must be implemented.