org.glassfish.hk2.api
Interface ErrorService


@Contract
public interface ErrorService

This interface should be implemented by those who wish to be notified of error conditions that occur within HK2. These errors are those that might happen during normal processing of HK2 requests but which are not otherwise reported up the calling stack frame.

An implementation of ErrorService must be in the Singleton scope

Author:
jwells

Method Summary
 void failureToReify(ActiveDescriptor<?> descriptor, Injectee injectee, MultiException me)
          This method is called if an ActiveDescriptor fails to reify properly during a lookup operation.
 

Method Detail

failureToReify

void failureToReify(ActiveDescriptor<?> descriptor,
                    Injectee injectee,
                    MultiException me)
                    throws MultiException
This method is called if an ActiveDescriptor fails to reify properly during a lookup operation. To the caller of the lookup operation it will appear as though the passed descriptor does not exist. The descriptor will not be automatically removed from the system. This method may use any ServiceLocator api. For example, an implementation of this method might want to remove the offending descriptor from the registry if the error can be determined to be a permanent failure.

Parameters:
descriptor - The descriptor that failed to reify. Will not be null
injectee - The injectee on behalf of whom this descriptor was being searched. May be null if there is no known injectee (for example, if this is being called from the API).
me - The failure (or set of failures) that caused this descriptor to not become reified
Throws:
MultiException - if this method throws an exception that exception will be thrown back to the caller wrapped in another MultiException


Copyright © 2012 Oracle Corporation. All Rights Reserved.