public class DeviceDependency extends org.apache.felix.ipojo.handlers.dependency.Dependency implements AccessRightListener
Modifier and Type | Field and Description |
---|---|
static int |
BIND_ICASA
Type of callback to avoid iPOJO invokation in obObjectCreation
|
static int |
UNBIND_ICASA |
Constructor and Description |
---|
DeviceDependency(DeviceDependencyHandler handler,
String field,
Class spec,
org.osgi.framework.Filter filter,
boolean isOptional,
boolean isAggregate,
String identity,
org.osgi.framework.BundleContext context,
int policy,
Comparator cmp,
String mandatoryProps) |
Modifier and Type | Method and Description |
---|---|
void |
addAccessRight(String deviceId,
AccessRight accessRight) |
protected void |
addConstructorInjection(int index) |
protected void |
addDependencyCallback(org.apache.felix.ipojo.handlers.dependency.DependencyCallback callback) |
boolean |
deviceIsTracked(String deviceId) |
AccessRight |
getAccessRight(String deviceId) |
String |
getApplicationId() |
protected org.apache.felix.ipojo.handlers.dependency.DependencyCallback[] |
getCallbacks() |
protected int |
getObjectType()
Method added to obtain the m_type field value of class Dependency.
|
protected void |
invokeCallbackIcasa(org.apache.felix.ipojo.handlers.dependency.DependencyCallback callback,
org.osgi.framework.ServiceReference ref,
Object svcObject,
Object pojo)
This method invokes the private invokeCallback methodd in Dependency class
|
void |
onAccessRightModified(AccessRight accessRight)
Method called when the right to access the device has been modified.
|
void |
onDependencyReconfiguration(org.osgi.framework.ServiceReference[] departs,
org.osgi.framework.ServiceReference[] arrivals)
This method was override to invoke our callBindMethodIcasa method instead of iPOJO callBindMethod This method was
override to invoke our callUnbindMethodIcasa method instead of iPOJO callUnbindMethod
|
Object |
onGet(Object pojo,
String fieldName,
Object value)
This method passes the proxy object in two cases: when the reference is an Aggregate and the type is Array or
Vector.
|
void |
onMethodAccessRightModified(AccessRight accessRight,
String methodName)
Method called when the access right to a specific method has been modified.
|
protected void |
onObjectCreation(Object pojo) |
void |
onServiceArrival(org.osgi.framework.ServiceReference reference)
This method was override to invoke our callBindMethodIcasa method instead of iPOJO callBindMethod
|
void |
onServiceDeparture(org.osgi.framework.ServiceReference reference)
This method was override to invoke our callUnbindMethodIcasa method instead of iPOJO callUnbindMethod
|
protected void |
setType(int type) |
void |
start()
Method overridden to modify m_proxyObject in Depedency with our ProxyFactory functionality: 1.
|
void |
stop() |
getConstructorParameter, getConstructorParameterIndex, getConstructorParameterType, getDefaultImplementation, getField, getHandler, getId, getService, getServiceReferencesAsList, isFrozen, isProxy, isServiceLevelRequirement, onEntry, onError, onExit, onFinally, onServiceModification, onSet, resetLocalCache, setProxy, setServiceLevelDependency, setSpecification, supportsNullable, unfreeze
acquireReadLockIfNotHeld, acquireWriteLockIfNotHeld, addListener, applyReconfiguration, cleanup, getBindingPolicy, getBundleContext, getComparator, getComponentInstance, getContextSourceManager, getFilter, getService, getService, getServiceReference, getServiceReferenceManager, getServiceReferences, getSize, getSpecification, getState, getTracker, getUsedServiceReferences, invalidateMatchingServices, invalidateSelectedServices, isAggregate, isOptional, match, notifyListeners, onChange, releaseReadLockIfHeld, releaseWriteLockIfHeld, removeListener, setAggregate, setBundleContext, setComparator, setFilter, setOptionality, ungetService
public static final int BIND_ICASA
public static final int UNBIND_ICASA
public DeviceDependency(DeviceDependencyHandler handler, String field, Class spec, org.osgi.framework.Filter filter, boolean isOptional, boolean isAggregate, String identity, org.osgi.framework.BundleContext context, int policy, Comparator cmp, String mandatoryProps)
protected org.apache.felix.ipojo.handlers.dependency.DependencyCallback[] getCallbacks()
getCallbacks
in class org.apache.felix.ipojo.handlers.dependency.Dependency
protected void setType(int type)
setType
in class org.apache.felix.ipojo.handlers.dependency.Dependency
protected void addConstructorInjection(int index) throws org.apache.felix.ipojo.ConfigurationException
addConstructorInjection
in class org.apache.felix.ipojo.handlers.dependency.Dependency
org.apache.felix.ipojo.ConfigurationException
protected void addDependencyCallback(org.apache.felix.ipojo.handlers.dependency.DependencyCallback callback)
addDependencyCallback
in class org.apache.felix.ipojo.handlers.dependency.Dependency
public String getApplicationId()
public void addAccessRight(String deviceId, AccessRight accessRight)
public AccessRight getAccessRight(String deviceId)
protected void onObjectCreation(Object pojo)
onObjectCreation
in class org.apache.felix.ipojo.handlers.dependency.Dependency
public void onServiceDeparture(org.osgi.framework.ServiceReference reference)
onServiceDeparture
in class org.apache.felix.ipojo.handlers.dependency.Dependency
public void onServiceArrival(org.osgi.framework.ServiceReference reference)
onServiceArrival
in class org.apache.felix.ipojo.handlers.dependency.Dependency
public void onDependencyReconfiguration(org.osgi.framework.ServiceReference[] departs, org.osgi.framework.ServiceReference[] arrivals)
onDependencyReconfiguration
in class org.apache.felix.ipojo.handlers.dependency.Dependency
protected void invokeCallbackIcasa(org.apache.felix.ipojo.handlers.dependency.DependencyCallback callback, org.osgi.framework.ServiceReference ref, Object svcObject, Object pojo)
callback
- ref
- svcObject
- pojo
- public Object onGet(Object pojo, String fieldName, Object value)
onGet
in interface org.apache.felix.ipojo.FieldInterceptor
onGet
in class org.apache.felix.ipojo.handlers.dependency.Dependency
protected int getObjectType()
public void start()
start
in class org.apache.felix.ipojo.handlers.dependency.Dependency
public void stop()
stop
in class org.apache.felix.ipojo.handlers.dependency.Dependency
public boolean deviceIsTracked(String deviceId)
public void onAccessRightModified(AccessRight accessRight)
AccessRightListener
onAccessRightModified
in interface AccessRightListener
accessRight
- the access right object that has been changed.public void onMethodAccessRightModified(AccessRight accessRight, String methodName)
AccessRightListener
onMethodAccessRightModified
in interface AccessRightListener
accessRight
- The access right object.methodName
- The method name which access right has been modified.Copyright © 2012-2013 ADELE Research Group. All Rights Reserved.