Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.gemini.blueprint.service.importer.support.internal.aop
Class ServiceInvoker

    java.lang.Object
      org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker

All Implemented Interfaces:
  org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor, ServiceReferenceProvider, org.springframework.beans.factory.DisposableBean

Direct Known Subclasses:
  ServiceDynamicInterceptor, ServiceStaticInterceptor

    public abstract class ServiceInvoker

extends Object
implements org.aopalliance.intercept.MethodInterceptor, ServiceReferenceProvider, org.springframework.beans.factory.DisposableBean

Around interceptor for OSGi service invokers. Uses method invocation to execute the call.

A `TargetSource` can be used though it doesn't offer localized exceptions (unless information is passed around). The biggest difference as opposed to a target source is that mixins call do not require a service behind. However, in the future, this interceptor might be replaced with a TargetSource.

Author:
  Costin Leau

Field Summary
`protected org.apache.commons.logging.Log` | `log`

Constructor Summary
`ServiceInvoker()`

Method Summary
`abstract void` | `destroy()`
`protected Object` | `doInvoke(Object service, org.aopalliance.intercept.MethodInvocation invocation)` Actual invocation - the class is being executed on a different object then the one exposed in the invocation object.
`org.osgi.framework.ServiceReference` | `getServiceReference()` Convenience method exposing the target (OSGi service) reference so that subinterceptors can access it.
`protected abstract Object` | `getTarget()` Determine the target object to execute the invocation upon.
`Object` | `invoke(org.aopalliance.intercept.MethodInvocation invocation)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### log

    protected final transient org.apache.commons.logging.Log log

Constructor Detail

### ServiceInvoker

    public ServiceInvoker()

Method Detail

### doInvoke

    protected Object doInvoke(Object service,
                              org.aopalliance.intercept.MethodInvocation invocation)
                       throws Throwable

  Actual invocation - the class is being executed on a different object then the one exposed in the invocation object.

  Parameters:
    `service` -
    `invocation` -
  Returns:
  Throws:
    `Throwable`

### invoke

    public final Object invoke(org.aopalliance.intercept.MethodInvocation invocation)
                        throws Throwable

  Specified by:
    `invoke` in interface `org.aopalliance.intercept.MethodInterceptor`
  Throws:
    `Throwable`

### getTarget

    protected abstract Object getTarget()

  Determine the target object to execute the invocation upon.

  Returns:
  Throws:
    `Throwable`

### getServiceReference

    public org.osgi.framework.ServiceReference getServiceReference()

  Convenience method exposing the target (OSGi service) reference so that subinterceptors can access it. By default, returns null.

  Specified by:
    `getServiceReference` in interface `ServiceReferenceProvider`
  Returns:

### destroy

    public abstract void destroy()

  Specified by:
    `destroy` in interface `org.springframework.beans.factory.DisposableBean`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2013. All Rights Reserved.