|
JSR-043: JTAPI-1.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Holds the methods that extend MediaProvider for Service registry and Message delivery.
The MessagingService allows cooperating applications to send commands and event to each other.
Method Summary | |
void |
addListener(java.util.EventListener listener)
Add a Listener for Events dispatched by this MessagingService. |
Async_ServiceEvent |
async_close(java.lang.String serviceName)
Async form of close. |
Async_ServiceEvent |
async_openNamedService(java.lang.String serviceName,
NamedServiceListener listener,
java.util.Dictionary attributes)
Async form of openNamedService. |
Async_ServiceEvent |
async_registerService(java.lang.String serviceName,
NamedServiceListener listener,
java.util.Dictionary attributes)
Async form of registerService. |
Async_ServiceEvent |
async_unregisterService(java.lang.String serviceName)
Async form of unregisterService. |
void |
close(java.lang.String serviceName)
Unregister the given serviceName and close all NamedService connections to that serviceName. |
NamedService |
openNamedService(java.lang.String serviceName,
NamedServiceListener listener,
java.util.Dictionary attributes)
Find a service and establish a messaging connection. |
void |
registerService(java.lang.String serviceName,
NamedServiceListener listener,
java.util.Dictionary attributes)
Register this MediaProvider as a NamedService with the Server. |
void |
removeListener(java.util.EventListener listener)
Remove an EventListener from this NamedService. |
void |
unregisterService(java.lang.String serviceName)
Unregister the serviceName, preventing further openings. |
Method Detail |
public NamedService openNamedService(java.lang.String serviceName, NamedServiceListener listener, java.util.Dictionary attributes) throws ServiceException
When the connection is closed (by any of releaseService(), unregisterService(), or session death), the other end is notified via onServiceClosed().
serviceName
- the String name to be registeredlistener
- for Events and Requests from the service.attributes
- a Dictionary to restrict the choice of
providers that supply serviceNameNotRegisteredException
- if name is not registeredpublic Async_ServiceEvent async_openNamedService(java.lang.String serviceName, NamedServiceListener listener, java.util.Dictionary attributes) throws ServiceException
serviceName
- the String name to be registeredlistener
- for Events and Requests from the service.attributes
- a Dictionary to restrict the choice of
providers that supply serviceName
Async form of openNamedService.ServiceException
- if serviceName cannot be opened.public void registerService(java.lang.String serviceName, NamedServiceListener listener, java.util.Dictionary attributes) throws ServiceException
The attributes are stored as part of the registration. The supplied attributes restrict when openNamedService will find this registered service. For this service to be found, the attributes supplied to openNamedService must be a superset of the attributes supplied to registerService.
A NamedService is created in the service supplier when another application (the service subscriber) connects to this serviceName (using openNamedService). The given NamedServiceListener is added to each such NamedService and is used for two purposes:
serviceName
- the String by which this NamedService can be opened.listener
- a NamedServiceListener for new message connections.attributes
- a Dictionary of selection attributesNotRegisteredException
- if could not registerNamedServiceListener
public Async_ServiceEvent async_registerService(java.lang.String serviceName, NamedServiceListener listener, java.util.Dictionary attributes) throws ServiceException
serviceName
- the String by which this NamedService can be opened.listener
- a NamedServiceListener for new message connections.attributes
- a Dictionary of selection attributesServiceException
- if serviceName cannot be registered.public void unregisterService(java.lang.String serviceName) throws ServiceException
serviceName
- the String by which this NamedService was registered.ServiceException
- if serviceName cannot be unregistered.public Async_ServiceEvent async_unregisterService(java.lang.String serviceName) throws ServiceException
serviceName
- the String by which this NamedService was registered.public void close(java.lang.String serviceName) throws ServiceException
serviceName
- the String by which this NamedService can be opened.ServiceException
- if serviceName cannot be closed.public Async_ServiceEvent async_close(java.lang.String serviceName) throws ServiceException
serviceName
- the String by which this NamedService can be opened.ServiceException
- if serviceName cannot be closed.public void addListener(java.util.EventListener listener)
To get asynchronous notification of MessagingService method completion, use
addListener(Async_MessagingServiceListener)
Note: This method accepts any java.util.EventListener but ServiceEvents are delivered only to a Async_MessagingServiceListener. Unless/until the MessagingService is extended (for example, by a JtapiPeer vendor) to create other classes of events, other Listeners are not invoked.
Async_MessagingServiceListener
public void removeListener(java.util.EventListener listener)
Async_MessagingServiceListener
|
JSR-043: JTAPI-1.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |