/** * Returns the command id of the corresponing response. */ public int getResponseCommandId() { Response response = createResponse(); return response.getCommandId(); }
/** * This method is used to create generate a response corresponding to * this request. It creates the response using <code>createResponse</code> * and then sets the sequence number of the response to the sequence * number of this request. This way is ensured automatic matching * of the response to the request. * The created response is set this as the original request. * @see #createResponse() * @see Response#setOriginalRequest(Request) */ public Response getResponse() { Response response = createResponse(); response.setSequenceNumber(getSequenceNumber()); response.setOriginalRequest(this); return response; }