org.jboss.ejb3.common.registrar.spi
Interface Ejb3Registrar

All Known Implementing Classes:
Ejb3McRegistrar

public interface Ejb3Registrar

Ejb3Registrar Defines the contract for implementations of the EJB3 Object Store, providing mechanisms to bind, unbind, and lookup generic Objects

Version:
$Revision: $
Author:
ALR

Method Summary
 void bind(Object name, Object value)
          Binds the specified value to the key of specified name, throwing a DuplicateBindException in the case the name is not unique
 Object getProvider()
          Returns a provider implementation-specific class to break contract and invoke upon vendor-specific features.
 Object invoke(Object name, String methodName, Object[] arguments, String[] signature)
          Invokes the specified method name on the object bound at the specified name, returning the result
 Map<Object,Object> list()
          Lists out all installed (bound) objects in form key == name , value == object.
 Object lookup(Object name)
          Obtains the value bound at the specified name, throwing NotBoundException if there is nothing bound at the key
<T> T
lookup(Object name, Class<T> type)
          Obtains the value bound at the specified name, throwing NotBoundException if there is nothing bound at the key.
 void rebind(Object name, Object value)
          Binds the specified value to the key of specified name, optionally unbinding the current value if one exists
 void unbind(Object name)
          Unbinds the object at the specified name, throwing NotBoundException if no object exists at that name
 

Method Detail

list

Map<Object,Object> list()
Lists out all installed (bound) objects in form key == name , value == object. Primarily for metrics/debugging/management. If nothing is installed, an empty Map will be returned. The returned Map is immutable.

Returns:

lookup

Object lookup(Object name)
              throws NotBoundException
Obtains the value bound at the specified name, throwing NotBoundException if there is nothing bound at the key

Parameters:
name -
Returns:
Throws:
NotBoundException

lookup

<T> T lookup(Object name,
             Class<T> type)
         throws NotBoundException
Obtains the value bound at the specified name, throwing NotBoundException if there is nothing bound at the key. The value returned will be automatically casted to the specified type.

Type Parameters:
T -
Parameters:
name -
type -
Returns:
Throws:
NotBoundException

bind

void bind(Object name,
          Object value)
          throws DuplicateBindException
Binds the specified value to the key of specified name, throwing a DuplicateBindException in the case the name is not unique

Parameters:
name -
value -
Throws:
DuplicateBindException

rebind

void rebind(Object name,
            Object value)
Binds the specified value to the key of specified name, optionally unbinding the current value if one exists

Parameters:
name -
value -

unbind

void unbind(Object name)
            throws NotBoundException
Unbinds the object at the specified name, throwing NotBoundException if no object exists at that name

Parameters:
name -
Throws:
NotBoundException

invoke

Object invoke(Object name,
              String methodName,
              Object[] arguments,
              String[] signature)
              throws NotBoundException
Invokes the specified method name on the object bound at the specified name, returning the result

Parameters:
name -
methodName -
arguments - Arguments to pass to the method
signature - String representation of fully-qualified class names of parameter types
Returns:
Throws:
NotBoundException - If no object is bound at the specified name

getProvider

Object getProvider()
Returns a provider implementation-specific class to break contract and invoke upon vendor-specific features.

Returns:


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.