prometheus
Class EntriesBean

java.lang.Object
  |
  +--prometheus.EntriesBean

public class EntriesBean
extends java.lang.Object

Active Naming: model for entry point management

Changes:

alexis.grandemange@pagebox.net

Copyright (c) 2003-2004 Alexis Grandemange

This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public License
 as published by the Free Software Foundation; version 2.1 of the
 License.
 This library is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 GNU Lesser General Public License for more details.
 A copy of the GNU Lesser General Public License lesser.txt should be
 included in the distribution.

Version:
0, 0, 3
Author:
Alexis Grandemange

Field Summary
private  java.util.HashMap entries
          Entries map. key: name Value: Entry object
(package private)  boolean initialized
          true when init has been called
(package private)  PageBoxAPI inst
          PageBox API instance
(package private)  PageBoxLib.LogIF log
          Logging object
 
Constructor Summary
EntriesBean()
           
 
Method Summary
(package private)  void addEntry(java.lang.String name, java.lang.String must, java.lang.String niceif, java.lang.String url)
          Adds a new entry point.
(package private)  void end()
          Called by EntriesCtrl in case of application unload.
 java.lang.String getEntries()
          Method called by entries.jsp to return formatted messages.
 java.lang.String getNames()
          Method called by routing.jsp to return select options.
 java.lang.String getResourceUsage()
          Returns the CPU, memory and network resources on this PageBox.
(package private)  void init(java.lang.String workDir)
          Initializer.
(package private)  java.lang.String redirect(java.io.PrintWriter pw, java.lang.String name, java.lang.String must, java.lang.String niceif)
          Method to redirect to the service instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

entries

private java.util.HashMap entries
Entries map.


inst

PageBoxAPI inst
PageBox API instance


log

PageBoxLib.LogIF log
Logging object


initialized

boolean initialized
true when init has been called

Constructor Detail

EntriesBean

public EntriesBean()
Method Detail

init

void init(java.lang.String workDir)
Initializer.

Parameters:
workDir - Prometheus directory

addEntry

void addEntry(java.lang.String name,
              java.lang.String must,
              java.lang.String niceif,
              java.lang.String url)
Adds a new entry point. Called by EntriesCtrl.

Parameters:
name - logical name of the entry point
must - must data
niceif - niceif data
url - URL of the service instance

end

void end()
Called by EntriesCtrl in case of application unload. Stops Active Naming.


getEntries

public java.lang.String getEntries()
Method called by entries.jsp to return formatted messages. Returns local entries.

Returns:
HTML string

getNames

public java.lang.String getNames()
Method called by routing.jsp to return select options. Returns all entries.

Returns:
HTML string

redirect

java.lang.String redirect(java.io.PrintWriter pw,
                          java.lang.String name,
                          java.lang.String must,
                          java.lang.String niceif)
Method to redirect to the service instance. Called by RoutingCtrl.

Parameters:
pw - servlet print writer
name - logical name of the entry point
must - must data
niceif - niceif data
Returns:
redirect page stream

getResourceUsage

public java.lang.String getResourceUsage()
Returns the CPU, memory and network resources on this PageBox. Called by routing.jsp.

Returns:
resource usage formated in html on this PageBox