com.liferay.faces.bridge.bean.internal
Class PreDestroyInvokerMojarraImpl

java.lang.Object
  extended by com.liferay.faces.bridge.bean.internal.PreDestroyInvokerImpl
      extended by com.liferay.faces.bridge.bean.internal.PreDestroyInvokerMojarraImpl
All Implemented Interfaces:
PreDestroyInvoker

public class PreDestroyInvokerMojarraImpl
extends PreDestroyInvokerImpl

Mojarra has a vendor-specific Service Provider Interface (SPI) for dependency injection called the InjectionProvider. This class provides the ability to leverage the InjectionProvider instance for invoking methods annotated with PreDestroy.

Author:
Neil Griffin

Constructor Summary
PreDestroyInvokerMojarraImpl(Map<String,Object> applicationMap)
           
 
Method Summary
protected  Object getInjectionProvider(Map<String,Object> applicationMap)
           
 void invokeAnnotatedMethods(Object managedBean, boolean preferPreDestroy)
          This method services as a convenience routine for invoking all methods of the specified managed-bean are marked with the PreDestroy or BridgePreDestroy annotation.
 String toString()
           
 
Methods inherited from class com.liferay.faces.bridge.bean.internal.PreDestroyInvokerImpl
hasBridgePreDestroyAnnotation, hasPreDestroyAnnotation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PreDestroyInvokerMojarraImpl

public PreDestroyInvokerMojarraImpl(Map<String,Object> applicationMap)
Method Detail

invokeAnnotatedMethods

public void invokeAnnotatedMethods(Object managedBean,
                                   boolean preferPreDestroy)
Description copied from interface: PreDestroyInvoker
This method services as a convenience routine for invoking all methods of the specified managed-bean are marked with the PreDestroy or BridgePreDestroy annotation. The JavaDocs state that if an exception is thrown by any of the pre-destroy annotated methods, they are required to be caught and NOT re-thrown. Instead, exceptions are logged.

Specified by:
invokeAnnotatedMethods in interface PreDestroyInvoker
Overrides:
invokeAnnotatedMethods in class PreDestroyInvokerImpl
Parameters:
managedBean - The managed-bean that is to have its PreDestroy or BridgePreDestroy annotated method(s) invoked, if any.
preferPreDestroy - Flag indicating that methods annotated with PreDestroy should be preferably invoked over those annotated with BridgePreDestroy.

toString

public String toString()
Overrides:
toString in class Object

getInjectionProvider

protected Object getInjectionProvider(Map<String,Object> applicationMap)


Copyright © 2015 Liferay, Inc.. All rights reserved.