Interface org.as2lib.io.conn.core.event.MethodInvocationReturnListener

Description

MethodInvocationReturnListener awaits a return value of a method invocation.

This interface can either be instantiated directly or implemented by a class. If you instantiate it directly you must overwrite the event method with an anonymous function.

Note that overwriting the event method with a anonymous function is error-prone, because the arguments' types and the return type are not type-checked. Instantiating an interface directly is also not permitted in Flex. var listener:MethodInvocationReturnListener = new MethodInvocationReturnListener(); listener.onReturn = function(returnInfo:MethodInvocationReturnInfo):Void) { trace("Invoked method successfully: " + returnInfo); }

Implementing the interface by a class is a much neater way. But sometimes it adds unnecessary complexity. class MyListener implements MethodInvocationReturnListener { public function onReturn(returnInfo:MethodInvocationReturnInfo):Void { trace("Invoked method successfully: " + returnInfo); } }

Method Index

onReturn()

Method Detail

onReturn

public function onReturn(returnInfo:MethodInvocationReturnInfo):Void

Is executed when the return value of the method invocation arrives.

This indicates that the method was invoked successfully.

Parameters

returnInfocontains the return value and some other useful information about the invoked method