Package | osid.communication |
---|---|
Title | Communication Open Service Interface Definitions |
Version | 3.0.0 |
Description |
The Communication OSID is a supplementary service to
provide a means for an OSID Provider to communicate
diectly to an application for the purposes of completing
transactions or sending out of band messages. An OSID Provider may orchestrate a Communication OSID to request additional information from a user in reaction to an incomplete transaction or failure. OSID Consumers are not required to use the Communication OSID. Where this service is not consumed, an OSID Provider must proceed with operation or return an error. The communication is present when a The Communication OSID provides no management or logging operations. It is intended to support out of band application communication that may be the result of a dynamic condition or a query managed via the Inquiry OSID and the Rules Check OSID. ExampleCommunicationSession session = communicationMgr.getCommunicationSession(myReceiver); session.registerForCommuniques(); class myReceiver implements CommunicationReceiver { newCommunique(Communqiue msg) { org.osid.id.Id response; if (msg.level == CommuniqueLevel.ALERT || msg.level == CommuniqueLevel.FAILURE) { response = displayAlertBox(msg); } else { showInLogWindow(msg.getMessage()); if (msg.getResponses().len > 0) { response = getUserResponse(msg.getResponses()); } } if (response != null) { session.respond(response); } } } |