com.neeve.aep
Class AepBusManager

java.lang.Object
  extended by com.neeve.util.UtlListElement
      extended by com.neeve.aep.AepBusManager
All Implemented Interfaces:
IEventHandler

public final class AepBusManager
extends UtlListElement
implements IEventHandler

The AEP bus manager.

The AEP bus binding manager class. An instance of this class is created for each bus configured for an AEP application. This class is responsible for
- Opening the bus. It is also responsible for including retrying the open in case of open failure and scheduling reopens when bindings fail. - Dispatching events to the application indicating when channels change state from offline to online and vice versa - Handling and routing of events from the binding to the application.

Threading:
A bus handler is not safe for concurrent access by multiple threads.

Nested Class Summary
static class AepBusManager.State
          Enumerates the different states the bus handler can be in
 
Field Summary
 
Fields inherited from class com.neeve.util.UtlListElement
count, head, next, prev
 
Method Summary
 MessageBusBinding getBusBinding()
          Get the message bus binding managed by an AEP bus manager.
 MessageBusDescriptor getBusDescriptor()
          Get the descriptor of the message bus binding managed by an AEP bus manager.
 MessageChannel getChannel(String channelName)
          Get the message channel managed by an AEP bus manager.
 AepBusManagerStats getStats()
          Get an AEP bus manager's statistics object.
 boolean isInternal()
          Tests if this is an internal bus binding.
 void onEvent(Event event)
          Implementation of IEventHandler.onEvent(com.neeve.event.Event)
 String toString()
          Get a string representation of this object
 
Methods inherited from class com.neeve.util.UtlListElement
count, insertAfter, insertBefore, isLinked, next, previous, unlink, wipe
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

isInternal

public final boolean isInternal()
Tests if this is an internal bus binding.

An AepEngine creates internal bus bindings for control information. This method tests if this bus manager is for such a bus.

Returns:
True if this is a bus manager for an internal bus binding.

getBusDescriptor

public final MessageBusDescriptor getBusDescriptor()
Get the descriptor of the message bus binding managed by an AEP bus manager.


getStats

public final AepBusManagerStats getStats()
Get an AEP bus manager's statistics object.


getBusBinding

public final MessageBusBinding getBusBinding()
Get the message bus binding managed by an AEP bus manager.

The binding returned by this method can be null in case the manager is in the open process.

Note: This method is for internal use. Developers should never need to use this method. To gain access to a binding, developers should wait for the appropriate lifecycle event that notifies of binding creation/open


getChannel

public final MessageChannel getChannel(String channelName)
Get the message channel managed by an AEP bus manager.

Parameters:
channelName - The name of the channel to retrieve

The channel returned by this method can be null in case the manager is in the open process.

Note: This method is for internal use. Developers should never need to use this method. To gain access to a channel, developers should wait for the appropriate lifecycle event that notifies of channel creation/open


onEvent

public final void onEvent(Event event)
Implementation of IEventHandler.onEvent(com.neeve.event.Event)

Specified by:
onEvent in interface IEventHandler
Parameters:
event - The event to be handled.

toString

public final String toString()
Get a string representation of this object

Overrides:
toString in class Object


Copyright © 2016 Neeve Research, LLC. All Rights Reserved.