net.sf.crispy
Class Executor

java.lang.Object
  extended bynet.sf.crispy.Executor
Direct Known Subclasses:
AbstractHttpExecutor, ExecutorDecorator, JaxRpcExecutor, JBossRemotingExecutor, RmiExecutor, XmlRpcExecutor

public abstract class Executor
extends java.lang.Object

Send the method to the server and wait of return-value.

Author:
Linke

Field Summary
protected static org.apache.commons.logging.Log log
           
 
Constructor Summary
Executor()
           
 
Method Summary
abstract  java.lang.Object execute(java.lang.Class pvProxyClass, java.lang.Object pvProxy, java.lang.reflect.Method pvMethod, java.lang.Object[] pvArgs)
          Make the invocation of the services.
 InvocationStrategy getDefaultInvocationStrategy()
          Strategy for invocation the remote service.
abstract  java.lang.String getDefaultUrlAndPort()
          Get default url and port.
 java.lang.Object getInvocationStrategy()
           
 java.util.Properties getProperties()
           
 java.lang.String getUrlAndPort()
           
 void setInvocationStrategy(java.lang.Object pvInvocationStrategy)
           
 void setProperties(java.util.Properties pvProperties)
           
 void setUrlAndPort(java.lang.String pvUrlAndPort)
           
 boolean withConverter()
          If true, then invoke before execute method Converter.makeSimple() and after call Converter.makeComplex.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final org.apache.commons.logging.Log log
Constructor Detail

Executor

public Executor()
Method Detail

setProperties

public void setProperties(java.util.Properties pvProperties)

getProperties

public java.util.Properties getProperties()

setUrlAndPort

public void setUrlAndPort(java.lang.String pvUrlAndPort)

getUrlAndPort

public java.lang.String getUrlAndPort()

setInvocationStrategy

public void setInvocationStrategy(java.lang.Object pvInvocationStrategy)

getInvocationStrategy

public java.lang.Object getInvocationStrategy()

getDefaultInvocationStrategy

public InvocationStrategy getDefaultInvocationStrategy()
Strategy for invocation the remote service.

Returns:
InvocationStrategy

withConverter

public boolean withConverter()
If true, then invoke before execute method Converter.makeSimple() and after call Converter.makeComplex.

Returns:
Default is false.

getDefaultUrlAndPort

public abstract java.lang.String getDefaultUrlAndPort()
Get default url and port. If no url and port is in properties.

Returns:
Default url and port.

execute

public abstract java.lang.Object execute(java.lang.Class pvProxyClass,
                                         java.lang.Object pvProxy,
                                         java.lang.reflect.Method pvMethod,
                                         java.lang.Object[] pvArgs)
                                  throws java.lang.Exception
Make the invocation of the services.

Parameters:
pvProxyClass - Service interface. Class of the invoked service.
pvProxy -
pvMethod - Method to call.
pvArgs - Parameter of the method.
Returns:
Result of the execute method.
Throws:
java.lang.Exception


Copyright © 2005-2006 Crispy. All Rights Reserved.