Skip navigation links


com.essbase.eas.framework.defs.command
Interface CommandResultListener

All Superinterfaces:
java.util.EventListener
All Known Implementing Classes:
CommandResultAdapter, ConnectionStatusListener, EditorFrame, SessionStatusListener

public interface CommandResultListener
extends java.util.EventListener

Defines the interface for an object that wishes to listen for results of commands. The intention is that interested objects could listen for results of any type. As an example, presume that every command routed to a specific command listener on the EAS server required a key and the key has an expiration time. One way to handle this (in the client code) is to require every piece of code that attempts to send a command to that command listener check the results and properly handle an expiration status. A better way is to create a class that implements the CommandResultListener interface, create an instance of that class, and register it with the command manager. If any command returns a CommandStatus object that matches the types of command status objects that the listener is interested in, the command manager will call the statusReturned method in the listener. The listener can then take appropriate action and, upon returning from the statusReturned method, either resend the command or return the failure results to the calling code.

This is the scenario that the CommandResultListener interface is designed to facilitate.

Since:
7.0.0
Version:
7.1.0
Author:
Hank Cox

Method Summary
 java.lang.Class[] getCommandStatusClasses()
          Retrieves the types of command status objects this listener is interested in.
 void statusReturned(CommandResultEvent e)
          Invoked when a CommandStatus object of the type indicated by this listener is returned as the result of a command.

 

Method Detail

statusReturned

void statusReturned(CommandResultEvent e)
Invoked when a CommandStatus object of the type indicated by this listener is returned as the result of a command.
Parameters:
e - a CommandResultEvent describing the circumstances that caused the method to be invoked.

getCommandStatusClasses

java.lang.Class[] getCommandStatusClasses()
Retrieves the types of command status objects this listener is interested in.
Returns:
an array of class objects that this listener is interested in. Each element must be derived from the CommandStatus class.

Skip navigation links


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