Interface Console


public interface Console
Defines the interface exposed by the Console that is available for Views
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Adds a listener for console events
    Gets a global property.
    Gets the JMX MBeanServerConnection for the current connection
    Gets the value of a previously registered object
    Gets the current status message displayed by the console
    boolean
    isDirty(View view)
    Returns whether the given view is set as dirty (i.e.; has changed data that needs saving back to persistent XML)
    void
    postMessage(String toViewClassName, String messageId, Map messageData)
    Posts a message to the given view, used for inter-view communication
    void
    registerObject(String objectName, Object object)
    Registers an object with the console by name, can be used by views to store state at the console level and share information between views
    void
    Reload the console - this should re-read the configuration.
    void
    setDirty(View view, boolean dirty)
    Sets a flag to indicate that the given view is dirty (i.e.; has changed data the needs saving back to pesistent XML).
    void
    Sets a global property.
    void
    Sets the consoles current status message string
    boolean
    showView(String toViewClassName)
    Shows the given view, the view must be defined in the console xml configuration file
  • Method Details

    • getJMXConnection

      MBeanServerConnection getJMXConnection()
      Gets the JMX MBeanServerConnection for the current connection
      Returns:
      the current MBeanServerConnection
    • getStatusMessage

      String getStatusMessage()
      Gets the current status message displayed by the console
      Returns:
      the status message string
    • setStatusMessage

      void setStatusMessage(String message)
      Sets the consoles current status message string
      Parameters:
      message - the status message string to set
    • isDirty

      boolean isDirty(View view)
      Returns whether the given view is set as dirty (i.e.; has changed data that needs saving back to persistent XML)
      Parameters:
      view - the view to check
      Returns:
      true if view has dirty flag set
    • setDirty

      void setDirty(View view, boolean dirty)
      Sets a flag to indicate that the given view is dirty (i.e.; has changed data the needs saving back to pesistent XML).
      Parameters:
      view - the view that is dirty
      dirty - true to set the flag, false to clear
    • addConsoleListener

      void addConsoleListener(ConsoleListener listener)
      Adds a listener for console events
      Parameters:
      listener - the ConsoleListener
    • getRegisteredObject

      Object getRegisteredObject(String objectName)
      Gets the value of a previously registered object
      Parameters:
      objectName - the name of the object to lookup
      Returns:
      the returned object of null if not found
    • registerObject

      void registerObject(String objectName, Object object)
      Registers an object with the console by name, can be used by views to store state at the console level and share information between views
      Parameters:
      objectName - the name of the object to store
      object - the object to store
    • postMessage

      void postMessage(String toViewClassName, String messageId, Map messageData)
      Posts a message to the given view, used for inter-view communication
      Parameters:
      toViewClassName - the class name of the view to receive the message
      messageId - a String identifying the message
      messageData - a Map of name, value pairs representing messages data
    • showView

      boolean showView(String toViewClassName)
      Shows the given view, the view must be defined in the console xml configuration file
      Parameters:
      toViewClassName - The view to show.
      Returns:
      true if view shown
    • reloadConsole

      void reloadConsole()
      Reload the console - this should re-read the configuration.
    • setGlobalProperty

      void setGlobalProperty(String name, Object value)
      Sets a global property. A global property is a way for the various parts of the CMC to share data. They can be set or accessed by the CMC, by any child console or any tabbed View within any of those child consoles.
      Parameters:
      name - identifies the global property being set
      value - the value to associate with the name parameter
    • getGlobalProperty

      Object getGlobalProperty(String name)
      Gets a global property. A global property is a way for the various parts of the CMC to share data. They can be set or accessed by the CMC, by any child console or any tabbed View within any of those child consoles.
      Parameters:
      name - identifies which global property to get.
      Returns:
      the value from the global properties that is associated with the parameter name or null if there is no property associated with the name.