org.logicblaze.lingo
Class SimpleMetadataStrategy

java.lang.Object
  extended by org.logicblaze.lingo.SimpleMetadataStrategy
All Implemented Interfaces:
java.io.Serializable, MetadataStrategy
Direct Known Subclasses:
Backport175MetadataStrategy

public class SimpleMetadataStrategy
extends java.lang.Object
implements MetadataStrategy

A simple metadata strategy which uses POJO naming conventions. By default all method invocations are synchronous to avoid surprising users of Spring Remoting. However if you set the setOneWayForVoidMethods(boolean) value to true then all void methods which do not throw checked exceptions become asynchronous one way methods.

Also any object which implements the Remote interface or the EventListener are assumed to be remote and so a remote proxy is used to allow remote notifications and asynchronous messaging.

Version:
$Revision: 76 $
See Also:
Serialized Form

Constructor Summary
SimpleMetadataStrategy()
           
SimpleMetadataStrategy(boolean oneWayForVoidMethods)
           
 
Method Summary
 MethodMetadata getMethodMetadata(java.lang.reflect.Method method)
          Generates the method specific metadata for the given method invocation
 java.util.Set getRemoteTypes()
           
 ResultJoinStrategy getResultJoinStrategy()
           
 ResultJoinStrategy getResultJoinStrategy(org.aopalliance.intercept.MethodInvocation methodInvocation, MethodMetadata metadata)
          Returns the strategy for joining multiple results together when communicating with multiple back end servers over topics.
protected  boolean isEndSession(java.lang.reflect.Method method)
          Returns true if this method completes a callback object
 boolean isOneWayForVoidMethods()
           
protected  boolean isOneWayMethod(java.lang.reflect.Method method)
           
 boolean isRemoteParameter(java.lang.reflect.Method method, java.lang.Class parameterType, int index)
           
protected  boolean isStateful(java.lang.reflect.Method method)
          Returns whether or not this object is stateful such that sticky load balancing should be used
protected  void populateDefaultRemoteTypes(java.util.Set remoteTypes)
           
 void setOneWayForVoidMethods(boolean oneWayForVoidMethods)
           
 void setRemoteTypes(java.util.Set remoteTypes)
           
 void setResultJoinStrategy(ResultJoinStrategy joinStrategy)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleMetadataStrategy

public SimpleMetadataStrategy()

SimpleMetadataStrategy

public SimpleMetadataStrategy(boolean oneWayForVoidMethods)
Method Detail

getMethodMetadata

public MethodMetadata getMethodMetadata(java.lang.reflect.Method method)
Description copied from interface: MetadataStrategy
Generates the method specific metadata for the given method invocation

Specified by:
getMethodMetadata in interface MetadataStrategy

isOneWayForVoidMethods

public boolean isOneWayForVoidMethods()

setOneWayForVoidMethods

public void setOneWayForVoidMethods(boolean oneWayForVoidMethods)

getResultJoinStrategy

public ResultJoinStrategy getResultJoinStrategy(org.aopalliance.intercept.MethodInvocation methodInvocation,
                                                MethodMetadata metadata)
Description copied from interface: MetadataStrategy
Returns the strategy for joining multiple results together when communicating with multiple back end servers over topics.

Specified by:
getResultJoinStrategy in interface MetadataStrategy

getResultJoinStrategy

public ResultJoinStrategy getResultJoinStrategy()

setResultJoinStrategy

public void setResultJoinStrategy(ResultJoinStrategy joinStrategy)

getRemoteTypes

public java.util.Set getRemoteTypes()

setRemoteTypes

public void setRemoteTypes(java.util.Set remoteTypes)

isRemoteParameter

public boolean isRemoteParameter(java.lang.reflect.Method method,
                                 java.lang.Class parameterType,
                                 int index)

isOneWayMethod

protected boolean isOneWayMethod(java.lang.reflect.Method method)

isEndSession

protected boolean isEndSession(java.lang.reflect.Method method)
Returns true if this method completes a callback object


isStateful

protected boolean isStateful(java.lang.reflect.Method method)
Returns whether or not this object is stateful such that sticky load balancing should be used


populateDefaultRemoteTypes

protected void populateDefaultRemoteTypes(java.util.Set remoteTypes)


Copyright © 2010 LogicBlaze, Inc.. All Rights Reserved.