|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sap.mdm.notification.EventDispatcher
This class is responsible for dispatching all events coming from one specific MDM server
to all event listeners subscribed in this dispatcher. In order to define the set of
notifications available on the dispatcher it should be registered to one ore several groups of
notifications (see methods registerGlobalNotifications,
registerServerNotifications and registerRepositoryNotifications.
Note: MDM event notification is not a guarantee delivery system. In addition, there are known
limitations and deficiency. For example, AbstractDataListener.recordAdded is not trigger if a record is
created through import.
| Constructor Summary | |
EventDispatcher(com.sap.mdm.internal.notification.InternalEventDispatcher internalED)
For internal use only Copy constructor |
|
EventDispatcher(String connectionTag)
Constructor |
|
EventDispatcher(String connectionTag,
SocketFactory socketFactory)
Constructor |
|
| Method Summary | |
void |
addListener(MdmListener listener)
Add event listener |
boolean |
containListener(MdmListener listener)
Check if the specified event listener is already subscribed. |
MdmListener[] |
getListeners()
Returns all event listeners. |
String |
getServerName()
Returns the name of MDM server this dispatcher connected to. |
boolean |
isConnected()
Verify if this dispatcher connected to MDM server |
boolean |
isDataNotificationsRegistered(DataEventRegistrationSet registrationSet,
RepositoryIdentifier reposId)
Check if this event dispatcher is registered for the specified set of data notifications. |
boolean |
isDataNotificationsRegistered(RepositoryIdentifier reposId)
Deprecated. replaced by isDataNotificationsRegistered(DataEventRegistrationSet, RepositoryIdentifier) |
boolean |
isGlobalNotificationsRegistered()
Deprecated. replaced by isGlobalNotificationsRegistered(GlobalEventRegistrationSet) |
boolean |
isGlobalNotificationsRegistered(GlobalEventRegistrationSet registrationSet)
Check if this event dispatcher is registered for the specified set of global notifications. |
boolean |
isRepositoryNotificationsRegistered(RepositoryEventRegistrationSet registrationSet,
RepositoryIdentifier reposId)
Check if this event dispatcher is registered for the specified set of repository notifications. |
boolean |
isRepositoryNotificationsRegistered(RepositoryIdentifier reposId)
Deprecated. replaced by isRepositoryNotificationsRegistered(RepositoryEventRegistrationSet, RepositoryIdentifier) |
boolean |
isServerNotificationsRegistered()
Deprecated. replaced by isServerNotificationsRegistered(ServerEventRegistrationSet) |
boolean |
isServerNotificationsRegistered(ServerEventRegistrationSet registrationSet)
Check if this event dispatcher is registered for the specified set of server notifications. |
void |
registerDataNotifications(DataEventRegistrationSet registrationSet,
UserSessionContext ctx,
String repositoryUserPassword)
Register this event dispatcher for data type notifications defined in the specified registration set. |
void |
registerDataNotifications(String repositoryUserName,
String repositoryUserPassword,
RepositoryIdentifier reposId,
RegionProperties dataRegion)
Deprecated. replaced by registerDataNotifications(DataEventRegistrationSet, UserSessionContext, String) |
void |
registerDataNotificationsBySessionId(DataEventRegistrationSet registrationSet,
UserSessionContext ctx,
String sessionId)
For internal use only Register this event dispatcher for the specified set of data type notifications After the repository is stopped or server is stopped the registration for data notifications is not refreshed automatically. |
void |
registerGlobalNotifications()
Deprecated. replaced by registerGlobalNotifications(GlobalEventRegistrationSet) |
void |
registerGlobalNotifications(GlobalEventRegistrationSet registrationSet)
Register this event dispatcher for global type notifications defined in the specified registration set. |
void |
registerRepositoryNotifications(RepositoryEventRegistrationSet registrationSet,
RepositorySessionContext ctx,
String repositoryUserPassword)
Register this event dispatcher for repository type notifications defined in the specified registration set. |
void |
registerRepositoryNotifications(String repositoryUserName,
String repositoryUserPassword,
RepositoryIdentifier reposId)
Deprecated. replaced by registerRepositoryNotifications(RepositoryEventRegistrationSet, RepositorySessionContext, String) |
void |
registerRepositoryNotificationsBySessionId(RepositoryEventRegistrationSet registrationSet,
RepositorySessionContext ctx,
String sessionId)
For internal use only Register this event dispatcher for the specified set of repository type notifications After the repository is unmounted or the server is stopped the registration for repository notifications is not refreshed automatically. |
void |
registerServerNotifications(ServerEventRegistrationSet registrationSet,
ServerSessionContext ctx,
String serverUserPassword)
Register this event dispatcher for server type notifications defined in the specified registration set. |
void |
registerServerNotifications(String serverUserName,
String serverUserPassword)
Deprecated. replaced by registerServerNotifications(ServerEventRegistrationSet, ServerSessionContext, String) |
void |
registerServerNotificationsBySessionId(ServerEventRegistrationSet registrationSet,
ServerSessionContext ctx,
String sessionId)
For internal use only Register this event dispatcher for all server type notifications After the server is stopped the registration for server notifications is not refreshed automatically. |
void |
registerTrustedDataNotifications(String repositoryUserName,
RepositoryIdentifier reposId,
RegionProperties dataRegion)
Deprecated. replaced by registerDataNotifications(DataEventRegistrationSet, UserSessionContext, String) |
void |
registerTrustedRepositoryNotifications(String repositoryUserName,
RepositoryIdentifier reposId)
Deprecated. replaced by registerRepositoryNotifications(RepositoryEventRegistrationSet, RepositorySessionContext, String) |
void |
registerTrustedServerNotifications(String serverUserName)
Deprecated. replaced by registerServerNotifications(ServerEventRegistrationSet, ServerSessionContext, String) |
void |
removeAllListeners()
Remove all event listeners |
void |
removeListener(MdmListener listener)
Remove event listener |
void |
terminate()
Terminates the event dispatcher. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public EventDispatcher(String connectionTag)
throws ConnectionException
connectionTag - server name
ConnectionException
public EventDispatcher(String connectionTag,
SocketFactory socketFactory)
throws ConnectionException
connectionTag - server namesocketFactory - the factory of secure socket. If null, a plain socket is used
ConnectionExceptionpublic EventDispatcher(com.sap.mdm.internal.notification.InternalEventDispatcher internalED)
ConnectionException| Method Detail |
public String getServerName()
public void registerGlobalNotifications()
throws ConnectionException,
CommandException
registerGlobalNotifications(GlobalEventRegistrationSet)
ConnectionException - if any connection problem occur.
CommandException - if the problem occur during any command evaluation.
public void registerGlobalNotifications(GlobalEventRegistrationSet registrationSet)
throws ConnectionException,
CommandException
registrationSet - the set of global events that should be registered.
ConnectionException - if any connection problem occur.
CommandException - if the problem occur during any command evaluation.public boolean isGlobalNotificationsRegistered()
isGlobalNotificationsRegistered(GlobalEventRegistrationSet)
true if dispatcher is registered for global notifications,
false otherwise.public boolean isGlobalNotificationsRegistered(GlobalEventRegistrationSet registrationSet)
registrationSet - the set of global events which registration should be checked.
true if dispatcher is registered for global notifications,
false otherwise.
public void registerServerNotifications(String serverUserName,
String serverUserPassword)
throws ConnectionException,
CommandException
registerServerNotifications(ServerEventRegistrationSet, ServerSessionContext, String)
serverUserName - user name for the serverserverUserPassword - server password
ConnectionException - if any connection problem occur.
CommandException - if the problem occur during any command evaluation.
public void registerServerNotifications(ServerEventRegistrationSet registrationSet,
ServerSessionContext ctx,
String serverUserPassword)
throws ConnectionException,
CommandException
registrationSet - the set of server events that should be registered.ctx - ServerSessionContextserverUserPassword - server password
ConnectionException - if any connection problem occur.
CommandException - if the problem occur during any command evaluation.
public void registerServerNotificationsBySessionId(ServerEventRegistrationSet registrationSet,
ServerSessionContext ctx,
String sessionId)
throws ConnectionException,
CommandException
registrationSet - the set of server events which registration should be checked.ctx - ServerSessionContextsessionId - an authenticated server session ID
ConnectionException - if any connection problem occur.
CommandException - if the problem occur during any command evaluation.
public void registerTrustedServerNotifications(String serverUserName)
throws ConnectionException,
CommandException
registerServerNotifications(ServerEventRegistrationSet, ServerSessionContext, String)
serverUserName - user name for the server
ConnectionException - if any connection problem occur.
CommandException - if the problem occur during any command evaluation.public boolean isServerNotificationsRegistered()
isServerNotificationsRegistered(ServerEventRegistrationSet)
true if dispatcher is registered for server notifications,
false otherwise.public boolean isServerNotificationsRegistered(ServerEventRegistrationSet registrationSet)
registrationSet - the set of server events which registration should be checked.
true if dispatcher is registered for server notifications,
false otherwise.
public void registerRepositoryNotifications(String repositoryUserName,
String repositoryUserPassword,
RepositoryIdentifier reposId)
throws CommandException,
ConnectionException
registerRepositoryNotifications(RepositoryEventRegistrationSet, RepositorySessionContext, String)
repositoryUserName - user name for repositoryrepositoryUserPassword - repository passwordreposId - repository ID
ConnectionException - if any connection problem occur.
CommandException - if the problem occur during any command evaluation.
public void registerRepositoryNotifications(RepositoryEventRegistrationSet registrationSet,
RepositorySessionContext ctx,
String repositoryUserPassword)
throws CommandException,
ConnectionException
registrationSet - the set of repository events that should be registered.ctx - RepositorySessionContextrepositoryUserPassword - repository password
ConnectionException - if any connection problem occur.
CommandException - if the problem occur during any command evaluation.
public void registerRepositoryNotificationsBySessionId(RepositoryEventRegistrationSet registrationSet,
RepositorySessionContext ctx,
String sessionId)
throws CommandException,
ConnectionException
registrationSet - the set of repository events which registration should be checked.ctx - RepositorySessionContextsessionId - an authenticated repository session ID
ConnectionException - if any connection problem occur.
CommandException - if the problem occur during any command evaluation.
public void registerTrustedRepositoryNotifications(String repositoryUserName,
RepositoryIdentifier reposId)
throws CommandException,
ConnectionException
registerRepositoryNotifications(RepositoryEventRegistrationSet, RepositorySessionContext, String)
repositoryUserName - user name for repositoryreposId - repository ID
ConnectionException - if any connection problem occur.
CommandException - if the problem occur during any command evaluation.public boolean isRepositoryNotificationsRegistered(RepositoryIdentifier reposId)
isRepositoryNotificationsRegistered(RepositoryEventRegistrationSet, RepositoryIdentifier)
reposId - repository ID
true if dispatcher is registered for repository notifications,
false otherwise.
public boolean isRepositoryNotificationsRegistered(RepositoryEventRegistrationSet registrationSet,
RepositoryIdentifier reposId)
registrationSet - the set of repository events which registration should be checked.reposId - repository ID
true if dispatcher is registered for repository notifications,
false otherwise.
public void registerDataNotifications(String repositoryUserName,
String repositoryUserPassword,
RepositoryIdentifier reposId,
RegionProperties dataRegion)
throws CommandException,
ConnectionException
registerDataNotifications(DataEventRegistrationSet, UserSessionContext, String)
repositoryUserName - user namerepositoryUserPassword - repository passwordreposId - repository IDdataRegion - region properties
ConnectionException - if any connection problem occur.
CommandException - if the problem occur during any command evaluation.
public void registerDataNotifications(DataEventRegistrationSet registrationSet,
UserSessionContext ctx,
String repositoryUserPassword)
throws CommandException,
ConnectionException
registrationSet - the set of data events that should be registered.ctx - UserSessionContextrepositoryUserPassword - repository password
ConnectionException - if any connection problem occur.
CommandException - if the problem occur during any command evaluation.
public void registerDataNotificationsBySessionId(DataEventRegistrationSet registrationSet,
UserSessionContext ctx,
String sessionId)
throws CommandException,
ConnectionException
registrationSet - the set of data events which registration should be checked.ctx - UserSessionContextsessionId - an authenticated user session ID
ConnectionException - if any connection problem occur.
CommandException - if the problem occur during any command evaluation.
public void registerTrustedDataNotifications(String repositoryUserName,
RepositoryIdentifier reposId,
RegionProperties dataRegion)
throws CommandException,
ConnectionException
registerDataNotifications(DataEventRegistrationSet, UserSessionContext, String)
repositoryUserName - user namereposId - repository IDdataRegion - region properties
ConnectionException - if any connection problem occur.
CommandException - if the problem occur during any command evaluation.public boolean isDataNotificationsRegistered(RepositoryIdentifier reposId)
isDataNotificationsRegistered(DataEventRegistrationSet, RepositoryIdentifier)
reposId - repository ID
true if dispatcher is registered for data notifications,
false otherwise.
public boolean isDataNotificationsRegistered(DataEventRegistrationSet registrationSet,
RepositoryIdentifier reposId)
registrationSet - the set of data events which registration should be checked.reposId - repository ID
true if dispatcher is registered for data notifications,
false otherwise.public void addListener(MdmListener listener)
listener - public void removeListener(MdmListener listener)
listener - public void removeAllListeners()
public boolean containListener(MdmListener listener)
listener -
true if listener is already subscribed, false otherwise.public MdmListener[] getListeners()
public void terminate()
public boolean isConnected()
true if MDM server is running and EventDispatcher is successfully
connected to it, otherwise false
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Copyright 2004-2007 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.
These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies (SAP Group) for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.