org.compass.spring.device.ojb
Class SpringOjbGpsDeviceInterceptor

java.lang.Object
  extended by org.compass.spring.device.ojb.SpringOjbGpsDeviceInterceptor
All Implemented Interfaces:
org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor, org.springframework.beans.factory.InitializingBean

public class SpringOjbGpsDeviceInterceptor
extends Object
implements org.aopalliance.intercept.MethodInterceptor, org.springframework.beans.factory.InitializingBean

Uses Spring's AOP capabilities to attach and remove lifecycle event listeners to the PersistenceBroker (the device acts as the listener). Uses OjbGpsDeviceUtils to perform it on the supplied SpringOjbGpsDevice.

Mainly used as a post interceptor with transaction proxies that manage service layer operations on an OJB enabled DAO layer.

Author:
kimchy

Constructor Summary
SpringOjbGpsDeviceInterceptor()
           
 
Method Summary
 void afterPropertiesSet()
           
 SpringOjbGpsDevice getOjbGpsDevice()
          Removes the SpringOjbGpsDevice to be used to attach and remove OJB lifecycle event listeners.
 Object invoke(org.aopalliance.intercept.MethodInvocation methodInvocation)
          Wraps the method invocation with attaching and removing lifecycle event listeners from PersistenceBroker.
 void setOjbGpsDevice(SpringOjbGpsDevice ojbGpsDevice)
          Sets the SpringOjbGpsDevice to be used to attach and remove OJB lifecycle event listeners.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringOjbGpsDeviceInterceptor

public SpringOjbGpsDeviceInterceptor()
Method Detail

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception

invoke

public Object invoke(org.aopalliance.intercept.MethodInvocation methodInvocation)
              throws Throwable
Wraps the method invocation with attaching and removing lifecycle event listeners from PersistenceBroker.

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

getOjbGpsDevice

public SpringOjbGpsDevice getOjbGpsDevice()
Removes the SpringOjbGpsDevice to be used to attach and remove OJB lifecycle event listeners.


setOjbGpsDevice

public void setOjbGpsDevice(SpringOjbGpsDevice ojbGpsDevice)
Sets the SpringOjbGpsDevice to be used to attach and remove OJB lifecycle event listeners.

Parameters:
ojbGpsDevice -


Copyright (c) 2004-2008 The Compass Project.