ca.weblite.objc
Class Message

java.lang.Object
  extended by ca.weblite.objc.Message

public class Message
extends Object

A structure the encapsulates a message. This is an optional alternative way of sending messages to the Objective-C runtime.

Author:
shannah
See Also:
Client.send(Message...), RuntimeUtils.msg(Message...), Proxy.send(Message...)

Field Summary
 List args
          List of arguments to pass to the method invocation.
 boolean coerceInput
           
 boolean coerceOutput
           
 Exception error
          If there was en error in the message handling, the error will be saved here.
 boolean inputWasCoerced
           
 Message next
           
 boolean outputWasCoerced
           
 Message previous
           
 com.sun.jna.Pointer receiver
          The target of the message.
 Object result
          Placeholder for the result of the message.
 com.sun.jna.Pointer selector
          The selector of the message.
 int status
          The current status of the message.
static int STATUS_CANCELLED
          Status identifier of a message to indicate that is has been cancelled.
static int STATUS_COMPLETED
          Status identifier of a message to indicated that it has been completed.
static int STATUS_READY
          Status identifier of a message to indicate that it is ready to be sent.
static int STATUS_SKIPPED
          Status identifier of a message to indicate that it has been skipped.
 
Constructor Summary
Message()
           
 
Method Summary
 void afterResponse()
          Method that is called just after the message is send and response received.
 void beforeRequest()
          Method that is called just before the message is sent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATUS_SKIPPED

public static final int STATUS_SKIPPED
Status identifier of a message to indicate that it has been skipped.

See Also:
Constant Field Values

STATUS_CANCELLED

public static final int STATUS_CANCELLED
Status identifier of a message to indicate that is has been cancelled.

See Also:
Constant Field Values

STATUS_COMPLETED

public static final int STATUS_COMPLETED
Status identifier of a message to indicated that it has been completed.

See Also:
Constant Field Values

STATUS_READY

public static final int STATUS_READY
Status identifier of a message to indicate that it is ready to be sent.

See Also:
Constant Field Values

receiver

public com.sun.jna.Pointer receiver
The target of the message.


selector

public com.sun.jna.Pointer selector
The selector of the message.


args

public List args
List of arguments to pass to the method invocation.


result

public Object result
Placeholder for the result of the message. (i.e. return value).


error

public Exception error
If there was en error in the message handling, the error will be saved here.


status

public int status
The 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 coerceInput

coerceOutput

public boolean coerceOutput

inputWasCoerced

public boolean inputWasCoerced

outputWasCoerced

public boolean outputWasCoerced

next

public Message next

previous

public Message previous
Constructor Detail

Message

public Message()
Method Detail

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.



Copyright © 2012–2014 Web Lite Solutions Corp.. All rights reserved.