JSR-043: JTAPI-1.4

javax.telephony.media.messaging
Interface ServiceEvent

All Superinterfaces:
MediaConstants, MediaEvent, MediaServiceConstants, MessageConstants
All Known Subinterfaces:
Async_ServiceEvent, ServiceRequestEvent

public interface ServiceEvent
extends MediaEvent, MessageConstants

A MediaEvent from a MessagingService or NamedService.

Since:
JTAPI-1.4

Fields inherited from interface javax.telephony.media.MediaServiceConstants
ev_BindAndConnect, ev_BindToCall, ev_BindToServiceName, ev_BindToTerminal, ev_BindToTerminalName, ev_Configure, ev_Connected, ev_DelegateToService, ev_Disconnected, ev_GetConfigSpec, ev_GetConfiguration, ev_GetParameters, ev_GetTerminal, ev_GetTerminalName, ev_GetUserValues, ev_GroupStop, ev_Release, ev_ReleaseDelegated, ev_ReleaseToDestroy, ev_ReleaseToService, ev_ReleaseToTag, ev_Retrieve, ev_Retrieved, ev_SetParameters, ev_SetUserDictionary, ev_SetUserValues, ev_TerminalIdle, ev_TriggerRTC
 
Fields inherited from interface javax.telephony.media.MediaConstants
e_OK, q_Duration, q_Standard, q_Stop
 
Fields inherited from interface javax.telephony.media.messaging.MessageConstants
e_NotFound, e_NotSupported, ev_Close, ev_OpenNamedService, ev_RegisterService, ev_ServiceClosed, ev_ServiceOpened, ev_UnregisterService, k_Error, k_EventData, k_Payload, k_Qualifier, k_ServiceName, k_Status, k_SubError, v_Null
 
Method Summary
 MessagingService getMessagingService()
          Get the associated MessagingService instance.
 NamedService getNamedService()
          Get the NamedService instance, if any.
 java.lang.String getServiceName()
          Get the name of the NamedService.
 void sendEvent(Symbol eventID, java.util.Dictionary payload)
          Send an Event to the NamedService of this event.
 
Methods inherited from interface javax.telephony.media.MediaEvent
getError, getEventID, getException, getPayload, getQualifier, getSubError, getWarning
 

Method Detail

getMessagingService

public MessagingService getMessagingService()
Get the associated MessagingService instance.
Returns:
a MessagingService instance.

getNamedService

public NamedService getNamedService()
Get the NamedService instance, if any.
Returns:
the NamedService instance associated with this event.

getServiceName

public java.lang.String getServiceName()
Get the name of the NamedService.
Returns:
the serviceName String from openNamedService or registerService

sendEvent

public void sendEvent(Symbol eventID,
                      java.util.Dictionary payload)
               throws ServiceException
Send an Event to the NamedService of this event.

Shorthand for

event.getNamedService().sendEvent(eventID, payload);
This method fails if getNamedService() returns null.
Parameters:
eventID - a Symbol to identify the event being sent.
payload - a Dictionary of eventData for the event being sent.
Throws:
ServiceClosedException - if the service is closed.

JSR-043: JTAPI-1.4

Send comments to: JSR-43@ectf.org