AsyncRequest

Overview

**AsyncRequest **objects present an ongoing or completed asynchronous request that is executing after one of the beginMethod messages is set to an AsyncProxy. AsyncRequest can be used to check the status of the request, assign a callback, started and stopped. It also needs to be referenced when sending the endMethod message to receive any result or outgoing parameters, after the request has completed.
The beginMethod takes boolean start parameter which will start async call immediately in true case. If false was given then AsyncRequest can be started manualy.

 

var lAsyncProxy: MegaDemoService_AsyncProxy := new MegaDemoService_AsyncProxy(new URI("http://localhost:8099/bin"));
lAsyncProxy.beginSum(12, 13, true, new interface AsyncRequest.IAsyncRequestCallback(
    completed := method(aRequest: AsyncRequest) begin  
      System.out.println(lAsyncProxy.endSum(aRequest));
    end,
    failed := method(aRequest: AsyncRequest; anException: Exception) begin
      System.out.println(anException.Message);
    end
  ));

 

final MegaDemoService_AsyncProxy lAsyncProxy= new MegaDemoService_AsyncProxy(new URI("http://localhost:8099/bin"));
lAsyncProxy.beginSum(12, 13, true, new AsyncRequest.IAsyncRequestCallback() {
    @Override
    public void completed(AsyncRequest aRequest) {
      System.out.println(lAsyncProxy.endSum(aRequest));
    }
    @Override
    public void failed(AsyncRequest aRequest, Exception aException) {
      System.out.println(aException.getMessage());  
    }
});

Location


 

constructor

Creates empty AsyncRequest.

 

constructor

 

AsyncRequest()

constructor (Runnable)

 

constructor(arg1: Runnable)

 

AsyncRequest(Runnable arg1)

Parameters:

  • arg1:

constructor (Runnable, String)

 

constructor(arg1: Runnable; arg2: String)

 

AsyncRequest(Runnable arg1, String arg2)

Parameters:

  • arg1:
  • arg2:

constructor (String)

 

constructor(arg1: String)

 

AsyncRequest(String arg1)

Parameters:

  • arg1:

constructor (ThreadGroup, Runnable)

 

constructor(arg1: ThreadGroup; arg2: Runnable)

 

AsyncRequest(ThreadGroup arg1, Runnable arg2)

Parameters:

  • arg1:
  • arg2:

constructor (ThreadGroup, Runnable, String)

 

constructor(arg1: ThreadGroup; arg2: Runnable; arg3: String)

 

AsyncRequest(ThreadGroup arg1, Runnable arg2, String arg3)

Parameters:

  • arg1:
  • arg2:
  • arg3:

constructor (ThreadGroup, Runnable, String, Int64)

 

constructor(arg1: ThreadGroup; arg2: Runnable; arg3: String; arg4: Int64)

 

AsyncRequest(ThreadGroup arg1, Runnable arg2, String arg3, Int64 arg4)

Parameters:

  • arg1:
  • arg2:
  • arg3:
  • arg4:

constructor (ThreadGroup, String)

 

constructor(arg1: ThreadGroup; arg2: String)

 

AsyncRequest(ThreadGroup arg1, String arg2)

Parameters:

  • arg1:
  • arg2:

getInterfaceName

Returns interface name of response message.

 

method getInterfaceName: String

 

String getInterfaceName()

getMessageName

Returns message name of response message.

 

method getMessageName: String

 

String getMessageName()

ProcessMessage

 

property ProcessMessage: Message read write;

 

Message ProcessMessage { __get; __set; }

RequestChannel

 

property RequestChannel: ClientChannel read write;

 

ClientChannel RequestChannel { __get; __set; }

run

Starts a request.

 

method run

 

void run()

setCallback

 

method setCallback(callback: IAsyncRequestCallback)

 

void setCallback(IAsyncRequestCallback callback)

Parameters:

  • callback:

triggerOnCompleted  protected

 

method triggerOnCompleted(request: AsyncRequest)

 

void triggerOnCompleted(AsyncRequest request)

Parameters:

  • request:

triggerOnFailed  protected

 

method triggerOnFailed(request: AsyncRequest; exception: Exception)

 

void triggerOnFailed(AsyncRequest request, Exception exception)

Parameters:

  • request:
  • exception:

 

ProcessMessage

 

property ProcessMessage: Message read write;

 

Message ProcessMessage { __get; __set; }

RequestChannel

 

property RequestChannel: ClientChannel read write;

 

ClientChannel RequestChannel { __get; __set; }

 

constructor

Creates empty AsyncRequest.

 

constructor

 

AsyncRequest()

constructor (Runnable)

 

constructor(arg1: Runnable)

 

AsyncRequest(Runnable arg1)

Parameters:

  • arg1:

constructor (Runnable, String)

 

constructor(arg1: Runnable; arg2: String)

 

AsyncRequest(Runnable arg1, String arg2)

Parameters:

  • arg1:
  • arg2:

constructor (String)

 

constructor(arg1: String)

 

AsyncRequest(String arg1)

Parameters:

  • arg1:

constructor (ThreadGroup, Runnable)

 

constructor(arg1: ThreadGroup; arg2: Runnable)

 

AsyncRequest(ThreadGroup arg1, Runnable arg2)

Parameters:

  • arg1:
  • arg2:

constructor (ThreadGroup, Runnable, String)

 

constructor(arg1: ThreadGroup; arg2: Runnable; arg3: String)

 

AsyncRequest(ThreadGroup arg1, Runnable arg2, String arg3)

Parameters:

  • arg1:
  • arg2:
  • arg3:

constructor (ThreadGroup, Runnable, String, Int64)

 

constructor(arg1: ThreadGroup; arg2: Runnable; arg3: String; arg4: Int64)

 

AsyncRequest(ThreadGroup arg1, Runnable arg2, String arg3, Int64 arg4)

Parameters:

  • arg1:
  • arg2:
  • arg3:
  • arg4:

constructor (ThreadGroup, String)

 

constructor(arg1: ThreadGroup; arg2: String)

 

AsyncRequest(ThreadGroup arg1, String arg2)

Parameters:

  • arg1:
  • arg2:

getInterfaceName

Returns interface name of response message.

 

method getInterfaceName: String

 

String getInterfaceName()

getMessageName

Returns message name of response message.

 

method getMessageName: String

 

String getMessageName()

run

Starts a request.

 

method run

 

void run()

setCallback

 

method setCallback(callback: IAsyncRequestCallback)

 

void setCallback(IAsyncRequestCallback callback)

Parameters:

  • callback:

triggerOnCompleted  protected

 

method triggerOnCompleted(request: AsyncRequest)

 

void triggerOnCompleted(AsyncRequest request)

Parameters:

  • request:

triggerOnFailed  protected

 

method triggerOnFailed(request: AsyncRequest; exception: Exception)

 

void triggerOnFailed(AsyncRequest request, Exception exception)

Parameters:

  • request:
  • exception: