Installing Upgrading Designing Configuring Deploying Monitoring Administering Troubleshooting Reference JBI Components
Close Print View
Reference: AlertNotificationService
 

Classic Java CAPS

Java CAPS Management and Monitoring APIs

Java CAPS Management Client

JavaDocs

Targets

Getting Started Using APIs

To Start Using APIs to Create Applications

Connecting to the Server Through APIs

Connection Type Definition

CAPSManagementClientFactory Definition

The Alert Management API

Support for Databases

AlertConfigurationService

AlertNotificationService

Services -- JavaCAPSManagementAPI

Administration Service

Runtime Management Service

Configuration Service

Deployment Service

Installation Service

Performance Measurement Service

Alert Management Service

Alert Administration Service

Alert Notification Service

Alert Configuration Service

JMS Management Service

Log Management Service

BPEL Management Service

Master Data Management (MDM) Service

Sun Adapters Management Service

Target Option Behavior for the Management Client

Writing Java Code to Access APIs Using Java Code Samples

Setting Up Databases

To Set Up a Database Using Enterprise Manager

To Set Up a Database Using a Scripting Utility

Using Oracle and Other Databases for Alert Persistence

To Set Up an Oracle Database for Alert Persistence

Oracle Script Examples

Setting Up Scripting Engines

Downloading, Installing, and Setting Up A Scripting Environment

Setting Up a Scripting Environment to Invoke Java CAPS Management and Monitoring APIs

To Modify the Environment Variables in env.bat

Using a Scripting Language to Exercise the Java CAPS Management and Monitoring APIs

Exercising the Administration Service

Exercising the Configuration Service

Exercising the Deployment Service

Exercising the Installation Service

Exercising the Runtime Management Service

Exercising the JMS Management Service

Exercising the BPEL Management Service

Exercising the HTTP Administration Service

Exercising the Notification Service

JRuby Integrated into NetBeans IDE

Java CAPS JMS Reference

WebLogic Server Components

Understanding Sun Master Index Configuration Options (Repository)

Understanding Sun Master Index Processing (Repository)

Understanding the Sun Match Engine

Understanding the Business Rules Method Palette

About Application Adapters

About Communication Adapters

About Database Adapters

About Web Server Adapters

What's New in the Sun TCP/IP HL7 Adapter

Java EE Based Components

Sun Master Data Management Suite Primer

Understanding Sun Master Index Configuration Options

Understanding the Master Index Match Engine

Understanding the Master Index Standardization Engine

United States Patient Solution Using MDM

Australia Patient Solution Using MDM

United Kingdom Patient Solution Using MDM

AlertNotificationService

The Alert Notification Service notifies the client, such as Groovy, of an event. However, for the client to receive notifications it must subscribe using the Alert Notification Service API. There is a noticeable change between prior releases and Release 6 regarding reliable and non-reliable clients. With Release 5.1.x, the client was reliable, meaning that no events could be removed until their delivery was confirmed. With Release 6, a client can be non-reliable, which means there is no guarantee the client will receive every event. In Release 6, the last client set as “reliable” makes all clients before it unreliable.

Alerts Notification Service API

/**
     * request to the event management system to get an events that satisfy the
     * filter provided. The method will validate the call-back object for the 
     * call-back method name and parameter (see below for more information).
     * This method allow the caller to register multiple time with diffrent
     * filtering,target and call-back parameters.
     * 
     * @param filter - the filter that will be applied to the events prior to 
     *                 forwarding them to this client. the valid keys for the map
     *                 are defined in  {@link com.sun.caps.management.api.alerts.
     *                 AlertNotificationFilterElementType}.
     *                 For the ALERTSEVERITY type the valid value are define in
     *                 {@link com.sun.caps.management.api.alerts.AlertLevelType#}.
     *                 
     * @param targetNames - the server instances that is subscription will initially be
     *                      filtered on. if targetNames is/are defined it/they have 
     *                      precedence over the servername element in the filter 
     *                      mentioned above.
     *                  
     * @param CallbackObject an instance of the client object that contain the 
     *                       call back method to be called when event received 
     *                       from the server.
     * @param methodName the method name to be invoke when event received from the 
     *                       server.
     *       IMPORTANT: THE METHOD MUST HAVE ONE PARAMETER OF TYPE 
     *                      {@link com.sun.caps.management.api.alerts.Alert"} ALERT.
     * 
     * @param requireReliableDelivery - true mean this client request that all events 
     *                       should be delivered to him reliably otherwise the client 
     *                       may miss event.
     *       IMPORTANT: THE SYSTEM ALLOW ONLY ONE RELIABLE CLIENT. THE  LAST CLIENT
     *                       TO SET IT TO TRUE TAKES OVER THE RELIABLE DELIVERY. IT 
     *                       WILL AFFECT ALL THE SUBSCRIPTIONS DONE BY THE CLIENT IN 
     *                       THE CURRENT APPLICATION SESSION.
     *                  
     * @param exceptionCallBack an instance of the client object that contain the call 
     *                       back method to be called when an connectivity exception 
     *                       is generated by this service.
     * 
     * @param exceptionMethodName the method name to be invoke when an exception is 
     *                       generated by this service.
     *       IMPORTANT: THE METHOD MUST HAVE ONE PARAMETER OF TYPE 
     *                       {@link java.lang.Exception} EXCEPTION. 
     *       
     *       NOTE: the exception call be should be the same for all subscriptions 
     *                       calls otherwise the last the exception call back 
     *                       defined by the last subscription will be used.
     *     
     * @return Unique identification string that need to be used in the un-subscribe 
     *                       operation.
     *                             
     * @throws ManagementRemoteException 
     *         1. if fail to communicate with the event management system 
     *         2. unable to invoke call back method because of invalid parameter.
     */
    public String subscribe(Map filter,String[] targetName,Object CallbackObject,String
     *          methodName, Boolean requireReliableDelivery,Object exceptionCallBack,
                String exceptionMethodName) throws ManagementRemoteException;
    
    /**
     * request the event management system to stop forwarding events to this client 
     * based on the subscription the caller made using the subscribe method.
     * once all the caller unsubscribe all the IDs any events that are waiting 
     * to be delivered to this client will be discarded.
     * 
     * @param - subscriptionIDs A list of IDs return by the subscribe call/s  that the
     *          caller wish to unsubscribe from.
     *                 
     * @throws ManagementRemoteException if fail to communicate with the Domain server.
     */
    public void unsubscribe(String[] subscriptionIDs) throws ManagementRemoteException;
    
    /**
     * utility method that returns the parameters the client used to subscribe for 
     * alerts for the given subscription ID.
     * 
     * @param - subscriptionIDs list return by the subscribe call/s.
     *          
     * return a map keyed IDs on the provided as a parameter and values as 
     *        SubcriptionInformationinstances.
     *        @see com.sun.caps.management.api.alerts.SubcriptionInformation 
     * @throws ManagementRemoteException if fail to communicate with the Domain server.
     */
    public Map getSubscriptionInformation(String[] subscriptionIDs);