de.smartics.properties.spi.config.proxy
Class PropertiesProxyInvocationHandler

Package class diagram package PropertiesProxyInvocationHandler
java.lang.Object
  extended by de.smartics.properties.spi.config.proxy.PropertiesProxyInvocationHandler
All Implemented Interfaces:
Serializable, InvocationHandler

public final class PropertiesProxyInvocationHandler
     
     
extends Object
implements InvocationHandler, Serializable

The invocation handler receives every method invocation on the proxy that is wrapped over the properties interface. It analyzes the intent of this method call and provides (calculates) the return value. The main task is to detect whether a value, a property key or a property description has to be returned. After this decision making the task to calculate the return value is delegated to a specialized class.

See Also:
Serialized Form

Constructor Summary
PropertiesProxyInvocationHandler(SerializableConfigurationProperties configurationProperties)
          Default constructor.
 
Method Summary
 Object invoke(Object proxy, Method method, Object[] args)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertiesProxyInvocationHandler

public PropertiesProxyInvocationHandler(SerializableConfigurationProperties configurationProperties)
                                 throws NullPointerException
Default constructor.

Parameters:
configurationProperties - the configuration properties on that the method calls are delegated.
Throws:
NullPointerException - if configurationProperties is null.
Method Detail

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws InvalidArgumentsException

Specified by:
invoke in interface InvocationHandler
Throws:
InvalidArgumentsException - when arguments are passed. Only no arg methods are supported.
See Also:
InvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])


Copyright © 2012-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.