Platform SDK Java 8.5 API Reference

com.genesyslab.platform.commons.protocol
Class Message

java.lang.Object
  extended by com.genesyslab.platform.commons.protocol.DataObject
      extended by com.genesyslab.platform.commons.protocol.Message
All Implemented Interfaces:
ProtocolDescriptionSupport
Direct Known Subclasses:
AbstractMessage, AbstractMessage, Event3rdServerFault, Event3rdServerResponse, EventAbandoned, EventAccepted, EventAccountRead, EventAccountUpdated, EventAck, EventAck, EventAck, EventACK, EventActivityReport, EventAddressInfo, EventAgentAvailable, EventAgentConnectionClosed, EventAgentInvited, EventAgentLogin, EventAgentLogin, EventAgentLogout, EventAgentLogout, EventAgentNotAvailable, EventAgentNotReady, EventAgentReady, EventAgentReserved, EventAgentState, EventAgentStateReasonChanged, EventAgentWorkbinStats, EventAlarmInfo, EventAnswerAccessNumber, EventApplicationRegistered, EventAttachedDataChanged, EventAuthenticated, EventBridged, EventBriefInfo, EventCallCreated, EventCallDataChanged, EventCallDeleted, EventCallInfoChanged, EventCallPartyAdded, EventCallPartyDeleted, EventCallPartyMoved, EventCallPartyState, EventCampaignLoaded, EventCampaignRegistered, EventCampaignStatus, EventCampaignUnloaded, EventCampaignUnregistered, EventChangeExecutionMode, EventClientRegistered, EventClientRegistered, EventConnected, EventCurrentAgentStatus, EventCurrentTargetStateSnapshot, EventCurrentTargetStateTargetAdded, EventCurrentTargetStateTargetRemoved, EventCurrentTargetStateTargetUpdated, EventCustom, EventCustomInfo, EventCustomReporting, EventDataStreamClosed, EventDataStreamMessage, EventDataStreamOpened, EventDataStreamOpeningFailure, EventDebug, EventDeleted, EventDestinationBusy, EventDialing, EventDialingModeChanged, EventDialingStarted, EventDialingStopped, EventDigitsCollected, EventDisconnected, EventDiverted, EventDNBackInService, EventDNDOff, EventDNDOn, EventDNOutOfService, EventDoNotDisturbOff, EventDoNotDisturbOn, EventDtmfSent, EventEnvironmentInfo, EventError, EventError, EventError, EventError, EventError, EventError, EventError, EventError, EventError, EventError, EventError, EventError, EventError2, EventEstablished, EventExecutionAck, EventExecutionError, EventExecutionInProgress, EventExternalServiceRequested, EventExternalServiceResponded, EventForcedAgentStateChange, EventForcedDisconnect, EventForwardCancel, EventForwardSet, EventHardwareError, EventHeld, EventHeld, EventHint, EventHistoryLogSent, EventHostUnderControl, EventInfo, EventInfo, EventInfo, EventInfo, EventInfo, EventInitHeartbeats, EventInteractionProperties, EventInteractionsFound, EventInteractionsMoved, EventInteractionSubmited, EventInvite, EventLinkConnected, EventLinkDisconnected, EventListenDisconnected, EventListenReconnected, EventLocaleRead, EventLocaleSets, EventLocationInfo, EventLocked, EventLogMessage, EventMailBoxLogin, EventMailBoxLogout, EventMediaAdded, EventMediaRemoved, EventMediaStateReasonChanged, EventMessagePing, EventMessageWaitingOff, EventMessageWaitingOn, EventMonitoringCancelled, EventMonitoringNextCall, EventMuteOff, EventMuteOn, EventNetworkCallStatus, EventNetworkPrivateInfo, EventNetworkReached, EventNoControllingSCS, EventNotificationRegistered, EventNotificationUnregistered, EventNotReadyForMedia, EventObjectCreated, EventObjectDeleted, EventObjectPermissionsRead, EventObjectsRead, EventObjectsSent, EventObjectUpdated, EventOffHook, EventOnHook, EventOpenOk, EventOpenOK, EventOperationalModeChanged, EventOperationalModeRead, EventPartyAdded, EventPartyAdded, EventPartyChanged, EventPartyDeleted, EventPartyInfo, EventPartyRemoved, EventPasswordChanged, EventPermissionsChanged, EventPermissionsNotificationRegistered, EventPermissionsNotificationUnregistered, EventPermissionsRead, EventPermissionsUpdated, EventPlaceAgentState, EventPlacedInQueue, EventPlacedInWorkbin, EventPrimaryChanged, EventPrivateInfo, EventProcessingStopped, EventPropertiesChanged, EventProtocolVersion, EventPulledInteractions, EventQueued, EventQueueLogout, EventReadyForMedia, EventRedirect, EventRegistered, EventRegistered, EventRegistered, EventRegistered, EventRegisteredAll, EventRejected, EventReleased, EventRemoteConnectionFailed, EventRemoteConnectionSuccess, EventReqGetAccessNumberCanceled, EventReserved_2, EventResourceInfo, EventRestoreConnection, EventResumed, EventRetrieved, EventRevoked, EventRinging, EventRouteRequest, EventRouteUsed, EventSchemaFile, EventSchemaInfoRead, EventSearchResult, EventServerInfo, EventServerMode, EventSessionInfo, EventSnapshotInteractions, EventSnapshotTaken, EventStatInfo, EventStatisticClosed, EventStatisticInvalid, EventStatisticOpened, EventStatisticProfile, EventStatisticValid, EventStatus, EventSubscription, EventSuspendApplication, EventSwitchInfo, EventTakenFromQueue, EventTakenFromWorkbin, EventTransactionStatus, EventTreatmentApplied, EventTreatmentEnd, EventTreatmentNotApplied, EventTreatmentRequired, EventUnlocked, EventUnregistered, EventUnregisteredAll, EventUserEvent, EventUserEvent, EventVoiceFileClosed, EventVoiceFileEndPlay, EventVoiceFileOpened, EventWorkbinContent, EventWorkbinContentChanged, EventWorkbinStatistic, EventWorkbinTypesInfo, EventWorkflowConfiguration, EventXResponse, Request3rdServer, RequestAccept, RequestActivateApplicationAlarm, RequestAddMedia, RequestAgentAvailable, RequestAgentLogin, RequestAgentLogin, RequestAgentLogout, RequestAgentLogout, RequestAgentNotAvailable, RequestAgentNotReady, RequestAgentReady, RequestAgentState, RequestAgentWorkbinStats, RequestAlternateCall, RequestAnswerCall, RequestApplyTreatment, RequestAttachUserData, RequestAuthenticate, RequestCallback, RequestCallForwardCancel, RequestCallForwardSet, RequestCancel, RequestCancelExecution, RequestCancelInvite, RequestCancelMonitoring, RequestCancelNotReadyForMedia, RequestCancelReqGetAccessNumber, RequestCancelWorkbinNotifications, RequestChangeAgentStateReason, RequestChangeExecutionMode, RequestChangeMediaStateReason, RequestChangeOperationalMode, RequestChangePassword, RequestChangeProperties, RequestClearCall, RequestCloseStatistic, RequestCloseVoiceFile, RequestCollectDigits, RequestCompleteCampaign, RequestCompleteConference, RequestCompleteTransfer, RequestConference, RequestConnect, RequestCreateObject, RequestCustomCommand, RequestDataStreamClose, RequestDataStreamOpen, RequestDataStreamSend, RequestDeactivateAlarm, RequestDeactivateAlarms, RequestDeactivateApplicationAlarm, RequestDeactivateApplicationAlarms, RequestDebug, RequestDeleteFromConference, RequestDeleteObject, RequestDeletePair, RequestDeleteUserData, RequestDeliver, RequestDistributeEvent, RequestDistributeUserEvent, RequestDoNotDisturbOff, RequestDoNotDisturbOn, RequestExecute, RequestExecuteProcedure, RequestExecuteStrategy, RequestFindInteractions, RequestFindTarget, RequestForceUnloadCampaign, RequestGetAccessNumber, RequestGetActiveAlarms, RequestGetApplicationInfo, RequestGetBriefInfo, RequestGetCampaignStatus, RequestGetHostInfo, RequestGetInfo, RequestGetInteractionProperties, RequestGetLocaleSets, RequestGetSnapshotInteractions, RequestGetSolutionInfo, RequestGetStatistic, RequestGetStatistic, RequestGetStatisticEx, RequestGetStatisticProfile, RequestGetStatistics, RequestGetWorkbinContent, RequestGiveMusicTreatment, RequestGiveRingBackTreatment, RequestGiveSilenceTreatment, RequestHeartbeatData, RequestHistoryLog, RequestHold, RequestHoldCall, RequestInitiateConference, RequestInitiateTransfer, RequestIntrude, RequestJoin, RequestJoin, RequestLeaveInteraction, RequestListenDisconnect, RequestListenReconnect, RequestLoadCampaign, RequestLoadStrategy, RequestLockInteraction, RequestLogin, RequestLoginMailBox, RequestLogMessage, RequestLogout, RequestLogoutMailBox, RequestMakeCall, RequestMakePredictiveCall, RequestMergeCalls, RequestMessage, RequestMonitorNextCall, RequestMoveInteractions, RequestMuteTransfer, RequestNetworkAlternate, RequestNetworkConsult, RequestNetworkMerge, RequestNetworkPrivateService, RequestNetworkReconnect, RequestNetworkSingleStepTransfer, RequestNetworkTransfer, RequestNotify, RequestNotify, RequestNotReadyForMedia, RequestOpenStatistic, RequestOpenStatisticEx, RequestOpenVoiceFile, RequestPeekStatistic, RequestPlaceInQueue, RequestPlaceInWorkbin, RequestPlayVoiceFile, RequestPrivateService, RequestProtocolVersion, RequestPublish, RequestPull, RequestQueryAddress, RequestQueryCall, RequestQueryExecution, RequestQueryLocation, RequestQueryServer, RequestQuerySwitch, RequestReadAccount, RequestReadLocale, RequestReadObjectPermissions, RequestReadObjects, RequestReadObjects2, RequestReadOperationalMode, RequestReadPermissions, RequestReadSchemaInfo, RequestReconnectCall, RequestRedirectCall, RequestRefresh, RequestRegister, RequestRegisterAddress, RequestRegisterApplication, RequestRegisterCampaign, RequestRegisterClient, RequestRegisterClient, RequestRegisterClient, RequestRegisterClient, RequestRegisterClient, RequestRegisterClient, RequestRegisterClient, RequestRegisterClient2, RequestRegisterNotification, RequestRegisterPermissionsNotification, RequestReject, RequestReleaseCall, RequestReleaseParty, RequestReleaseSnapshot, RequestReleaseStrategy, RequestRemoveMedia, RequestReserveAgent, RequestReserveAgentAndGetAccessNumber, RequestRestoreSession, RequestResume, RequestResumeNotification, RequestRetrieveCall, RequestRetrieveEnvironment, RequestRouteCall, RequestSchemaFile, RequestSCSConnectionStatus, RequestSearch, RequestSendDtmf, RequestSendEvent, RequestSetCallInfo, RequestSetDialingMode, RequestSetDNDOff, RequestSetDNDOn, RequestSetInputMask, RequestSetMessageWaitingOff, RequestSetMessageWaitingOn, RequestSetMuteOff, RequestSetMuteOn, RequestSingleStepConference, RequestSingleStepTransfer, RequestStartApplication, RequestStartCallMonitoring, RequestStartDialing, RequestStartPlaceAgentStateReporting, RequestStartPlaceAgentStateReportingAll, RequestStartSolution, RequestStopAllApplications, RequestStopApplication, RequestStopApplicationGracefully, RequestStopCallMonitoring, RequestStopDialing, RequestStopPlaceAgentStateReporting, RequestStopPlaceAgentStateReportingAll, RequestStopProcessing, RequestStopSolution, RequestStopSolutionGracefully, RequestSubmit, RequestSubmit, RequestSubscribe, RequestSubscribe, RequestSubscribeAll, RequestSubscribeType, RequestSubscribeTypeKey, RequestSuspendNotification, RequestTakeSnapshot, RequestTransactionMonitoring, RequestTransfer, RequestUnloadCampaign, RequestUnlockInteraction, RequestUnregisterAddress, RequestUnregisterCampaign, RequestUnregisterClient, RequestUnregisterClient, RequestUnregisterClient, RequestUnRegisterClient, RequestUnregisterNotification, RequestUnregisterPermissionsNotification, RequestUnsubscribe, RequestUnsubscribe, RequestUnsubscribeAll, RequestUnsubscribeType, RequestUnsubscribeTypeKey, RequestUpdateAccount, RequestUpdateObject, RequestUpdatePermissions, RequestUpdateStatus, RequestUpdateUserData, RequestWorkbinNotifications, RequestWorkbinStatistic, RequestWorkbinTypesInfo, RequestWorkflowConfiguration, RequestXRequest, ResponseExecutionModeChanged

public abstract class Message
extends DataObject
implements ProtocolDescriptionSupport

This abstract class provides the interface used for all Event classes. When events are received from a server, your application will use this interface to process them.

Here is a sample of how you can solicit and receive an event from a server:

interactionServerProtocol.send(requestAgentLogin);
Message response = interactionServerProtocol.receive();


You can combine the send() and receive() methods into a single method call by using the request() method, like this:

Message response =
  interactionServerProtocol.request(requestAgentLogin);


You can also receive an unsolicited event:

Message unsolicitedEvent = interactionServerProtocol.receive();

As shown in the above code samples, the reponse to your request will come in the form of a Message. This is the interface implemented by all events in the Platform SDK. Some requests will be answered by an event that is specific to the request, while others will receive a more generic response of EventAck, which simply acknowledges that your request was successful. If a request fails, the server will send an EventError.

A successful RequestAgentLogin, for example, will receive an EventAck, while an unsuccessful one will receive an EventError. You can use a switch statement to test which response you received, as outlined here:

switch(response.messageId())
{
  case EventAck.ID:
  // The request succeeded, carry out appropriate processing...
  case EventError.ID:
  // The request failed, carry out appropriate processing...
  ...
}


Constructor Summary
protected Message(int id, java.lang.String name, ProtocolDescription description)
           
 
Method Summary
 Message cloneMessage()
           
abstract  Endpoint getEndpoint()
          Indicates server URI from which current message has been received.
abstract  java.lang.Object getMessageAttribute(java.lang.String index)
          Returns message attribute as object by specified index.
 ProtocolDescription getProtocolDescription()
           
abstract  int getProtocolId()
          Returns hash code of protocol object which handled the message.
 int messageId()
          Returns message id.
 java.lang.String messageName()
          Returns message name.
protected  void setProtocolDescription(ProtocolDescription description)
           
 
Methods inherited from class com.genesyslab.platform.commons.protocol.DataObject
equals, hashCode, toString, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Message

protected Message(int id,
                  java.lang.String name,
                  ProtocolDescription description)
Method Detail

messageId

public int messageId()
Returns message id.

Returns:
message id

messageName

public java.lang.String messageName()
Returns message name.

Returns:
message name

getMessageAttribute

public abstract java.lang.Object getMessageAttribute(java.lang.String index)
Returns message attribute as object by specified index. Returns null if no such attribute in the message.

Parameters:
index - index of attribute
Returns:
attribute or null

getProtocolId

public abstract int getProtocolId()
Returns hash code of protocol object which handled the message. When the message is not received from protocol the value of this property is zero.

Returns:
protocol hash code or zero.

getProtocolDescription

public ProtocolDescription getProtocolDescription()
Specified by:
getProtocolDescription in interface ProtocolDescriptionSupport

setProtocolDescription

protected void setProtocolDescription(ProtocolDescription description)

getEndpoint

public abstract Endpoint getEndpoint()
Indicates server URI from which current message has been received.

Returns:
Endpoint

cloneMessage

public Message cloneMessage()

Platform SDK Java 8.5 API Reference

Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 8.5.302.00
Copyright © 2006–2017 Genesys Telecommunications Laboratories, Inc. All rights reserved.