public abstract class AbstractHK2TopicOrientedApplication extends TopicOrientedApplication
AbstractHK2TopicOrientedApplication is the base class for TOA Applications that want to leverage the
HK2 Dependency Injection Framework. HK2 provides a light-weight but powerful dependency injection
mechanism. The AbstractHK2TopicOrientedApplication integrates HK2 with Rumi Application Server and the Hornet Application
Framework so that HK2 can be used to discover Rumi Managed Objects and Hornet Applications gain access to a
Application ServiceLocator. Hornet Applications that want to leverage HK2 must extend this
class and not TopicOrientedApplication.com.neeve.managed.toa.hk2TopicOrientedApplication.ChannelJoin_tracer, PROP_ALERT_TRACE_LEVEL, PROP_ALERT_TRACE_LEVEL_DEFAULT, PROP_DEFAULT_INJECTION_DELAY, PROP_DEFAULT_INJECTION_DELAY_DEFAULT, PROP_DISABLE_COMPAT_CHECK, PROP_DISABLE_COMPAT_CHECK_DEFAULT, PROP_ENABLED_DELAYED_ACK_CONTROLLER, PROP_ENABLED_DELAYED_ACK_CONTROLLER_DEFAULT, PROP_FAIL_ON_SERVICE_CHANNEL_NAME_COLLISION, PROP_FAIL_ON_SERVICE_CHANNEL_NAME_COLLISION_DEFAULT, PROP_GENERIC_HANDLER_JOINS_ALL, PROP_GENERIC_HANDLER_JOINS_ALL_DEFAULT, PROP_IGNORE_UNMAPPED_CHANNELS, PROP_IGNORE_UNMAPPED_CHANNELS_DEFAULT, PROP_USE_BUS_CONFIGURATION_TO_RESOLVE_CHANNEL_BUS, PROP_USE_BUS_CONFIGURATION_TO_RESOLVE_CHANNEL_BUS_DEFAULT| Constructor and Description |
|---|
AbstractHK2TopicOrientedApplication() |
| Modifier and Type | Method and Description |
|---|---|
protected HK2ManagedObjectLocator |
createManagedObjectLocator()
Subclasses may override this method to construct a subclass of HK2ManagedObjectLocator.
|
protected abstract List<org.glassfish.hk2.utilities.Binder> |
getApplicationModules()
Get the Application Modules.
|
protected org.glassfish.hk2.api.ServiceLocator |
getApplicationServiceLocator()
Return the Application ServiceLocator.
|
protected ManagedObjectLocator |
getManagedObjectLocator() |
protected abstract String |
getName()
Get the Application Name.
|
protected void |
onEngineDescriptorInjected(AepEngineDescriptor engineDescriptor)
The
AbstractHK2TopicOrientedApplication extends the life-cycle of the TopicOrientedApplication to allow for the
creation of an HK2 ServiceLocator. |
addAppCommandHandlerContainers, addAppStatContainers, addChannelFilterProviders, addChannelInitialKeyResolutionTableProviders, addChannelJoinProviders, addChannelQosProviders, addConfiguredContainers, addHandlerContainers, addPostdispatchMessageHandler, addPredispatchMessageHandler, addTopicResolverProviders, getAepMessageSender, getChannelFilter, getChannelJoin, getChannelQos, getConfigurer, getDelayedAcknowledgmentController, getEngine, getEngineClock, getInitialChannelKeyResolutionTable, getMessageInjector, getMessageSender, getServiceDefinitionLocator, getServiceModel, getServiceModels, getTopicResolver, injectMessage, injectMessage, injectMessage, injectMessage, injectMessage, injectMessage, onAppFinalized, onAppInitialized, onAppLoaderInjected, onConfigured, onEngineInjected, sendMessage, sendMessage, sendMessage, sendMessage, sendMessageprotected void onEngineDescriptorInjected(AepEngineDescriptor engineDescriptor) throws Exception
AbstractHK2TopicOrientedApplication extends the life-cycle of the TopicOrientedApplication to allow for the
creation of an HK2 ServiceLocator. The construction of the
Application ServiceLocator happens early, during the AepEngineDescriptor customization
phase so that components and/or services can be given the chance to participate in the initialization of the Application and
the AEP Engine. Specifically, when this method is invoked two things happen (after the standard TopicOrientedApplication life-cycle):
AepEngineDescriptor is injected the AbstractHK2TopicOrientedApplication will construct the
Application ServiceLocator. After this point the Application may use the
Application Service Locator to retrieve Services or other information (such as Configuration) from the ServiceLocator.
injected into this
instance. These injected dependencies will be satisfied based upon the standard HK2 injection strategy. Note that only after this
point will injected dependencies be available.onEngineDescriptorInjected in class TopicOrientedApplicationExceptionprotected HK2ManagedObjectLocator createManagedObjectLocator()
HK2ManagedObjectLocatorprotected ManagedObjectLocator getManagedObjectLocator()
getManagedObjectLocator in class TopicOrientedApplicationprotected org.glassfish.hk2.api.ServiceLocator getApplicationServiceLocator()
HK2 ServiceLocator.
The Application ServiceLocator has a name that is the same as the
Application Name. All the the Application Modules will be bound into the
Application ServiceLocator. The Application ServiceLocator can be used (via the standard HK2 API) to retrieve any services or
components that are configured in any of the Application Modules.IllegalStateException - if the Application ServiceLocator is not available. This may happen if onEngineDescriptorInjected(AepEngineDescriptor)
has not been invoked yet or if the Application has been shutdownprotected abstract List<org.glassfish.hk2.utilities.Binder> getApplicationModules()
Application ServiceLocator. This list may be empty but it must not be null.protected abstract String getName()
ServiceLocator
for the Application. The Application Name will be made available to components and services and can also be used to support qualified
injection. The Application Name must not be null and must not be an empty string or a string that contains only whitespace.Copyright © 2016 N5 Technologies, Inc. All Rights Reserved.