Interface org.as2lib.io.conn.core.server.ServerServiceProxy

Description

ServerServiceProxy handles client requests to a certain service and its responses.

Method Index

addErrorListener(), getPath(), getService(), invokeMethod(), invokeMethodByNameAndArguments(), invokeMethodByNameAndArgumentsAndResponseService(), isRunning(), removeErrorListener(), run(), stop()

Inherited from BasicInterface

Method Detail

run

public function run(host:String):Void

Runs the service and listens for requests of clients.

Parameters

hostthe host to run this service on

stop

public function stop(Void):Void

Stops this service.

invokeMethod

public function invokeMethod():Void

invokeMethodByNameAndArguments

public function invokeMethodByNameAndArguments(methodName:String, args:Array):Void

Invokes the service method corresponding to the passed-in methodName on the actaul service object, passing the content of args array as parameters.

Parameters

methodNamethe name of the service method to invoke
argsarguments to pass-to the method

invokeMethodByNameAndArgumentsAndResponseService

public function invokeMethodByNameAndArgumentsAndResponseService(methodName:String, args:Array, responseServiceUrl:String):Void

Invokes the service method corresponding to the passed-in methodName on the actual service object and returns the response to the client using the passed-in responseServiceUrl.

Parameters

methodNamename of method to invoke on the service
argsarguments to pass to the method
responseServiceUrlthe url of response service to which the result is sent

getService

public function getService(Void)

Returns the actual service this proxy wraps.

Return

the wrapped service

getPath

public function getPath(Void):String

Returns the path on the host of this service.

Return

the path of this service

isRunning

public function isRunning(Void):Boolean

Indicates whether this service is currently running.

Return

true if this service runs else false

addErrorListener

public function addErrorListener(errorListener:MethodInvocationErrorListener):Void

Adds a new error listener to listen for errors that may occur when trying to invoke a method on this service.

Parameters

errorListenerthe error listener to add

See Also

removeErrorListener

public function removeErrorListener(errorListener:MethodInvocationErrorListener):Void

Removes an added error listener.

Parameters

errorListenerthe error listener to remove

See Also