JBoss EJB client 1.0.5.Final

org.jboss.ejb.client
Class ConstantContextSelector<T>

java.lang.Object
  extended by org.jboss.ejb.client.ConstantContextSelector<T>
Type Parameters:
T - the context type
All Implemented Interfaces:
ContextSelector<T>

public final class ConstantContextSelector<T>
extends Object
implements ContextSelector<T>

A context selector which always returns the same instance.

Author:
David M. Lloyd

Constructor Summary
ConstantContextSelector(T instance)
          Construct a new instance.
 
Method Summary
 T getCurrent()
          Get the current instance, returning null if none are valid in the current context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstantContextSelector

public ConstantContextSelector(T instance)
Construct a new instance.

Parameters:
instance - the context instance
Method Detail

getCurrent

public T getCurrent()
Description copied from interface: ContextSelector
Get the current instance, returning null if none are valid in the current context.

Specified by:
getCurrent in interface ContextSelector<T>
Returns:
the instance, or null if there is none

JBoss EJB client 1.0.5.Final

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.