All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Foundation |
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES

*** This package contains classes that provide Binary Compatibility only, not Source Compatibility ***

Note:
  Extension of the classes in this package is prohibited unless otherwise documented. Similarly, extension or implementation of the interfaces in this package is prohibited except as documented.

## Package com.sas.services.events.discovery

Locate event brokers.

See:
Description

Interface Summary
EventBrokerDiscoveryServiceInterface | Deprecated. As of release 9.3, replaced by SAS Midtier Eventing Architecture.

Class Summary
EventBrokerDiscoveryService | Deprecated. As of release 9.3, replaced by SAS Midtier Eventing Architecture.
EventBrokerDiscoveryServiceFactory | Deprecated. As of release 9.3, replaced by SAS Midtier Eventing Architecture.

## Package com.sas.services.events.discovery Description

Locate event brokers.

# EventBrokerDiscovery Service

Overview

Usage

## Overview

The EventBrokerDiscovery Service provides the ability to locate one or more EventBroker services that can process a particular event. The EventBrokerDiscovery Service has the ability to locate brokers that have been deployed within the Discovery Service framework via Foundation Service deployment utilities. Likewise, the EventBrokerDiscovery Service can locate brokers that have been instantiated as standalone applications. Once an EventBrokerDiscovery service has been obtained, it can be used to send synchronous or asynchronous event requests for processing.

## Usage

To use the EventBrokerDiscovery Service it must be configured and deployed as a foundation service. Configuring foundation services is accomplished with the Foundation Services Manager Plug-in within the SAS Management Console application. Configuration information that is specific to an EventBrokerDiscovery service is contained within its initialization data. This information specifies details about how to locate brokers that have been deployed as standalone applications and have registered themselves with a remote object registry. The structure of this initialization data contains entries for each broker that has been registered to an RMI registry and thus is able to be looked up. Each entry is represented in URL format as follows:

     <EventBrokers>
        <Location url="//host:port/name"/>
        <Location url="//host:port/name"/>
                           ...
     </EventBrokers>

### Using the EventBrokerDiscovery Service

The following code segment shows how to obtain an EventBrokerDiscovery service after it has been deployed.

     final Class[] desiredServiceCapabilities = new Class[] {
         com.sas.services.events.discovery.EventBrokerDiscoveryServiceInterface.class};
     _eventBrokerDiscoveryService = (EventBrokerDiscoveryServiceInterface)
         DiscoveryService.defaultInstance().findService(new ServiceTemplate(desiredServiceCapabilities,
                                                                            null));//no additional filter criteria

Once an instance of an EventBrokerDiscovery service has been obtained it can then be used to locate desired EventBroker services. The following code segment locates all event brokers that can process a broadcast type of event that is named myEvent.

     Set brokerRefs = null;
     brokerRefs = _eventBrokerDiscoveryService.locateBrokers("myEvent",
                                                             EventBrokerDiscoveryServiceInterface.EVENT_TYPE_BROADCAST,
                                                             EventBrokerDiscoveryServiceInterface.LOCATE_ALL);
     // iterate over brokers
     Iterator iterator = brokerRefs.iterator();
     while( iterator.hasNext() )
     {
        EventBrokerServiceInterface _eventBrokerService = (EventBrokerServiceInterface) iterator.next();
        // send an event to be processed synchronously
        _eventBrokerService.sendSyncEvent(event);
     }

*** This package contains classes that provide Binary Compatibility only, not Source Compatibility ***

Note:
  Extension of the classes in this package is prohibited unless otherwise documented. Similarly, extension or implementation of the interfaces in this package is prohibited except as documented.

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Foundation |
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES

Copyright © 2009 SAS Institute Inc. All Rights Reserved.