java.lang.Object
org.praxislive.core.Packet
org.praxislive.core.Call
- All Implemented Interfaces:
Comparable<Packet>
-
Method Summary
Modifier and TypeMethodDescriptionargs()Get the argument list of this Call.static Callcreate(ControlAddress toAddress, ControlAddress fromAddress, long timeCode) Create a Call with Type INVOKE and empty arguments.static Callcreate(ControlAddress toAddress, ControlAddress fromAddress, long timeCode, List<Value> args) Create a Call with Type INVOKE.static Callcreate(ControlAddress toAddress, ControlAddress fromAddress, long timeCode, Value arg) Create a Call with Type INVOKE.static CallcreateQuiet(ControlAddress toAddress, ControlAddress fromAddress, long timeCode) Create a Call with Type INVOKE_QUIET and empty empty arguments.static CallcreateQuiet(ControlAddress toAddress, ControlAddress fromAddress, long timeCode, List<Value> args) Create a Call with Type INVOKE_QUIET.static CallcreateQuiet(ControlAddress toAddress, ControlAddress fromAddress, long timeCode, Value arg) Create a Call with Type INVOKE_QUIET.Create an error return Call for this call, with the given arguments.Create an error return Call for this call, with the given error argument.from()Get the ControlAddress that this Call is being sent from, and if of type INVOKE or INVOKE_QUIET, where RETURN and ERROR calls should be sent.booleanisError()Query whether this Call is an error message.booleanisReply()Query whether this Call is a reply message.booleanQuery whether this Call requires a reply.booleanQuery whether this Call is a request message.intmatchID()ID to match up calls and responses.reply()Create a return Call for this call having no arguments.Create a return Call for this call with the given arguments.Create a return Call for this call with the given argument.to()Get the ControlAddress that this Call should be sent to.toString()String representation of this Call.
-
Method Details
-
isRequest
public boolean isRequest()Query whether this Call is a request message.- Returns:
- Call is a request
-
isReply
public boolean isReply()Query whether this Call is a reply message. UsematchID()to link up with a request Call.- Returns:
- Call is a reply
-
isError
public boolean isError()Query whether this Call is an error message. UsematchID()to link up with a request Call.- Returns:
- Call is an error
-
isReplyRequired
public boolean isReplyRequired()Query whether this Call requires a reply. This implies the Call is also a request, although not all request require replies.Error messages should usually be sent even if a reply is not required.
- Returns:
- Call requires a reply
-
args
Get the argument list of this Call. The returned list is unmodifiable.- Returns:
- list of arguments
-
to
Get the ControlAddress that this Call should be sent to.- Returns:
- ControlAddress
-
from
Get the ControlAddress that this Call is being sent from, and if of type INVOKE or INVOKE_QUIET, where RETURN and ERROR calls should be sent.- Returns:
-
matchID
public int matchID()ID to match up calls and responses. For INVOKE and INVOKE_QUIET calls, this will return the same as getID(). For RETURN and ERROR calls, this ID will match the ID of the invoking call.- Returns:
- long ID
-
reply
Create a return Call for this call having no arguments.- Returns:
- return call
-
reply
Create a return Call for this call with the given argument.- Parameters:
arg- single argument- Returns:
- return call
-
reply
Create a return Call for this call with the given arguments.- Parameters:
args- arguments- Returns:
- return call
-
error
Create an error return Call for this call, with the given error argument.- Parameters:
error-- Returns:
- error return call
-
error
Create an error return Call for this call, with the given arguments.- Parameters:
args- error arguments- Returns:
- error return call
-
toString
String representation of this Call. Only to be used for debugging purposes. It is not guaranteed to retain the same format. -
create
Create a Call with Type INVOKE and empty arguments.- Parameters:
toAddress- ControlAddress of receiving Control.fromAddress- ControlAddress for response.timeCode- long nanosecond time relative to hub clock- Returns:
- Call
-
create
public static Call create(ControlAddress toAddress, ControlAddress fromAddress, long timeCode, Value arg) Create a Call with Type INVOKE.- Parameters:
toAddress- ControlAddress of receiving Control.fromAddress- ControlAddress for response.timeCode- long nanosecond time relative to hub clockarg- single Value which will be automatically wrapped in a CallArguments object.- Returns:
- Call
-
create
public static Call create(ControlAddress toAddress, ControlAddress fromAddress, long timeCode, List<Value> args) Create a Call with Type INVOKE.- Parameters:
toAddress- ControlAddress of receiving Control.fromAddress- ControlAddress for response.timeCode- long nanosecond time relative to hub clockargs- List of arguments- Returns:
- Call
-
createQuiet
Create a Call with Type INVOKE_QUIET and empty empty arguments. This indicates that the sender does not require a response (though it might still get one), except in case of error.- Parameters:
toAddress- ControlAddress of receiving Control.fromAddress- ControlAddress for response.timeCode- long nanosecond time relative to hub clock- Returns:
- Call
-
createQuiet
public static Call createQuiet(ControlAddress toAddress, ControlAddress fromAddress, long timeCode, Value arg) Create a Call with Type INVOKE_QUIET. This indicates that the sender does not require a response (though it might still get one), except in case of error.- Parameters:
toAddress- ControlAddress of receiving Control.fromAddress- ControlAddress for response.timeCode- long nanosecond time relative to hub clockarg- single Value which will be automatically wrapped in a CallArguments object.- Returns:
- Call
-
createQuiet
public static Call createQuiet(ControlAddress toAddress, ControlAddress fromAddress, long timeCode, List<Value> args) Create a Call with Type INVOKE_QUIET. This indicates that the sender does not require a response (though it might still get one), except in case of error.- Parameters:
toAddress- ControlAddress of receiving Control.fromAddress- ControlAddress for response.timeCode- long nanosecond time relative to hub clockargs- CallArguments- Returns:
- Call
-