org.jvnet.hk2.deprecated.internal
Class BaseServiceLocatorImpl

java.lang.Object
  extended by org.jvnet.hk2.deprecated.internal.BaseServiceLocatorImpl
All Implemented Interfaces:
BaseServiceLocator

Deprecated.

@Deprecated
public class BaseServiceLocatorImpl
extends Object
implements BaseServiceLocator

This will be added in GlassFish to help keep the porting of new HK2 down to a reasonable size

Author:
jwells

Constructor Summary
BaseServiceLocatorImpl()
          Deprecated.  
 
Method Summary
<T> Collection<T>
getAllByContract(Class<T> contractType)
          Deprecated. Gets all the inhabitants registered under the given Contract.
<T> Collection<T>
getAllByContract(String contractType)
          Deprecated.  
<T> T
getByContract(Class<T> contractType)
          Deprecated. Gets the object that has the given contract.
<T> T
getByContract(String contractType)
          Deprecated.  
<T> T
getByType(Class<T> implType)
          Deprecated. Gets the object of the given type.
<T> T
getByType(String implType)
          Deprecated. Gets the object of the given type.
<T> T
getComponent(Class<T> clazz)
          Deprecated.  
<T> T
getComponent(Class<T> contract, String name)
          Deprecated. Loads a component that implements the given contract and has the given name.
<T> T
getComponent(String fullQualifiedName, String name)
          Deprecated. Analogous to the following:
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseServiceLocatorImpl

public BaseServiceLocatorImpl()
Deprecated. 
Method Detail

getComponent

public <T> T getComponent(Class<T> contract,
                          String name)
               throws ComponentException
Deprecated. 
Description copied from interface: BaseServiceLocator
Loads a component that implements the given contract and has the given name.

Specified by:
getComponent in interface BaseServiceLocator
name - can be null, in which case it'll only match to the unnamed component.
Returns:
null if no such service exists.
Throws:
ComponentException

getComponent

public <T> T getComponent(String fullQualifiedName,
                          String name)
Deprecated. 
Description copied from interface: BaseServiceLocator
Analogous to the following:
 getComponent(contractClass.getName(), name);
 

Specified by:
getComponent in interface BaseServiceLocator
Parameters:
fullQualifiedName - the contract class name
name - can be null, in which case it'll only match to the unnamed component.
Returns:
null if no such service exists.

getComponent

public <T> T getComponent(Class<T> clazz)
               throws ComponentException
Deprecated. 
Specified by:
getComponent in interface BaseServiceLocator
Throws:
ComponentException

getByType

public <T> T getByType(Class<T> implType)
Deprecated. 
Description copied from interface: BaseServiceLocator
Gets the object of the given type.

Specified by:
getByType in interface BaseServiceLocator
Returns:
null if not found.

getByType

public <T> T getByType(String implType)
Deprecated. 
Description copied from interface: BaseServiceLocator
Gets the object of the given type.

Specified by:
getByType in interface BaseServiceLocator
Returns:
null if not found.

getByContract

public <T> T getByContract(Class<T> contractType)
Deprecated. 
Description copied from interface: BaseServiceLocator
Gets the object that has the given contract.

If there are more than one of them, this method arbitrarily return one of them.

Specified by:
getByContract in interface BaseServiceLocator

getByContract

public <T> T getByContract(String contractType)
Deprecated. 
Specified by:
getByContract in interface BaseServiceLocator

getAllByContract

public <T> Collection<T> getAllByContract(Class<T> contractType)
Deprecated. 
Description copied from interface: BaseServiceLocator
Gets all the inhabitants registered under the given Contract. This is an example of heterogeneous type-safe container.

Specified by:
getAllByContract in interface BaseServiceLocator
Returns:
can be empty but never null.

getAllByContract

public <T> Collection<T> getAllByContract(String contractType)
Deprecated. 
Specified by:
getAllByContract in interface BaseServiceLocator


Copyright © 2013 Oracle Corporation. All Rights Reserved.