org.rhq.jndi
Class DecoratingInitialContextFactory
java.lang.Object
org.rhq.jndi.DecoratingInitialContextFactory
- All Implemented Interfaces:
- InitialContextFactory
public class DecoratingInitialContextFactory
- extends Object
- implements InitialContextFactory
This class implements an initial context factory that decorates the contexts
returned from a "wrapped" initial factory passed to this class in the constructor.
The contexts returned from the wrapped initial factory are hidden behind a proxy
that implements the intersection of interfaces from the supportedContextInterfaces
constructor parameter and the actual interfaces the wrapped context implements.
The proxy method calls are handled using the DecoratingInvocationHandler which is initialized
with the list of pickers that are used to intercept the method
calls on the wrapped context.
- Author:
- Lukas Krejci
- See Also:
DecoratorPicker,
DecoratingInvocationHandler
DecoratingInitialContextFactory
public DecoratingInitialContextFactory(InitialContextFactory factory,
List<DecoratorPicker<Context,ContextDecorator>> decoratorPickers)
getInitialContext
public Context getInitialContext(Hashtable<?,?> environment)
throws NamingException
- Specified by:
getInitialContext in interface InitialContextFactory
- Throws:
NamingException
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
equals
public boolean equals(Object o)
- Overrides:
equals in class Object
Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.