|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nuxeo.runtime.binding.AbstractServiceProvider org.nuxeo.runtime.binding.BeanServiceProvider
public class BeanServiceProvider
Field Summary | |
---|---|
static java.lang.String |
LOCAL_SUFFIX
|
static java.lang.String |
PREFIX
|
static java.lang.String |
REMOTE_SUFFIX
|
Constructor Summary | |
---|---|
BeanServiceProvider()
This constructor should be used on server nodes. |
|
BeanServiceProvider(javax.naming.InitialContext ctx)
This constructor should be used on clients. |
|
BeanServiceProvider(javax.naming.InitialContext ctx,
boolean tryLocalFirst)
This constructor should e used on clients that are using auto configuration. |
Method Summary | |
---|---|
void |
destroy()
The provider is no more needed. |
java.lang.Object |
getService(java.lang.Class<?> serviceClass,
java.lang.String bindingKey)
Gets the service instance given its interface class. |
Methods inherited from class org.nuxeo.runtime.binding.AbstractServiceProvider |
---|
getManager, setManager |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PREFIX
public static final java.lang.String REMOTE_SUFFIX
public static final java.lang.String LOCAL_SUFFIX
Constructor Detail |
---|
public BeanServiceProvider() throws javax.naming.NamingException
javax.naming.NamingException
public BeanServiceProvider(javax.naming.InitialContext ctx) throws javax.naming.NamingException
ctx
- the initial naming context
javax.naming.NamingException
public BeanServiceProvider(javax.naming.InitialContext ctx, boolean tryLocalFirst) throws javax.naming.NamingException
ctx
- the initial naming context
javax.naming.NamingException
Method Detail |
---|
public void destroy()
ServiceProvider
public java.lang.Object getService(java.lang.Class<?> serviceClass, java.lang.String bindingKey)
ServiceProvider
If the lookup succeeds and the provider is attached to a service manager it may use the binding key to register a service binding on the manager so that the next time the same service is requested it will be picked up from the manager cache.
Note that the binding key should be used to lookup the service. Usually this key is the service class name but can be different when querying a named service (in this case it will be serviceClass + '@' + serviceName).
If implementors doesn't support named services then they can use the serviceClass to perform the lookup.
serviceClass
- the interface of the servicebindingKey
- the binding key to use when caching bindings
|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |