edu.vub.at.actors.natives
Class NATAsyncMessage
java.lang.Object
edu.vub.at.objects.natives.NATNil
edu.vub.at.objects.natives.NATByRef
edu.vub.at.objects.natives.NATCallframe
edu.vub.at.objects.natives.NATObject
edu.vub.at.objects.natives.NATMessage
edu.vub.at.actors.natives.NATAsyncMessage
- All Implemented Interfaces:
- ATAbstractGrammar, ATAsyncMessage, ATConversions, ATExpression, ATMessage, ATNil, ATObject, ATStatement, java.io.Serializable
- public class NATAsyncMessage
- extends NATMessage
- implements ATAsyncMessage
Instances of the class NATAsyncMessage represent first-class asynchronous messages.
- Author:
- tvcutsem
- See Also:
- Serialized Form
Fields inherited from class edu.vub.at.objects.natives.NATMessage |
|
Methods inherited from class edu.vub.at.objects.natives.NATObject |
asAmbientTalkObject, base_asActorMirror, base_asBegin, base_asBoolean, base_asClosure, base_asDefinition, base_asExpression, base_asField, base_asHandler, base_asMessageCreation, base_asMethod, base_asMirror, base_asNumber, base_asSplice, base_asStatement, base_asStripe, base_asSymbol, base_asTable, base_asUnquoteSplice, base_isBoolean, base_isCallFrame, base_isClosure, base_isMethod, base_isMirror, base_isSplice, base_isStripe, base_isSymbol, base_isTable, base_isUnquoteSplice, createChild, createClone, createIsolate, isAmbientTalkObject, isPrimitive, listTransitiveFields, listTransitiveMethods, meta_addMethod, meta_assignField, meta_clone, meta_defineField, meta_extend, meta_getStripes, meta_grabMethod, meta_invoke, meta_isCloneOf, meta_isRelatedTo, meta_isStripedWith, meta_listMethods, meta_lookup, meta_newInstance, meta_pass, meta_resolve, meta_respondsTo, meta_select, meta_share |
Methods inherited from class edu.vub.at.objects.natives.NATCallframe |
getLocalCustomField, getLocalField, hasLocalCustomField, hasLocalField, hasLocalNativeField, meta_addField, meta_assignVariable, meta_doesNotUnderstand, meta_getDynamicParent, meta_getLexicalParent, meta_grabField, meta_listFields, setLocalField |
Methods inherited from class edu.vub.at.objects.natives.NATNil |
asJavaClassUnderSymbiosis, asJavaObjectUnderSymbiosis, asNativeBoolean, asNativeException, asNativeFarReference, asNativeFraction, asNativeNumber, asNativeNumeric, asNativeTable, asNativeText, base__opeql__opeql_, base_asFarReference, base_asVariableAssignment, base_init, base_isFarReference, base_isMessageCreation, base_isVariableAssignment, base_new, equals, isJavaObjectUnderSymbiosis, isNativeBoolean, isNativeField, isNativeText, meta_eval, meta_quote, meta_receive, meta_send, readResolve, toString, writeReplace |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface edu.vub.at.objects.ATObject |
base__opeql__opeql_, base_init, base_new, meta_addField, meta_addMethod, meta_assignField, meta_assignVariable, meta_clone, meta_defineField, meta_doesNotUnderstand, meta_eval, meta_extend, meta_getDynamicParent, meta_getLexicalParent, meta_getStripes, meta_grabField, meta_grabMethod, meta_invoke, meta_isCloneOf, meta_isRelatedTo, meta_isStripedWith, meta_listFields, meta_listMethods, meta_lookup, meta_newInstance, meta_pass, meta_quote, meta_receive, meta_resolve, meta_respondsTo, meta_select, meta_send, meta_share |
Methods inherited from interface edu.vub.at.objects.coercion.ATConversions |
asAmbientTalkObject, asJavaClassUnderSymbiosis, asJavaObjectUnderSymbiosis, asNativeBoolean, asNativeException, asNativeFarReference, asNativeFraction, asNativeNumber, asNativeNumeric, asNativeTable, asNativeText, base_asActorMirror, base_asBegin, base_asBoolean, base_asClosure, base_asDefinition, base_asExpression, base_asFarReference, base_asField, base_asHandler, base_asMessage, base_asMessageCreation, base_asMethod, base_asMirror, base_asNumber, base_asSplice, base_asStatement, base_asStripe, base_asSymbol, base_asTable, base_asUnquoteSplice, base_asVariableAssignment, base_isBoolean, base_isCallFrame, base_isClosure, base_isFarReference, base_isMessageCreation, base_isMethod, base_isMirror, base_isSplice, base_isStripe, base_isSymbol, base_isTable, base_isUnquoteSplice, base_isVariableAssignment, isAmbientTalkObject, isJavaObjectUnderSymbiosis, isNativeBoolean, isNativeField, isNativeText |
_RECEIVER_
private static final AGSymbol _RECEIVER_
_SENDER_
private static final AGSymbol _SENDER_
NATAsyncMessage
public NATAsyncMessage(ATObject sender,
ATSymbol sel,
ATTable arg)
throws InterpreterException
- Parameters:
sel
- the selector of the asynchronous messagearg
- the arguments of the asynchronous message
NATAsyncMessage
public NATAsyncMessage(ATObject sdr,
ATObject rcv,
ATSymbol sel,
ATTable arg)
throws InterpreterException
base_getSender
public ATObject base_getSender()
throws InterpreterException
- Description copied from interface:
ATAsyncMessage
- Signifies the object on behalf of which this asynchronous message
is sent. For a 'normal' message send, it is bound to the active
'self' object that executed obj<-m().
- Specified by:
base_getSender
in interface ATAsyncMessage
- Throws:
InterpreterException
base_getReceiver
public ATObject base_getReceiver()
throws InterpreterException
- Description copied from interface:
ATAsyncMessage
- Messages also have an explicitly named receiver, which may either be a local
object, or a representative of an object inside another actor.
- Specified by:
base_getReceiver
in interface ATAsyncMessage
- Returns:
- the receiver of the message
- Throws:
InterpreterException
base_process
public ATObject base_process(ATActorMirror inActor)
throws InterpreterException
- Description copied from interface:
ATAsyncMessage
- This method is responsible for processing the message in a certain actor.
By default, process dispatches to the actor by means of receive. In pseudo-code:
def process(act) {
(reflect: act).receive(self)
}
- Specified by:
base_process
in interface ATAsyncMessage
- Throws:
InterpreterException
base_sendTo
public ATObject base_sendTo(ATObject receiver,
ATObject sender)
throws InterpreterException
- To evaluate an asynchronous message send, an asynchronous invoke is performed
on the receiver object.
- Specified by:
base_sendTo
in interface ATMessage
- Parameters:
receiver
- the object receiving the message.sender
- the object sending the message.
- Returns:
- NIL, by default. Overridable by the receiver.
- Throws:
InterpreterException
- if the method is not found or an error occurs while processing the method.
meta_print
public NATText meta_print()
throws InterpreterException
- Description copied from interface:
ATObject
- Prints out the object in a human-readable way.
- Specified by:
meta_print
in interface ATObject
- Overrides:
meta_print
in class NATObject
- Throws:
InterpreterException
base_asAsyncMessage
public ATAsyncMessage base_asAsyncMessage()
throws XTypeMismatch
- Specified by:
base_asAsyncMessage
in interface ATConversions
- Overrides:
base_asAsyncMessage
in class NATObject
- Throws:
XTypeMismatch