public method IO2GResponseListener.onRequestFailed
    
Brief
Processes a notification about a request failure.
| Declaration | ||||
| 
 | ||||
| Parameters | |
| requestId | The identifier of the failed request. A session object may send multiple requests
(see the O2GSession.sendRequest method).
The method receives notifications of all the requests that have failed. To make sure you are getting a notification
about a particular request, you must check if the value of this parameter matches the value obtained by calling the
 | 
| error | The server error message. For the list of errors that may be generated during an order processing, refer to the Order Execution Errors section. | 
Details
In order to process a notification about a request failure, an instance of the class implementing the IO2GResponseListener interface
must be subscribed to a session object.
It is accomplished by calling the O2GSession.subscribeResponse method.
Example
Proccess notification about a request to get open positions [hide]
    // Create a request to get open positions information
    O2GRequestFactory requestFactory = session.getRequestFactory();
    if (requestFactory != null) {
        O2GRequest request = requestFactory.createRefreshTableRequest(O2GTableType.TRADES);
        responseListener.setRequest(request.getRequestId());
        session.sendRequest(request);
        Thread.sleep(1000);
    }
 
    // Set request in the implementation of IO2GResponseListener interface
    public void setRequest(String requestID) {
       mRequestID = requestID;
    }
 
    // Implementation of IO2GResponseListener interface public method onRequestFailed
    public void onRequestFailed(String requestID, String error) {
        if (requestID.equals(mRequestID)) {
            System.out.println("Request failed. requestID= " + requestID + "; error= " + error);
        }
    }
Declared in IO2GResponseListener