1  /*
     2   * Copyright the original author or authors.
     3   * 
     4   * Licensed under the MOZILLA PUBLIC LICENSE, Version 1.1 (the "License");
     5   * you may not use this file except in compliance with the License.
     6   * You may obtain a copy of the License at
     7   * 
     8   *      http://www.mozilla.org/MPL/MPL-1.1.html
     9   * 
    10   * Unless required by applicable law or agreed to in writing, software
    11   * distributed under the License is distributed on an "AS IS" BASIS,
    12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13   * See the License for the specific language governing permissions and
    14   * limitations under the License.
    15   */
    16  
    17  import org.as2lib.core.BasicClass;
    18  
    19  /**
    20   * {@code MethodInvocationReturnInfo} informs clients that the method invocation
    21   * returned successfully.
    22   * 
    23   * <p>This class is used in conjunction with the {@link MethodInvocationCallback}
    24   * and {@link MethodInvocationReturnListener} classes.
    25   *
    26   * @author Simon Wacker
    27   */
    28  class org.as2lib.io.conn.core.event.MethodInvocationReturnInfo extends BasicClass {
    29  	
    30  	/** The return value returned by the invoked method. */
    31  	private var returnValue;
    32  	
    33  	/** Url of the service the method was invoked on. */
    34  	private var serviceUrl:String;
    35  	
    36  	/** The name of the method that was invoked. */
    37  	private var methodName:String;
    38  	
    39  	/** The arguments used for the invocation. */
    40  	private var methodArguments:Array;
    41  	
    42  	/**
    43  	 * Constructs a new {@code MethodInvocationReturnInfo} instance.
    44  	 * 
    45  	 * @param serviceUrl the url to the service the method was invoked on
    46  	 * @param methodName the name of the method that was invoked
    47  	 * @param methodArguments the arguments used as parameters for the method invocation
    48  	 * @param returnValue the result of the method invocation
    49  	 */
    50  	public function MethodInvocationReturnInfo(serviceUrl:String, methodName:String, methodArguments:Array, returnValue) {
    51  		this.serviceUrl = serviceUrl;
    52  		this.methodName = methodName;
    53  		this.methodArguments = methodArguments;
    54  		this.returnValue = returnValue;
    55  	}
    56  	
    57  	/**
    58  	 * Returns the url to the service the method was invoked on.
    59  	 *
    60  	 * @return the url to the service the method was invoked on
    61  	 */
    62  	public function getServiceUrl(Void):String {
    63  		return serviceUrl;
    64  	}
    65  	
    66  	/**
    67  	 * Returns the name of the method that was invoked on the service
    68  	 *
    69  	 * @return the name of the method that was invoked on the service
    70  	 */
    71  	public function getMethodName(Void):String {
    72  		return methodName;
    73  	}
    74  	
    75  	/**
    76  	 * Returns the arguments used as parameters for the method invocation.
    77  	 *
    78  	 * @return the arguments used as parameters for the method invocation
    79  	 */
    80  	public function getMethodArguments(Void):Array {
    81  		return methodArguments;
    82  	}
    83  	
    84  	/*
    85  	 * Returns the return value of the method invocation.
    86  	 *
    87  	 * @return the return value of the method invocation
    88  	 */
    89  	public function getReturnValue(Void) {
    90  		return returnValue;
    91  	}
    92  	
    93  }