Skip navigation links


com.essbase.eas.framework.defs.command
Class CommandResultEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.essbase.eas.framework.defs.command.CommandResultEvent

All Implemented Interfaces:
java.io.Serializable

public class CommandResultEvent
extends java.util.EventObject

Encapsulates information about the results of a command request, and used to notify command result listeners of the results.

Since:
7.0.0
Version:
7.1.0
Author:
Hank Cox
See Also:
Serialized Form

Field Summary

 

Fields inherited from class java.util.EventObject
source

 

Constructor Summary
  CommandResultEvent(CommandRequest request, CommandResult results, int attempts)
          Constructs a CommandResultEvent object with the specified command request, command results, and the number of times this command has been attempted.
protected CommandResultEvent(java.lang.Object source)
           

 

Method Summary
 void clear()
          a method used to clear this object's internal field references.
 int getAttempts()
          Gets the number of times the framework has attempted to send the command.
 CommandRequest getRequest()
          Gets the original request associated with the result event.
 CommandResult getResults()
          Gets the results returned from the EAS server for the request.
 boolean getRetry()
          Gets the flag indicating whether the framework should retry the original command request.
 void setRetry(boolean value)
          Sets the retry flag for the command that generated this result event.

 

Methods inherited from class java.util.EventObject
getSource, toString

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Constructor Detail

CommandResultEvent

protected CommandResultEvent(java.lang.Object source)

CommandResultEvent

public CommandResultEvent(CommandRequest request,
                          CommandResult results,
                          int attempts)
Constructs a CommandResultEvent object with the specified command request, command results, and the number of times this command has been attempted.
Parameters:
request - the command request that caused listeners for the specific type of results to be notified.
results - the results returned from the EAS server.
attempts - the number of times the command has been attempted.

Method Detail

getAttempts

public int getAttempts()
Gets the number of times the framework has attempted to send the command. A result listener can use this value to decide whether to keep attempting the command or to give up.
Returns:
the number of times, include this one, that the command has been attempted.

getRequest

public CommandRequest getRequest()
Gets the original request associated with the result event. A listener can make modifications to the request and instruct the framework to resend the command.
Returns:
A CommandRequest object.

getResults

public CommandResult getResults()
Gets the results returned from the EAS server for the request. The listener can check results for known error conditions, incorrect values (or correct values), etc. before deciding how to proceed with handling the result event.
Returns:
the CommandResult object containing the results returned from the EAS mid-tier.

getRetry

public boolean getRetry()
Gets the flag indicating whether the framework should retry the original command request. A listener would set this to true if it is desirable to attempt the command on the EAS server again.
Returns:
true if the command should be retrievd; false otherwise.

setRetry

public void setRetry(boolean value)
Sets the retry flag for the command that generated this result event. As an example, a command result might indicate that the user's connection to a database server has become invalid. The listener for this event might then prompt the user to re-enter the connection information. After the connection is restarted, the framework could resend the command that generated this event.
Parameters:
value - true if the command should be retrieve; else, set the value to false.

clear

public void clear()
a method used to clear this object's internal field references. Warning: this method is normally invoked from the framework classes only.

Skip navigation links


Copyright © 2001, 2012, Oracle. All rights reserved.