org.rhq.jndi.util
Interface DecoratorSetContext<Type,Decorator>

All Known Implementing Classes:
AccessCheckingContextDecoratorSetContext, URLPreferringContextDecoratorSetContext

public interface DecoratorSetContext<Type,Decorator>

Implementations of this interface provide a context to the DecoratorPicker.

Author:
Lukas Krejci

Method Summary
 Set<Class<? extends Decorator>> getDecoratorClasses()
           
 Set<Class<? extends Type>> getSupportedInterfaces()
           
 void init(Decorator decorator, Type object)
          Initializes the decorator to decorate given object.
 Decorator instantiate(Class<? extends Decorator> decoratorClass)
          Instantiates a new decorator of given class.
 

Method Detail

getSupportedInterfaces

Set<Class<? extends Type>> getSupportedInterfaces()
Returns:
the set of interfaces that the decorators are able support. Usually this should be just a union of all interfaces the decorators implement but can be trimmed down.

getDecoratorClasses

Set<Class<? extends Decorator>> getDecoratorClasses()
Returns:
the set of all decorator classes in this set

instantiate

Decorator instantiate(Class<? extends Decorator> decoratorClass)
                      throws Exception
Instantiates a new decorator of given class.

Parameters:
decoratorClass -
Returns:
Throws:
Exception

init

void init(Decorator decorator,
          Type object)
          throws Exception
Initializes the decorator to decorate given object.

Parameters:
decorator -
object -
Throws:
Exception - on error


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.