java.lang.Object
ca.weblite.objc.Message
A structure the encapsulates a message. This is an optional alternative
way of sending messages to the Objective-C runtime.
-
Field Summary
FieldsModifier and TypeFieldDescriptionList of arguments to pass to the method invocation.booleanWhether to coerce the input of the message.booleanWhether to coerce the output of the message.If there was en error in the message handling, the error will be saved here.booleanWhether the input was, in fact coerced.Reference to the next message in the message chain.booleanWhether the output was, in fact, coerced.Reference to the previous message in the message chain.com.sun.jna.PointerThe target of the message.Placeholder for the result of the message.com.sun.jna.PointerThe selector of the message.intThe current status of the message.static final intStatus identifier of a message to indicate that is has been cancelled.static final intStatus identifier of a message to indicated that it has been completed.static final intStatus identifier of a message to indicate that it is ready to be sent.static final intStatus identifier of a message to indicate that it has been skipped. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidMethod that is called just after the message is send and response received.voidMethod that is called just before the message is sent.
-
Field Details
-
STATUS_SKIPPED
public static final int STATUS_SKIPPEDStatus identifier of a message to indicate that it has been skipped.- See Also:
-
STATUS_CANCELLED
public static final int STATUS_CANCELLEDStatus identifier of a message to indicate that is has been cancelled.- See Also:
-
STATUS_COMPLETED
public static final int STATUS_COMPLETEDStatus identifier of a message to indicated that it has been completed.- See Also:
-
STATUS_READY
public static final int STATUS_READYStatus identifier of a message to indicate that it is ready to be sent.- See Also:
-
receiver
public com.sun.jna.Pointer receiverThe target of the message. -
selector
public com.sun.jna.Pointer selectorThe selector of the message. -
args
List of arguments to pass to the method invocation. -
result
Placeholder for the result of the message. (i.e. return value). -
error
If there was en error in the message handling, the error will be saved here. -
status
public int statusThe current status of the message. Before running, its status should be STATUS_READY, and after running, it should be STATUS_COMPLETED. If, for some reason it has been cancelled or skipped, then it could have those statuses also. -
coerceInput
public boolean coerceInputWhether to coerce the input of the message. -
coerceOutput
public boolean coerceOutputWhether to coerce the output of the message. -
inputWasCoerced
public boolean inputWasCoercedWhether the input was, in fact coerced. Set when the message is run. -
outputWasCoerced
public boolean outputWasCoercedWhether the output was, in fact, coerced. Set when the message is run. -
next
Reference to the next message in the message chain. -
previous
Reference to the previous message in the message chain.
-
-
Constructor Details
-
Message
public Message()
-
-
Method Details
-
beforeRequest
public void beforeRequest()Method that is called just before the message is sent. This can be overridden to change the parameters, skip the message, or cancel the message chain altogether. -
afterResponse
public void afterResponse()Method that is called just after the message is send and response received. This can be overridden to do post processing, like changing the settings of subsequent messages in the chain or doing processing based on the output of the message.
-