Right Java tools for J2EE, Web Service, Grid and more
|Home | Products | Documents | Downloads | Purchase | Support | Company | Partners | Contact |

com.acelet.s.argument
Class DynamicArgument

java.lang.Object
  extended by com.acelet.s.argument.DynamicArgument

public abstract class DynamicArgument
extends java.lang.Object

The DynamicArgument is the class for providing dynamic argument for: 1. bean constructors which require an argument list. 2. remote methods which require an argument list. Users must provide an implementation for method getArgumentArray to specify the argument values.

Example:

 public class RandomIntDynamicArgument extends DynamicArgument { 
   static Random random = new Random(); 
  
   public Object[] getArgumentArray() throws InvalidArgumentException { 
     int value = random.nextInt(10); 
     if (value < 0) 
       value = -value; 
     Integer integer = new Integer(value); 
     Object[] argumentArray = new Object[1]; 
     argumentArray[0] = integer; 
     return argumentArray; 
   } 
 } 
 


Field Summary
static Envoy envoy
          envoy is a static variable of Envoy.
 
Constructor Summary
DynamicArgument()
           
 
Method Summary
abstract  java.lang.Object[] getArgumentArray()
          getArgumentArray is a user defined method.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

envoy

public static Envoy envoy
envoy is a static variable of Envoy. It is initialized by the system and can be used to perform related tasks.

Constructor Detail

DynamicArgument

public DynamicArgument()
Method Detail

getArgumentArray

public abstract java.lang.Object[] getArgumentArray()
                                             throws com.acelet.lib.InvalidArgumentException
getArgumentArray is a user defined method. It provide dynamic values for constructors and remote methods.

Throws:
com.acelet.lib.InvalidArgumentException

Copyright Acelet Corporation. 2000-2008. All rights reserved.