org.eclipse.gemini.blueprint.service.importer.support.internal.aop
Class ServiceStaticInterceptor

java.lang.Object
  extended by org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker
      extended by org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceStaticInterceptor
All Implemented Interfaces:
org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor, ServiceReferenceProvider, org.springframework.beans.factory.DisposableBean

public class ServiceStaticInterceptor
extends ServiceInvoker

Interceptor offering static behaviour around an OSGi service. If the OSGi becomes unavailable, no look up or retries will be executed, the interceptor throwing an exception.

Author:
Costin Leau

Field Summary
 
Fields inherited from class org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker
log
 
Constructor Summary
ServiceStaticInterceptor(org.osgi.framework.BundleContext context, org.osgi.framework.ServiceReference reference)
           
 
Method Summary
 void destroy()
           
 boolean equals(Object other)
           
 org.osgi.framework.ServiceReference getServiceReference()
          Convenience method exposing the target (OSGi service) reference so that subinterceptors can access it.
protected  Object getTarget()
          Determine the target object to execute the invocation upon.
 int hashCode()
           
 void setUseBlueprintExceptions(boolean useBlueprintExceptions)
           
 
Methods inherited from class org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker
doInvoke, invoke
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceStaticInterceptor

public ServiceStaticInterceptor(org.osgi.framework.BundleContext context,
                                org.osgi.framework.ServiceReference reference)
Method Detail

getTarget

protected Object getTarget()
Description copied from class: ServiceInvoker
Determine the target object to execute the invocation upon.

Specified by:
getTarget in class ServiceInvoker
Returns:

setUseBlueprintExceptions

public void setUseBlueprintExceptions(boolean useBlueprintExceptions)

getServiceReference

public org.osgi.framework.ServiceReference getServiceReference()
Description copied from class: ServiceInvoker
Convenience method exposing the target (OSGi service) reference so that subinterceptors can access it. By default, returns null.

Specified by:
getServiceReference in interface ServiceReferenceProvider
Overrides:
getServiceReference in class ServiceInvoker

destroy

public void destroy()
Specified by:
destroy in interface org.springframework.beans.factory.DisposableBean
Specified by:
destroy in class ServiceInvoker

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2006-2013. All Rights Reserved.