org.qi4j.api.service
Interface ServiceReference<T>

All Superinterfaces:
ActivationEventListenerRegistration, HasTypes, MetaInfoHolder

public interface ServiceReference<T>
extends HasTypes, ActivationEventListenerRegistration, MetaInfoHolder

From a ServiceReference you can access and modify metadata about a service. You can also access the actual service through get(), that can then be invoked.


Method Summary
 T get()
           
 java.lang.String identity()
           
 boolean isActive()
           
 boolean isAvailable()
           
 
Methods inherited from interface org.qi4j.api.type.HasTypes
types
 
Methods inherited from interface org.qi4j.api.activation.ActivationEventListenerRegistration
deregisterActivationEventListener, registerActivationEventListener
 
Methods inherited from interface org.qi4j.api.structure.MetaInfoHolder
metaInfo
 

Method Detail

identity

java.lang.String identity()
Returns:
the service's identity

get

T get()
Returns:
the actual service

isActive

boolean isActive()
Returns:
TRUE if the service is active, otherwise return FALSE

isAvailable

boolean isAvailable()
Returns:
TRUE if the service is available, otherwise return FALSE