Platform SDK Java 8.5 API Reference

com.genesyslab.platform.applicationblocks.commons.broker
Class BrokerServiceBase<T>

java.lang.Object
  extended by com.genesyslab.platform.applicationblocks.commons.broker.BrokerServiceBase<T>
All Implemented Interfaces:
PublishingService<T>, SubscriptionService<T>
Direct Known Subclasses:
AsyncBrokerServiceBase, BrokerService, MessageBrokerService

Deprecated. Message Broker Application Block is deprecated. Use setMessageHandler(handler) to handle incoming messages asynchronously.

@Deprecated
public class BrokerServiceBase<T>
extends java.lang.Object
implements PublishingService<T>, SubscriptionService<T>

BrokerServiceBase class implements the Publish/Subscribe pattern.


Constructor Summary
  BrokerServiceBase()
          Deprecated.  
protected BrokerServiceBase(int capacity)
          Deprecated. 
 
Method Summary
protected  void notify(T obj)
          Deprecated. Calls subscribers' processing/handling methods of to process publishing event.
protected  void onNotificationException(Subscriber<T> subscriber, java.lang.Exception e)
          Deprecated. Allows to handle exceptions thrown by subscribers' publishing event processing methods.
protected  void onPublish(T obj)
          Deprecated. Event handler called when publish is initiated.
 void publish(T obj)
          Deprecated. Publishes an event.
 void register(Action<T> handler, Predicate<T> filter)
          Deprecated. Subscribes an action to be performed when a publishing event occurs.
 void register(Subscriber<T> subscriber)
          Deprecated. Registers a subscriber for notifications about and processing of publishing events.
protected  void switchSubscribersList(java.util.List<Subscriber<T>> newList)
          Deprecated. It is sometimes needed to switch the type of the list holding subscribers.
 void unregister(Action<T> handler)
          Deprecated. Unregisters a subscriber from notifications about publishing activities.
 void unregister(Subscriber<T> subscriber)
          Deprecated. Unregisters a subscriber from notifications about publishing activities.
protected  void unregisterAll()
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BrokerServiceBase

public BrokerServiceBase()
Deprecated. 

BrokerServiceBase

@Deprecated
protected BrokerServiceBase(int capacity)
Deprecated. 

Method Detail

publish

public void publish(T obj)
Deprecated. 
Publishes an event.

Specified by:
publish in interface PublishingService<T>
Parameters:
obj - Object that is used for event processing

onPublish

protected void onPublish(T obj)
Deprecated. 
Event handler called when publish is initiated. Default implementation calls subscribers' processing/handling methods of to process publishing event.

Parameters:
obj - Object that is used for a publishing event processing

register

public void register(Subscriber<T> subscriber)
Deprecated. 
Registers a subscriber for notifications about and processing of publishing events. Implements subscription functionality of the Publish/Subscribe pattern.

Specified by:
register in interface SubscriptionService<T>
Parameters:
subscriber - subscriber object being registered

register

public void register(Action<T> handler,
                     Predicate<T> filter)
Deprecated. 
Subscribes an action to be performed when a publishing event occurs. Implements subscription functionality of the Publish/Subscribe pattern. The method also processes the filter custom attributes which allows a user to define filters externally.

Specified by:
register in interface SubscriptionService<T>
Parameters:
handler - the method that performs an action on the specified object when a publishing event occurs
filter - Filter predicate that allows checking whether publishing event should be processed or ignored

unregister

public void unregister(Subscriber<T> subscriber)
Deprecated. 
Unregisters a subscriber from notifications about publishing activities. Implements subscription functionality of the Publish/Subscribe pattern.

Specified by:
unregister in interface SubscriptionService<T>
Parameters:
subscriber - subscriber object being unregistered

unregister

public void unregister(Action<T> handler)
Deprecated. 
Unregisters a subscriber from notifications about publishing activities. Implements subscription functionality of the Publish/Subscribe pattern.

Specified by:
unregister in interface SubscriptionService<T>
Parameters:
handler - the method that performs an action on the specified object when a publishing event occurs

unregisterAll

protected void unregisterAll()
Deprecated. 

notify

protected void notify(T obj)
Deprecated. 
Calls subscribers' processing/handling methods of to process publishing event.

Parameters:
obj - object that is used for a publishing event processing

onNotificationException

protected void onNotificationException(Subscriber<T> subscriber,
                                       java.lang.Exception e)
Deprecated. 
Allows to handle exceptions thrown by subscribers' publishing event processing methods.

Parameters:
subscriber - exception originator
e - thrown exception

switchSubscribersList

protected void switchSubscribersList(java.util.List<Subscriber<T>> newList)
Deprecated. 
It is sometimes needed to switch the type of the list holding subscribers. This should be done with proper synchronization. This method supports that synchronization. It uses addAll() method of Collection interface to populate new list with old values.

Parameters:
newList - new list

Platform SDK Java 8.5 API Reference

Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 8.5.302.00
Copyright © 2006–2017 Genesys Telecommunications Laboratories, Inc. All rights reserved.