fulmine.rpc
Class RpcDefinition

java.lang.Object
  extended by fulmine.rpc.RpcDefinition
All Implemented Interfaces:
IRpcDefinition

public final class RpcDefinition
extends Object
implements IRpcDefinition

A simple implementation of an IRpcDefinition.

Author:
Ramon Servadei

Constructor Summary
RpcDefinition(Class<? extends IField> resultType, String name, Class<? extends IField>... argTypes)
          Construct the definition with all relevant attributes
RpcDefinition(String definitionAsString)
          Construct the definition by parsing a string representation of the RPC definition.
 
Method Summary
 boolean equals(Object obj)
           
 Class<? extends IField>[] getArgumentTypes()
          Get the argument types, in order, that are required by the RPC
 String getName()
          Get the name of the RPC
 String getRemoteContextIdentity()
          Get the identity of the remote context that this RPC can be invoked in.
 Class<? extends IField> getResultType()
          Get the result type for this RPC
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RpcDefinition

public RpcDefinition(Class<? extends IField> resultType,
                     String name,
                     Class<? extends IField>... argTypes)
Construct the definition with all relevant attributes

Parameters:
resultType - the result type
name - the RPC name
argTypes - the argument types, in order

RpcDefinition

public RpcDefinition(String definitionAsString)
Construct the definition by parsing a string representation of the RPC definition. A string definition is in the form:
 result name(args)
 
 e.g. BooleanField foo(StringField, IntegerField)
 

Parameters:
definitionAsString - the string definition of the RPC
Method Detail

getArgumentTypes

public Class<? extends IField>[] getArgumentTypes()
Description copied from interface: IRpcDefinition
Get the argument types, in order, that are required by the RPC

Specified by:
getArgumentTypes in interface IRpcDefinition
Returns:
the argument types, in order, that are required by the RPC

getName

public String getName()
Description copied from interface: IRpcDefinition
Get the name of the RPC

Specified by:
getName in interface IRpcDefinition
Returns:
the name of the RPC

getRemoteContextIdentity

public String getRemoteContextIdentity()
Description copied from interface: IRpcDefinition
Get the identity of the remote context that this RPC can be invoked in.

Specified by:
getRemoteContextIdentity in interface IRpcDefinition
Returns:
the identity of the remote context that this RPC can be invoked in

getResultType

public Class<? extends IField> getResultType()
Description copied from interface: IRpcDefinition
Get the result type for this RPC

Specified by:
getResultType in interface IRpcDefinition
Returns:
the result type for this RPC

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2007-2009. All Rights Reserved.