JBoss EJB client 2.0.0.Beta4

org.jboss.ejb.client
Interface IdentityEJBClientContextSelector

All Superinterfaces:
ContextSelector<EJBClientContext>
All Known Implementing Classes:
ConfigBasedEJBClientContextSelector

public interface IdentityEJBClientContextSelector
extends ContextSelector<EJBClientContext>

A ContextSelector which can select EJB client contexts based on a EJBClientContextIdentifier.

Author:
Jaikiran Pai

Method Summary
 EJBClientContext getContext(EJBClientContextIdentifier identifier)
          Returns a context for the passed identifier.
 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.
 
Methods inherited from interface org.jboss.ejb.client.ContextSelector
getCurrent
 

Method Detail

registerContext

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

Parameters:
identifier - The EJB client context identifier
context - The EJB client context

unRegisterContext

EJBClientContext unRegisterContext(EJBClientContextIdentifier identifier)
Unregisters and returns a previously registered EJBClientContext, for the passed identifier. If no EJBClientContext was registered for the passed identifier, then this method returns null.

Parameters:
identifier - The EJB client context identifier
Returns:
Returns the previously registered EJBClientContext if any. Else returns null.

getContext

EJBClientContext getContext(EJBClientContextIdentifier identifier)
Returns a context for the passed identifier. If there's no such context, then null is returned.

Parameters:
identifier - Identity of the context. Cannot be null
Returns:
The context or null if no such context exists
Throws:
IllegalArgumentException - If the passed identifier is null.

JBoss EJB client 2.0.0.Beta4

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