Class CloseBrowserWindowCommand

java.lang.Object
com.oorian.messaging.commands.Command
com.oorian.messaging.commands.CloseBrowserWindowCommand

public class CloseBrowserWindowCommand extends Command
Command to close a browser window by name.

This command instructs the client to close a browser window that was previously opened using NewBrowserWindowCommand. Windows are identified by their assigned names.

Features:

  • Closes browser windows by name
  • Works with windows opened by NewBrowserWindowCommand
  • Enables programmatic window management
  • Supports multi-window applications

Usage:


 // Close a window named "popupWindow"
 CloseBrowserWindowCommand close = new CloseBrowserWindowCommand("popupWindow");
 JsonObject json = close.toJson();
 
Since:
2007
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • Constructor Details

    • CloseBrowserWindowCommand

      public CloseBrowserWindowCommand(String name)
      Constructs a new CloseBrowserWindowCommand to close the window with the specified name.
      Parameters:
      name - the name of the browser window to close
  • Method Details

    • toJson

      public JsonObject toJson()
      Generates the JSON representation of this close window command.

      The JSON includes the command ID and window name.

      Specified by:
      toJson in class Command
      Returns:
      a JsonObject containing the close window command attributes