Class org.as2lib.io.conn.core.event.MethodInvocationErrorInfo

Description

MethodInvocationErrorInfo informs the client of an error that occured on a method invocation.

It defines constants, that can be used to identify what kind of error occured.

This class is used in conjunction with the MethodInvocationCallback and MethodInvocationErrorListener classes.

Field Index

METHOD_EXCEPTION_ERROR, OVERSIZED_ARGUMENTS_ERROR, UNKNOWN_ERROR, UNKNOWN_METHOD_ERROR, UNKNOWN_SERVICE_ERROR

Method Index

new MethodInvocationErrorInfo()
getErrorCode(), getException(), getMethodArguments(), getMethodName(), getServiceUrl()

Inherited from BasicClass

Constructor Detail

MethodInvocationErrorInfo

public function MethodInvocationErrorInfo(serviceUrl:String, methodName:String, methodArguments:Array, errorCode:Number, exception)

Constructs a new MethodInvocationErrorInfo instance.

If errorCode is null or undefined, UNKNOWN_ERROR is used.

Parameters

serviceUrlthe url to the service the method should be or was invoked on
methodNamethe name of the method that should be or was invoked on the service
methodArgumentsthe arguments used as parameters for the method invocation
exceptionthe exception that caused the error

Field Detail

UNKNOWN_ERROR

static public UNKNOWN_ERROR:Number
Indicates an error of unknown origin.

UNKNOWN_SERVICE_ERROR

static public UNKNOWN_SERVICE_ERROR:Number
Indicates an error caused because of a not existing service.

UNKNOWN_METHOD_ERROR

static public UNKNOWN_METHOD_ERROR:Number
Indicates that the method to invoke does not exist.

OVERSIZED_ARGUMENTS_ERROR

static public OVERSIZED_ARGUMENTS_ERROR:Number
Indicates an error caused by arguments that are out of size.

METHOD_EXCEPTION_ERROR

static public METHOD_EXCEPTION_ERROR:Number
Indicates that the service method to invoke threw an exception.

Method Detail

getServiceUrl

public function getServiceUrl(Void):String

Returns the url to the service the method should be or was invoked on.

Return

the url to the service the method should be or was invoked on

getMethodName

public function getMethodName(Void):String

Returns the name of the method that caused this error.

Return

the name of the method that should be or was invoked on the service

getMethodArguments

public function getMethodArguments(Void):Array

Returns the arguments used as parameters for the method invocaton that caused this error.

Return

the arguments used as parameters for the method invocation

getErrorCode

public function getErrorCode(Void):Number

Returns the error code that describes this error.

The error code matches one of the declared error constants.

Return

the error code that describes the type of this error

getException

public function getException(Void)

Returns the exception that caused this error.

Note that this error is not always caused by an exception. This method may does also return null.

Return

the exception that caused this error or null