| java.lang.Object org.obe.spi.util.ApplicationEventUtil
ApplicationEventUtil | public class ApplicationEventUtil (Code) | | Provides utility methods for handling application events.
author: Adrian Price |
Method Summary | |
public static Date | handleTimeout(ApplicationEventBroker.TemporalEventSubscription subscription, Date scheduledExecutionTime, ServiceManager svcMgr) Handles the timeout for a temporal event subscription. | public static Object[] | toStrings(Object[] array) Converts the elements of an array to strings.
Parameters: array - An array of objects. | public static void | validateSubscription(String eventType, Date effective, Date expiry, int count, String[] correlationKeys) Validates the parameters for an application event subscription. | public static void | validateSubscription(String eventType, Date effective, Date expiry, int count, Duration interval, String[] correlationKeys) Validates the parameters for a temporal event subscription. |
handleTimeout | public static Date handleTimeout(ApplicationEventBroker.TemporalEventSubscription subscription, Date scheduledExecutionTime, ServiceManager svcMgr)(Code) | | Handles the timeout for a temporal event subscription. The method
decrements the subscription's event count. Then, for a recurring
subscription that hasn't expired, it computes the time at which the next
event should occur, according to whether the subscription is recoverable.
If the subscription will have expired before the next occurrence or if
its event count has reached 0, the subscription is cancelled.
Finally, the listeners are notified asynchronously of the event
occurrence.
Parameters: subscription - The temporal event subscription. Parameters: scheduledExecutionTime - The time at which the timeout was scheduledto occur (not necessarily the time at which it actually occurred). Parameters: svcMgr - The service manager to use. For an unexpired recurring subscription, the time at which thenext temporal event should occur, otherwise null . |
toStrings | public static Object[] toStrings(Object[] array)(Code) | | Converts the elements of an array to strings.
Parameters: array - An array of objects. The input array , with all elements replaced by theresult of calling toString() on each. |
validateSubscription | public static void validateSubscription(String eventType, Date effective, Date expiry, int count, String[] correlationKeys)(Code) | | Validates the parameters for an application event subscription.
Parameters: eventType - Parameters: effective - Parameters: expiry - Parameters: count - Parameters: correlationKeys - throws: IllegalArgumentException - if any of the parameter values areincorrect. |
validateSubscription | public static void validateSubscription(String eventType, Date effective, Date expiry, int count, Duration interval, String[] correlationKeys)(Code) | | Validates the parameters for a temporal event subscription.
Parameters: eventType - Parameters: effective - Parameters: expiry - Parameters: count - Parameters: interval - Parameters: correlationKeys - throws: IllegalArgumentException - if any of the parameter values areincorrect. |
|
|