|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.ipojo.util.DependencyModel
org.apache.felix.ipojo.handler.temporal.TemporalDependency
public class TemporalDependency
Temporal dependency. A temporal dependency waits (block) for the availability of the service. If no provider arrives in the specified among of time, a runtime exception is thrown.
Field Summary |
---|
Fields inherited from class org.apache.felix.ipojo.util.DependencyModel |
---|
BROKEN, DYNAMIC_BINDING_POLICY, DYNAMIC_PRIORITY_BINDING_POLICY, RESOLVED, STATIC_BINDING_POLICY, UNRESOLVED |
Constructor Summary | |
---|---|
TemporalDependency(Class spec,
boolean agg,
boolean collection,
boolean proxy,
Filter filter,
BundleContext context,
long timeout,
int policy,
String defaultImpl,
TemporalHandler handler)
Creates a temporal dependency. |
Method Summary | |
---|---|
Object |
getService()
Called by the proxy to get a service object to delegate a method. |
void |
onDependencyReconfiguration(ServiceReference[] arg0,
ServiceReference[] arg1)
The dependency has been reconfigured. |
void |
onEntry(Object pojo,
Method method,
Object[] args)
A POJO method will be invoked. |
void |
onError(Object pojo,
Method method,
Throwable throwable)
A POJO method has thrown an error. |
void |
onExit(Object pojo,
Method method,
Object returnedObj)
A POJO method has returned. |
void |
onFinally(Object pojo,
Method method)
A POJO method is finished. |
Object |
onGet(Object arg0,
String arg1,
Object arg2)
The code require a value of the monitored field. |
void |
onServiceArrival(ServiceReference ref)
A provider arrives. |
void |
onServiceDeparture(ServiceReference arg0)
A provider leaves. |
void |
onServiceModification(ServiceReference arg0)
A provider is modified. |
void |
onSet(Object arg0,
String arg1,
Object arg2)
The monitored field receives a value. |
void |
start()
Start method. |
void |
stop()
Stop method. |
Methods inherited from class org.apache.felix.ipojo.util.DependencyModel |
---|
addedService, addingService, getBindingPolicy, getComparator, getComparator, getFilter, getPolicy, getService, getServiceReference, getServiceReferences, getSize, getSpecification, getState, getUsedServiceReferences, isAggregate, isFrozen, isOptional, loadSpecification, manageModification, match, modifiedService, removedService, setAggregate, setBindingPolicy, setBundleContext, setComparator, setFilter, setOptionality, setSpecification, unfreeze, ungetService |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TemporalDependency(Class spec, boolean agg, boolean collection, boolean proxy, Filter filter, BundleContext context, long timeout, int policy, String defaultImpl, TemporalHandler handler)
spec
- the service specificationagg
- is the dependency aggregate ?collection
- the dependency field is a collectionproxy
- enable the proxy-modefilter
- the LDAP filtercontext
- service contexttimeout
- timeouthandler
- Handler managing this dependencydefaultImpl
- class used as default-implementationpolicy
- onTimeout policyMethod Detail |
---|
public void onDependencyReconfiguration(ServiceReference[] arg0, ServiceReference[] arg1)
onDependencyReconfiguration
in class DependencyModel
arg0
- new service referencesarg1
- old service referencesDependencyModel.onDependencyReconfiguration(org.osgi.framework.ServiceReference[],
org.osgi.framework.ServiceReference[])
public void onServiceArrival(ServiceReference ref)
onServiceArrival
in class DependencyModel
ref
- service reference of the new provider.DependencyModel.onServiceArrival(org.osgi.framework.ServiceReference)
public void onServiceDeparture(ServiceReference arg0)
onServiceDeparture
in class DependencyModel
arg0
- leaving service references.DependencyModel.onServiceDeparture(org.osgi.framework.ServiceReference)
public void onServiceModification(ServiceReference arg0)
onServiceModification
in class DependencyModel
arg0
- leaving service references.DependencyModel.onServiceDeparture(org.osgi.framework.ServiceReference)
public Object onGet(Object arg0, String arg1, Object arg2)
onGet
in interface FieldInterceptor
arg0
- POJO instance asking for the servicearg1
- field namearg2
- previous value
FieldInterceptor.onGet(java.lang.Object, java.lang.String, java.lang.Object)
public void onEntry(Object pojo, Method method, Object[] args)
onEntry
in interface MethodInterceptor
pojo
- : Pojo objectmethod
- : called methodargs
- : argumentsMethodInterceptor.onEntry(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
public void onError(Object pojo, Method method, Throwable throwable)
onError
in interface MethodInterceptor
pojo
- : POJO object.method
- : Method object.throwable
- : thrown errorMethodInterceptor.onError(java.lang.Object, java.lang.reflect.Method, java.lang.Throwable)
public void onExit(Object pojo, Method method, Object returnedObj)
onExit
in interface MethodInterceptor
pojo
- : POJO object.method
- : Method object.returnedObj
- : returned object (null for void method)MethodInterceptor.onExit(java.lang.Object, java.lang.reflect.Method, java.lang.Object)
public void onFinally(Object pojo, Method method)
onFinally
in interface MethodInterceptor
pojo
- : POJO object.method
- : Method object.MethodInterceptor.onFinally(java.lang.Object, java.lang.reflect.Method)
public Object getService()
public void start()
start
in class DependencyModel
DependencyModel.start()
public void stop()
stop
in class DependencyModel
DependencyModel.stop()
public void onSet(Object arg0, String arg1, Object arg2)
onSet
in interface FieldInterceptor
arg0
- POJO setting the value.arg1
- field namearg2
- received valueFieldInterceptor.onSet(java.lang.Object, java.lang.String, java.lang.Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |