org.jboss.ejb.client.remoting
public class ConfigBasedEJBClientContextSelector extends Object implements IdentityEJBClientContextSelector
EJBClientConfiguration
to create RemotingConnectionEJBReceiver
s.Modifier and Type | Field and Description |
---|---|
protected EJBClientConfiguration |
ejbClientConfiguration |
protected EJBClientContext |
ejbClientContext |
Constructor and Description |
---|
ConfigBasedEJBClientContextSelector(EJBClientConfiguration ejbClientConfiguration)
Creates a
ConfigBasedEJBClientContextSelector using the passed ejbClientConfiguration . |
ConfigBasedEJBClientContextSelector(EJBClientConfiguration ejbClientConfiguration,
ClassLoader classLoader)
Creates a
ConfigBasedEJBClientContextSelector using the passed ejbClientConfiguration . |
Modifier and Type | Method and Description |
---|---|
EJBClientContext |
getContext(EJBClientContextIdentifier identifier)
Returns a context for the passed
identifier . |
EJBClientContext |
getCurrent()
Get the current instance, returning
null if none are valid in the current context. |
void |
registerContext(EJBClientContextIdentifier identifier,
EJBClientContext context)
Associates the passed
EJBClientContext to the identifier
It's up to the individual implementations to decide whether to throw an exception
if there's already an EJBClientContext registered for the passed identifier |
EJBClientContext |
unRegisterContext(EJBClientContextIdentifier identifier)
Unregisters and returns a previously registered
EJBClientContext , for the passed identifier . |
protected final EJBClientConfiguration ejbClientConfiguration
protected final EJBClientContext ejbClientContext
public ConfigBasedEJBClientContextSelector(EJBClientConfiguration ejbClientConfiguration)
ConfigBasedEJBClientContextSelector
using the passed ejbClientConfiguration
.
This constructor creates a EJBClientContext
and uses the passed ejbClientConfiguration
to create and
associated EJB receivers to that context. If the passed ejbClientConfiguration
is null, then this selector will create a EJBClientContext
without any associated EJB receivers.ejbClientConfiguration
- The EJB client configuration to usepublic ConfigBasedEJBClientContextSelector(EJBClientConfiguration ejbClientConfiguration, ClassLoader classLoader)
ConfigBasedEJBClientContextSelector
using the passed ejbClientConfiguration
.
This constructor creates a EJBClientContext
and uses the passed ejbClientConfiguration
to create and
associated EJB receivers to that context. If the passed ejbClientConfiguration
is null, then this selector will create a EJBClientContext
without any associated EJB receivers.ejbClientConfiguration
- The EJB client configuration to useclassLoader
- The classloader that will be used to create the EJBClientContext
public EJBClientContext getCurrent()
ContextSelector
null
if none are valid in the current context.getCurrent
in interface ContextSelector<EJBClientContext>
null
if there is nonepublic void registerContext(EJBClientContextIdentifier identifier, EJBClientContext context)
IdentityEJBClientContextSelector
EJBClientContext
to the identifier
It's up to the individual implementations to decide whether to throw an exception
if there's already an EJBClientContext
registered for the passed identifier
registerContext
in interface IdentityEJBClientContextSelector
identifier
- The EJB client context identifiercontext
- The EJB client contextpublic EJBClientContext unRegisterContext(EJBClientContextIdentifier identifier)
IdentityEJBClientContextSelector
EJBClientContext
, for the passed identifier
.
If no EJBClientContext
was registered for the passed identifier
, then this method returns null.unRegisterContext
in interface IdentityEJBClientContextSelector
identifier
- The EJB client context identifierEJBClientContext
if any. Else returns null.public EJBClientContext getContext(EJBClientContextIdentifier identifier)
IdentityEJBClientContextSelector
identifier
. If there's no such context, then null is returned.getContext
in interface IdentityEJBClientContextSelector
identifier
- Identity of the context. Cannot be nullCopyright © 2015 JBoss by Red Hat. All rights reserved.