public final class Invocation extends java.lang.Object implements ISerializable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ABBREVIATION
The abbreviation used for this class during serialization.
|
static short |
TYPE_INVOKE
Constant value that indicates that the invocation carries a remote call that
must be performed.
|
static short |
TYPE_REMOVE
Constant value that indicates that the invocation result on the receiver side
of an invoke method can be cleared.
|
static short |
TYPE_RESULT
Constant value that indicates that the invocation carries a result that must
be delivered.
|
static short |
TYPE_UNDEFINED
Constant value that indicates the initial type when a invocation is created.
|
Constructor and Description |
---|
Invocation()
Creates a new invocation.
|
Invocation(ReferenceID source,
ReferenceID target,
java.lang.String method,
java.lang.Object[] args)
Creates a new invocation with the specified source,
target, method and arguments.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object[] |
getArguments()
Returns the method's arguments.
|
java.lang.Throwable |
getException()
Returns the exception state of this method.
|
java.lang.Integer |
getID()
Returns the id of the invocation.
|
NFCollection |
getRequirements()
Returns the nonfunctional requirements associated with this invocation.
|
java.lang.Object |
getResult()
Returns the return value of the method call.
|
java.lang.String |
getSignature()
Returns the signature of the method.
|
ReferenceID |
getSource()
Returns the source of the invocation.
|
ReferenceID |
getTarget()
Returns the target of the invocation.
|
short |
getType()
Returns the message type.
|
void |
readObject(IObjectInput stream)
Deserializes the invocation from the given stream.
|
void |
setArguments(java.lang.Object[] arguments)
Sets the method arguments of the invocation.
|
void |
setException(java.lang.Throwable exception)
Sets the exception of the invocation.
|
void |
setID(java.lang.Integer id)
Sets the id of the invocation.
|
void |
setRequirements(NFCollection collection)
Associates nonfunctional requirements with this invocation.
|
void |
setResult(java.lang.Object result)
Sets the result of the invocation.
|
void |
setSignature(java.lang.String signature)
Sets the signature of the method.
|
void |
setSource(ReferenceID source)
Sets the invocation's source.
|
void |
setTarget(ReferenceID target)
Sets the invocation's target.
|
void |
setType(short type)
Sets the type of the invocation.
|
java.lang.String |
toString()
Returns a string representation of this invocation.
|
void |
writeObject(IObjectOutput stream)
Serializes the invocation to the given stream.
|
public static final java.lang.String ABBREVIATION
public static final short TYPE_UNDEFINED
public static final short TYPE_INVOKE
public static final short TYPE_RESULT
public static final short TYPE_REMOVE
public Invocation()
public Invocation(ReferenceID source, ReferenceID target, java.lang.String method, java.lang.Object[] args)
source
- The source object.target
- The target object.method
- The method signature.args
- The method arguments.public java.lang.Integer getID()
public java.lang.Object[] getArguments()
public java.lang.Object getResult()
public java.lang.String getSignature()
public ReferenceID getSource()
public ReferenceID getTarget()
public short getType()
public java.lang.Throwable getException()
public NFCollection getRequirements()
public void setID(java.lang.Integer id)
id
- The id to set.public void setArguments(java.lang.Object[] arguments)
arguments
- The method arguments to set.public void setResult(java.lang.Object result)
result
- The result to set.public void setSignature(java.lang.String signature)
signature
- The signature to set.public void setTarget(ReferenceID target)
target
- The invocation's target.public void setSource(ReferenceID source)
source
- The invocation's source.public void setType(short type)
type
- The type to set.public void setException(java.lang.Throwable exception)
exception
- The exception to set.public void setRequirements(NFCollection collection)
collection
- The new non-functional requirements of the
invocation.public void readObject(IObjectInput stream) throws java.io.IOException
readObject
in interface ISerializable
stream
- The stream to read from.java.io.IOException
- Thrown if the deserialization fails.public void writeObject(IObjectOutput stream) throws java.io.IOException
writeObject
in interface ISerializable
stream
- The stream to write to.java.io.IOException
- Thrown if the deserialization fails.public java.lang.String toString()
toString
in class java.lang.Object