GridGain™ 2.0.3
Java API Specification

org.gridgain.grid.gridify
Class GridifyArgumentAdapter

java.lang.Object
  extended by org.gridgain.grid.gridify.GridifyArgumentAdapter
All Implemented Interfaces:
Serializable, GridifyArgument

public class GridifyArgumentAdapter
extends Object
implements GridifyArgument

Convenience adapter for GridifyArgument interface. This adapter should be used in custom grid job implementations.

See Gridify documentation for more information about execution of gridified methods.



See Also:

  Documentation
  Email Support
  Online Forums
  Issue Tracking

Author:   2005-2008 Copyright © GridGain Systems. All Rights Reserved. ver. 2.0.3

See Also:
Gridify, Serialized Form
 

Constructor Summary
GridifyArgumentAdapter()
          Empty constructor.
GridifyArgumentAdapter(Class<?> cls, String name, Class<?>[] types, Object[] params, Object target)
          Creates a fully initialized gridify argument.
GridifyArgumentAdapter(GridifyArgument orig, Object... newParams)
          Copy constructor.
 
Method Summary
 Class<?> getMethodClass()
          Gets class to which the executed method belongs.
 String getMethodName()
          Gets method name.
 Object[] getMethodParameters()
          Gets method parameters in the same order they appear in method signature.
 Class<?>[] getMethodParameterTypes()
          Gets method parameter types in the same order they appear in method signature.
 Object getTarget()
          Gets target object for method execution.
 void setMethodClass(Class<?> cls)
          Sets method class.
 void setMethodName(String mtdName)
          Sets method name.
 void setMethodParameters(Object... params)
          Sets method parameters.
 void setMethodParameterTypes(Class<?>... types)
          Sets method parameter types.
 void setTarget(Object target)
          Sets target object for method execution.
 String toString()
          
 void updateMethodParameter(Object param, int index)
          Updates method parameter.
 void updateMethodParameterType(Class<?> type, int index)
          Updates parameter type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GridifyArgumentAdapter

public GridifyArgumentAdapter()
Empty constructor.


GridifyArgumentAdapter

public GridifyArgumentAdapter(GridifyArgument orig,
                              Object... newParams)
Copy constructor.

Parameters:
orig - Copy to create this instance from.
newParams - Optional array of new parameters to override the the ondes from orig.

GridifyArgumentAdapter

public GridifyArgumentAdapter(Class<?> cls,
                              String name,
                              Class<?>[] types,
                              Object[] params,
                              Object target)
Creates a fully initialized gridify argument.

Parameters:
cls - Method class.
name - Method name.
types - Method parameter types.
params - Method parameters.
target - Target object.
Method Detail

getMethodClass

public Class<?> getMethodClass()
Gets class to which the executed method belongs.

Specified by:
getMethodClass in interface GridifyArgument
Returns:
Class to which method belongs.

getMethodName

public String getMethodName()
Gets method name.

Specified by:
getMethodName in interface GridifyArgument
Returns:
Method name.

getMethodParameterTypes

public Class<?>[] getMethodParameterTypes()
Gets method parameter types in the same order they appear in method signature.

Specified by:
getMethodParameterTypes in interface GridifyArgument
Returns:
Method parameter types.

getMethodParameters

public Object[] getMethodParameters()
Gets method parameters in the same order they appear in method signature.

Specified by:
getMethodParameters in interface GridifyArgument
Returns:
Method parameters.

setMethodClass

public void setMethodClass(Class<?> cls)
Sets method class.

Parameters:
cls - Method class.

setMethodName

public void setMethodName(String mtdName)
Sets method name.

Parameters:
mtdName - Method name.

setMethodParameterTypes

public void setMethodParameterTypes(Class<?>... types)
Sets method parameter types.

Parameters:
types - Method parameter types.

updateMethodParameterType

public void updateMethodParameterType(Class<?> type,
                                      int index)
Updates parameter type.

Parameters:
type - Parameter type to set.
index - Index of the parameter.

setMethodParameters

public void setMethodParameters(Object... params)
Sets method parameters.

Parameters:
params - Method parameters.

updateMethodParameter

public void updateMethodParameter(Object param,
                                  int index)
Updates method parameter.

Parameters:
param - Method parameter value to set.
index - Parameter's index.

setTarget

public void setTarget(Object target)
Sets target object for method execution.

Parameters:
target - Target object for method execution.

getTarget

public Object getTarget()
Gets target object for method execution.

Specified by:
getTarget in interface GridifyArgument
Returns:
Target object for method execution.

toString

public String toString()

Overrides:
toString in class Object

GridGain™ 2.0.3
Java API Specification

GridGain™ - Grid Computing Made Simple, ver. 2.0.3.20052008
2005-2008 Copyright © GridGain Systems. All Rights Reserved.