public abstract class Application extends Object
Application represents a per-web-application singleton object where applications based on JavaServer Faces (or implementations wishing to provide extended functionality) can register application-wide singletons that provide functionality required by JavaServer Faces. Default implementations of each object are provided for cases where the application does not choose to customize the behavior.
The instance of Application is created by calling the getApplication() method of
ApplicationFactory. Because this instance is shared, it must be implemented in a thread-safe manner.
FacesContext.getCurrentInstance().getApplication()In particular, this provides a factory for UIComponent objects. It also provides convenience methods for creating ValueBinding objects. See Javadoc of JSF Specification
| Constructor and Description |
|---|
Application() |
| Modifier and Type | Method and Description |
|---|---|
void |
addBehavior(String behaviorId,
String behaviorClass) |
abstract void |
addComponent(String componentType,
String componentClass)
Register a new mapping of component type to the name of the corresponding
UIComponent class. |
abstract void |
addConverter(Class<?> targetClass,
String converterClass)
Register a new converter class that is capable of performing conversions for the specified target class.
|
abstract void |
addConverter(String converterId,
String converterClass)
Register a new mapping of converter id to the name of the corresponding
Converter class. |
void |
addDefaultValidatorId(String validatorId) |
void |
addELContextListener(javax.el.ELContextListener listener)
Provide a way for Faces applications to register an
ELContextListener that will be notified on
creation of ELContext instances. |
void |
addELResolver(javax.el.ELResolver resolver)
Cause an the argument
resolver to be added to the resolver chain as specified in section 5.5.1 of
the JavaServer Faces Specification. |
abstract void |
addValidator(String validatorId,
String validatorClass)
Register a new mapping of validator id to the name of the corresponding
Validator class. |
Behavior |
createBehavior(String behaviorId) |
UIComponent |
createComponent(FacesContext context,
Resource componentResource)
???
|
UIComponent |
createComponent(FacesContext context,
String componentType,
String rendererType) |
abstract UIComponent |
createComponent(String componentType)
Create a new UIComponent subclass, using the mappings defined by previous calls to the addComponent method of
this class.
|
abstract UIComponent |
createComponent(ValueBinding componentBinding,
FacesContext context,
String componentType)
Deprecated.
|
UIComponent |
createComponent(javax.el.ValueExpression componentExpression,
FacesContext context,
String componentType)
Call the
getValue() method on the specified ValueExpression. |
UIComponent |
createComponent(javax.el.ValueExpression componentExpression,
FacesContext context,
String componentType,
String rendererType) |
abstract Converter |
createConverter(Class<?> targetClass)
Instantiate and return a new
instance of the class that has registered itself as
capable of performing conversions for objects of the specified type. |
abstract Converter |
createConverter(String converterId)
Instantiate and return a new
instance of the class specified by a previous call to
addConverter() for the specified converter id. |
abstract MethodBinding |
createMethodBinding(String ref,
Class<?>[] params)
Deprecated.
|
abstract Validator |
createValidator(String validatorId)
Instantiate and return a new
instance of the class specified by a previous call to
addValidator() for the specified validator id. |
abstract ValueBinding |
createValueBinding(String ref)
Deprecated.
|
<T> T |
evaluateExpressionGet(FacesContext context,
String expression,
Class<? extends T> expectedType)
Get a value by evaluating an expression.
|
abstract ActionListener |
getActionListener()
Return the default
ActionListener to be registered for all ActionSource<3code> components
in this appication. |
Iterator<String> |
getBehaviorIds() |
abstract Iterator<String> |
getComponentTypes()
Return an
Iterator over the set of currently defined component types for this
Application. |
abstract Iterator<String> |
getConverterIds()
Return an
Iterator over the set of currently registered converter ids for this
Application |
abstract Iterator<Class<?>> |
getConverterTypes()
Return an
Iterator over the set of Class instances for which classeshave been explicitly registered. |
abstract Locale |
getDefaultLocale()
Return the default
Locale for this application. |
abstract String |
getDefaultRenderKitId()
Return the
renderKitId to be used for rendering this application. |
Map<String,String> |
getDefaultValidatorInfo() |
javax.el.ELContextListener[] |
getELContextListeners()
If no calls have been made to
addELContextListener(javax.el.ELContextListener), this method must
return an empty array |
javax.el.ELResolver |
getELResolver()
Return the singleton
ELResolver instance to be used for all EL resolution. |
javax.el.ExpressionFactory |
getExpressionFactory()
Return the
ExpressionFactory instance for this application. |
abstract String |
getMessageBundle()
Return the fully qualified class name of the
ResourceBundle to be used for JavaServer Faces messages
for this application. |
abstract NavigationHandler |
getNavigationHandler()
Return the
instance that will be passed the outcome returned by any
invoked application action for this web application. |
ProjectStage |
getProjectStage()
Return the project stage for the currently running application instance.
|
abstract PropertyResolver |
getPropertyResolver()
Deprecated.
|
ResourceBundle |
getResourceBundle(FacesContext ctx,
String name)
Find a
ResourceBundle as defined in the application configuration resources under the specified
name. |
ResourceHandler |
getResourceHandler()
Return the singleton, stateless, thread-safe
for this application. |
abstract StateManager |
getStateManager()
Return the
StateManager instance that will be utilized during the Restore View and Render Response
phases of the request processing lifecycle. |
abstract Iterator<Locale> |
getSupportedLocales()
Return an
Iterator over the supported Locales for this appication. |
abstract Iterator<String> |
getValidatorIds()
Return an
Iterator over the set of currently registered validator ids for this
Application. |
abstract VariableResolver |
getVariableResolver()
Deprecated.
|
abstract ViewHandler |
getViewHandler()
Set the
instance that will be utilized during the
Restore View and Render Response phases of the request processing lifecycle. |
void |
publishEvent(FacesContext facesContext,
Class<? extends SystemEvent> systemEventClass,
Class<?> sourceBaseType,
Object source) |
void |
publishEvent(FacesContext facesContext,
Class<? extends SystemEvent> systemEventClass,
Object source)
If there are one or more listeners for events of the type represented by
systemEventClass, call
those listeners,passing source as the source of the event. |
void |
removeELContextListener(javax.el.ELContextListener listener)
Remove the argument
listener from the list of ELContextListeners. |
abstract void |
setActionListener(ActionListener listener)
Set the default
to be registered for all
components. |
abstract void |
setDefaultLocale(Locale locale)
Set the default
Locale for this application. |
abstract void |
setDefaultRenderKitId(String renderKitId)
Return the
renderKitId to be used for rendering this application. |
abstract void |
setMessageBundle(String bundle)
Set the fully qualified class name of the
ResourceBundle to be used for JavaServer Faces messages
for this application. |
abstract void |
setNavigationHandler(NavigationHandler handler)
Set the
NavigationHandler instance that will be passed the outcome returned by any invoked application
action for this web application. |
abstract void |
setPropertyResolver(PropertyResolver resolver)
Deprecated.
|
void |
setResourceHandler(ResourceHandler resourceHandler) |
abstract void |
setStateManager(StateManager manager)
Set the
StateManager instance that will be utilized during the Restore View and Render Response
phases of the request processing lifecycle. |
abstract void |
setSupportedLocales(Collection<Locale> locales)
Set the
Locale instances representing the supported Locales for this application. |
abstract void |
setVariableResolver(VariableResolver resolver)
Deprecated.
|
abstract void |
setViewHandler(ViewHandler handler)
Set the
ViewHandler instance that will be utilized during the Restore View and Render Response
phases of the request processing lifecycle. |
void |
subscribeToEvent(Class<? extends SystemEvent> systemEventClass,
Class<?> sourceClass,
SystemEventListener listener) |
void |
subscribeToEvent(Class<? extends SystemEvent> systemEventClass,
SystemEventListener listener) |
void |
unsubscribeFromEvent(Class<? extends SystemEvent> systemEventClass,
Class<?> sourceClass,
SystemEventListener listener) |
void |
unsubscribeFromEvent(Class<? extends SystemEvent> systemEventClass,
SystemEventListener listener) |
public void addBehavior(String behaviorId, String behaviorClass)
public abstract void addComponent(String componentType, String componentClass)
UIComponent class. This allows
subsequent calls to createComponent() to serve as a factory for UIComponent instances.componentType - - The component type to be registeredcomponentClass - - The fully qualified class name of the corresponding UIComponent implementationNullPointerException - if componentType or componentClass is nullpublic abstract void addConverter(Class<?> targetClass, String converterClass)
targetClass - - The class for which this converter is registeredconverterClass - - The fully qualified class name of the corresponding Converter implementationNullPointerException - if targetClass or converterClass is nullpublic abstract void addConverter(String converterId, String converterClass)
Converter class. This allows
subsequent calls to createConverter() to serve as a factory for Converter instances.converterId - - The converterId to be registeredconverterClass - - The fully qualified class name of the corresponding Converter implementationNullPointerException - if componentType or componentClass is nullpublic void addDefaultValidatorId(String validatorId)
validatorId - public void addELContextListener(javax.el.ELContextListener listener)
Provide a way for Faces applications to register an ELContextListener that will be notified on
creation of ELContext instances.
An implementation is provided that throws UnsupportedOperationException so that users that decorate
the Application continue to work.
public void addELResolver(javax.el.ELResolver resolver)
Cause an the argument resolver to be added to the resolver chain as specified in section 5.5.1 of
the JavaServer Faces Specification.
It is not possible to remove an ELResolver registered with this method, once it has been registered.
It is illegal to register an ELResolver after the application has received any requests from the client. If an
attempt is made to register a listener after that time, an IllegalStateException must be thrown. This restriction
is in place to allow the JSP container to optimize for the common case where no additional
ELResolvers are in the chain, aside from the standard ones. It is permissible to add
ELResolvers before or after initialization to a CompositeELResolver that is already in the chain.
The default implementation throws UnsupportedOperationException and is provided for the sole purpose
of not breaking existing applications that extend Application.
public abstract void addValidator(String validatorId, String validatorClass)
Validator class. This allows
subsequent calls to createValidator() to serve as a factory for Validator instances.validatorId - The validator id to be registeredvalidatorClass - The fully qualified class name of the corresponding Validator implementationNullPointerException - if validatorId or validatorClass is nullpublic Behavior createBehavior(String behaviorId) throws FacesException
behaviorId - FacesExceptionpublic UIComponent createComponent(FacesContext context, Resource componentResource)
context - componentResource - public UIComponent createComponent(FacesContext context, String componentType, String rendererType)
context - componentType - rendererType - public abstract UIComponent createComponent(String componentType) throws FacesException
Create a new UIComponent subclass, using the mappings defined by previous calls to the addComponent method of this class.
FacesException - if there is no mapping defined for the specified componentType, or if an instance of the specified
type could not be created for any reason.public abstract UIComponent createComponent(ValueBinding componentBinding, FacesContext context, String componentType) throws FacesException
Create an object which has an associating "binding" expression tying the component to a user property.
First the specified value-binding is evaluated; if it returns a non-null value then the component "already exists" and so the resulting value is simply returned.
Otherwise a new UIComponent instance is created using the specified componentType, and the new object stored via the provided value-binding before being returned.
FacesExceptionpublic UIComponent createComponent(javax.el.ValueExpression componentExpression, FacesContext context, String componentType) throws FacesException
Call the getValue() method on the specified ValueExpression. If it returns a
instance, return it as the value of this method. If it does not, instantiate a
new UIComponent instance of the specified component type, pass the new component to the
setValue() method of the specified ValueExpression, and return it.
componentExpression - - ValueExpression representing a component value expression (typically specified by the
component attribute of a custom tag)context - - FacesContext for the current requestcomponentType - - Component type to create if the ValueExpression does not return a component instanceFacesException - if a UIComponent cannot be createdNullPointerException - if any parameter is null
A default implementation is provided that throws UnsupportedOperationException so that
users that decorate Application can continue to function
public UIComponent createComponent(javax.el.ValueExpression componentExpression, FacesContext context, String componentType, String rendererType)
componentExpression - context - componentType - rendererType - public abstract Converter createConverter(Class<?> targetClass)
Instantiate and return a new instance of the class that has registered itself as
capable of performing conversions for objects of the specified type. If no such Converter
class can be identified, return null.
Converter
To locate an appropriate class, the following algorithm is performed, stopping as
soon as an appropriate Converter class is found: Locate a Converter
registered for the target class itself. ConverterConverter registered for interfaces that
are implemented by the target class (directly or indirectly). Locate a registered
for the superclass (if any) of the target class, recursively working up the inheritance hierarchy.
Converter
If the has a single argument constructor that accepts a Class, instantiate the
Converter using that constructor, passing the argument ConvertertargetClass as
the sole argument. Otherwise, simply use the zero-argument constructor.
targetClass - - Target class for which to return a ConverterFacesException - if the Converter cannot be createdNullPointerException - if targetClass is nullpublic abstract Converter createConverter(String converterId)
Converter instance of the class specified by a previous call to
addConverter() for the specified converter id. If there is no such registration for this converter
id, return null.converterId - - The converter id for which to create and return a new Converter instanceFacesException - if the Converter cannot be createdNullPointerException - if converterId is nullpublic abstract MethodBinding createMethodBinding(String ref, Class<?>[] params) throws ReferenceSyntaxException
This is used to invoke ActionListener method, and ValueChangeListener methods.
ReferenceSyntaxExceptionpublic abstract Validator createValidator(String validatorId) throws FacesException
Validator instance of the class specified by a previous call to
addValidator() for the specified validator id.validatorId - The Validator id for which to create and return a new
Validator instanceFacesException - if a Validator/ of the specified id cannot be createdNullPointerException - if validatorId is nullpublic abstract ValueBinding createValueBinding(String ref) throws ReferenceSyntaxException
Create an object which can be used to invoke an arbitrary method via an EL expression at a later time. This is similar to createValueBinding except that it can invoke an arbitrary method (with parameters) rather than just get/set a javabean property.
This is used to invoke ActionListener method, and ValueChangeListener methods.ReferenceSyntaxExceptionpublic <T> T evaluateExpressionGet(FacesContext context, String expression, Class<? extends T> expectedType) throws javax.el.ELException
Get a value by evaluating an expression.
Call then call
getExpressionFactory()ExpressionFactory.createValueExpression(javax.el.ELContext, java.lang.String, java.lang.Class)
passing the argument expression and expectedType. Call
and pass it to
FacesContext.getELContext()ValueExpression.getValue(javax.el.ELContext), returning the result.
An implementation is provided that throws UnsupportedOperationException so that users that decorate
the Application continue to work.
javax.el.ELExceptionpublic abstract ActionListener getActionListener()
Return the default ActionListener to be registered for all ActionSource<3code> components
in this appication. If not explicitly set, a default implementation must be provided that performs the
following functions:
processAction() method must first call FacesContext.renderResponse()in order to
bypass any intervening lifecycle phases, once the method returns.processAction() method must next determine the logical
outcome of this event, as follows:null action property, retrieve the
MethodBinding from the property, and call invoke()
on it. Convert the returned value (if any) to a String, and use it as the logical outcome.processAction() method must finally retrieve the NavigationHandler<3code> instance
for this application and call NavigationHandler.handleNavigation(javax.faces.context.FacesContext,
java.lang.String, java.lang.String) passing:FacesContext for the current requestMethodBinding instance for the action property of this component, the
result of calling MethodBinding.getExpressionString() on it, null otherwise
Note that the specification for the default ActionListener contiues to call for the use of a
deprecated property (action) and class (MethodBinding). Unfortunately, this is
necessary because the default ActionListener must continue to work with components that do not implement
ActionSource2, and only implement ActionSource.
public Iterator<String> getBehaviorIds()
public abstract Iterator<String> getComponentTypes()
Iterator over the set of currently defined component types for this
Application.public abstract Iterator<String> getConverterIds()
Iterator over the set of currently registered converter ids for this
Applicationpublic abstract Iterator<Class<?>> getConverterTypes()
Iterator over the set of Class instances for which Converter
classeshave been explicitly registered.public abstract Locale getDefaultLocale()
Locale for this application. If not explicitly set, null is
returned.public abstract String getDefaultRenderKitId()
renderKitId to be used for rendering this application. If not explicitly set,
null is returned.public javax.el.ELContextListener[] getELContextListeners()
If no calls have been made to addELContextListener(javax.el.ELContextListener), this method must
return an empty array
.
Otherwise, return an array representing the list of listeners added by calls to
addELContextListener(javax.el.ELContextListener).
An implementation is provided that throws UnsupportedOperationException so that users that decorate
the Application continue to work.
public javax.el.ELResolver getELResolver()
ELResolver instance to be used for all EL resolution. This is actually an
instance of CompositeELResolver that must contain the following ELResolver instances in the
following order:
ELResolver instances declared using the implementation that wraps the head of the legacy VariableResolver chain, as per section
VariableResolver ChainWrapper in Chapter 5 in the spec document.implementation that wraps the head of the legacy PropertyResolver chain, as per section
PropertyResolver ChainWrapper in Chapter 5 in the spec document.ELResolver instances added by calls to
addELResolver(javax.el.ELResolver).UnsupportedOperationException and is provided for the sole
purpose of not breaking existing applications that extend Application.public javax.el.ExpressionFactory getExpressionFactory()
Return the ExpressionFactory instance for this application. This instance is used by the convenience
method evaluateExpressionGet(javax.faces.context.FacesContext, java.lang.String, java.lang.Class).
The implementation must return the ExpressionFactory from the JSP container by calling
JspFactory.getDefaultFactory().getJspApplicationContext(servletContext).getExpressionFactory().
An implementation is provided that throws UnsupportedOperationException so that users that decorate
the Application continue to work.
public abstract String getMessageBundle()
ResourceBundle to be used for JavaServer Faces messages
for this application. If not explicitly set, null is returned.public abstract NavigationHandler getNavigationHandler()
NavigationHandler instance that will be passed the outcome returned by any
invoked application action for this web application. If not explicitly set, a default implementation must be
provided that performs the functions described in the NavigationHandler class description.public ProjectStage getProjectStage()
Return the project stage for the currently running application instance. The default value is
ProjectStage.Production
The implementation of this method must perform the following algorithm or an equivalent with the same end result to determine the value to return.
JNDI environment entry under the key given by the value of
ProjectStage.PROJECT_STAGE_JNDI_NAME (return type of java.lang.String). If found, continue
with the algorithm below, otherwise, look for an entry in the initParamMap of the
ExternalContext from the current FacesContext with the key
ProjectStage.PROJECT_STAGE_PARAM_NAMEProjectStage.valueOf(), passing the value from the initParamMap. If this succeeds
without exception, save the value and return it.ProjectStage.Production and return it.public abstract PropertyResolver getPropertyResolver()
public ResourceBundle getResourceBundle(FacesContext ctx, String name) throws FacesException, NullPointerException
Find a ResourceBundle as defined in the application configuration resources under the specified
name. If a ResourceBundle was defined for the name, return an instance that uses the locale of the
current .
UIViewRoot
The default implementation throws UnsupportedOperationException and is provided for the sole purpose
of not breaking existing applications that extend this class.
ResourceBundle for the current UIViewRoot, otherwise nullFacesException - if a bundle was defined, but not resolvableNullPointerException - if ctx == null || name == nullpublic ResourceHandler getResourceHandler()
Return the singleton, stateless, thread-safe for this application. The JSF
implementation must support the following techniques for declaring an alternate implementation of ResourceHandler
ResourceHandler.
ResourceHandler implementation is declared in the application configuration resources by
giving the fully qualified class name as the value of the element within the
application element.In all of the above cases, the runtime must employ the decorator pattern as for every other pluggable artifact in JSF.
public abstract StateManager getStateManager()
StateManager instance that will be utilized during the Restore View and Render Response
phases of the request processing lifecycle. If not explicitly set, a default implementation must be provided that
performs the functions described in the StateManager description in the JavaServer Faces
Specification.public abstract Iterator<Locale> getSupportedLocales()
Iterator over the supported Locales for this appication.public abstract Iterator<String> getValidatorIds()
Iterator over the set of currently registered validator ids for this
Application.public abstract VariableResolver getVariableResolver()
public abstract ViewHandler getViewHandler()
ViewHandler instance that will be utilized during the
Restore View and Render Response phases of the request processing lifecycle.public void publishEvent(FacesContext facesContext, Class<? extends SystemEvent> systemEventClass, Class<?> sourceBaseType, Object source)
facesContext - systemEventClass - sourceBaseType - source - public void publishEvent(FacesContext facesContext, Class<? extends SystemEvent> systemEventClass, Object source)
If there are one or more listeners for events of the type represented by systemEventClass, call
those listeners,passing source as the source of the event. The implementation should be as fast as
possible in determining whether or not a listener for the given systemEventClass and
source has been installed, and should return immediately once such a determination has been made.
The implementation of publishEvent must honor the requirements stated in
subscribeToEvent(java.lang.Class, java.lang.Class,
javax.faces.event.SystemEventListener)
The default implementation must implement an algorithm semantically equivalent to the following to locate listener instances and to invoke them.
source argument implements
SystemEventListenerHolder, call
SystemEventListenerHolder.getListenersForEventClass(java.lang.Class)
on it, passing the
systemEventClass argument. If the list is not empty, perform algorithm
traverseListenerList on the list.Application level listeners have been installed by previous calls to subscribeToEvent(java.lang.Class, java.lang.Class, SystemEventListener), perform algorithm
traverseListenerList on the list.Application level listeners have been installed by previous calls to
subscribeToEvent(java.lang.Class, SystemEventListener), perform algorithm
traverseListenerList on the list.
If the act of invoking the processListener method causes an
AbortProcessingException to be thrown,
processing of the listeners must be aborted.
Algorithm traverseListenerList: For each listener in the list,
SystemEventListener.isListenerForSource(java.lang.Object), passing the source
argument. If this returns false, take no action on the listener.source as the argument to the one-argument constructor that takes an
Object. This same event instance must be passed to all listener instances.SystemEvent.isAppropriateListener(javax.faces.event.FacesListener), passing the listener
instance as the argument. If this returns false, take no action on the listener.SystemEvent.processListener(javax.faces.event.FacesListener), passing the listener
instance.systemEventClass - - The Class of event that is being published. Must be non-null.source - - The source for the event of type systemEventClass. Must be non- null, and
must implement SystemEventListenerHolder.public void removeELContextListener(javax.el.ELContextListener listener)
Remove the argument listener from the list of ELContextListeners. If listener
is null, no exception is thrown and no action is performed. If listener is not in the list,
no exception is thrown and no action is performed.
An implementation is provided that throws UnsupportedOperationException so that users that decorate
the Application continue to work.
listener - public abstract void setActionListener(ActionListener listener)
ActionListener to be registered for all
ActionSource
components.listener - - The new default ActionListenerNullPointerException - if listener is nullpublic abstract void setDefaultLocale(Locale locale)
Locale for this application.locale - - The new default LocaleNullPointerException - if listener is nullpublic abstract void setDefaultRenderKitId(String renderKitId)
renderKitId to be used for rendering this application. If not explicitly set, null
is returned.renderKitId - public abstract void setMessageBundle(String bundle)
ResourceBundle to be used for JavaServer Faces messages
for this application. See the JavaDocs for the java.util.ResourceBundle class for more information
about the syntax for resource bundle names.bundle - - Base name of the resource bundle to be usedNullPointerException - if bundle is nullpublic abstract void setNavigationHandler(NavigationHandler handler)
NavigationHandler instance that will be passed the outcome returned by any invoked application
action for this web application.handler - - The new NavigationHandler instancepublic abstract void setPropertyResolver(PropertyResolver resolver)
public void setResourceHandler(ResourceHandler resourceHandler)
resourceHandler - public abstract void setStateManager(StateManager manager)
StateManager instance that will be utilized during the Restore View and Render Response
phases of the request processing lifecycle.manager - The new StateManagerinstanceIllegalStateException - if this method is called after at least one request has been processed by the Lifecycle
instance for this application.NullPointerException - if manager is nullpublic abstract void setSupportedLocales(Collection<Locale> locales)
Locale instances representing the supported Locales for this application.locales - The set of supported Locales for this applicationNullPointerException - if the argument newLocales is null.public abstract void setVariableResolver(VariableResolver resolver)
public abstract void setViewHandler(ViewHandler handler)
ViewHandler instance that will be utilized during the Restore View and Render Response
phases of the request processing lifecycle.handler - - The new ViewHandler instanceIllegalStateException - if this method is called after at least one request has been processed by the Lifecycle
instance for this application.NullPointerException - if handler is nullpublic void subscribeToEvent(Class<? extends SystemEvent> systemEventClass, Class<?> sourceClass, SystemEventListener listener)
systemEventClass - sourceClass - listener - public void subscribeToEvent(Class<? extends SystemEvent> systemEventClass, SystemEventListener listener)
systemEventClass - listener - public void unsubscribeFromEvent(Class<? extends SystemEvent> systemEventClass, Class<?> sourceClass, SystemEventListener listener)
systemEventClass - sourceClass - listener - public void unsubscribeFromEvent(Class<? extends SystemEvent> systemEventClass, SystemEventListener listener)
systemEventClass - listener - Copyright © 2016 The Apache Software Foundation. All Rights Reserved.