commands
Class SelectInterfaces

java.lang.Object
  extended bycommands.SelectInterfaces

public class SelectInterfaces
extends java.lang.Object

Command to retrieve a list of monitored interfaces for a device from the GLTMon database. Using the deviceID, query the database for Device's interfaces.

Version:
0.1
Author:
gswalters

Constructor Summary
SelectInterfaces()
          Construct a default SelectInterfaces command with an empty array.
 
Method Summary
 void done()
          Clean up after the command's execution.
 Device getDevice()
           
 java.util.ArrayList getInterfaces()
           
 void initialize(java.sql.Connection dbConn, long deviceID)
          Initialize the command with the DB connection and a deviceID.
 void initialize(java.lang.String dbContext, javax.servlet.http.HttpServletRequest request)
          Initialize the command with the parameters and database context.
 void initialize(java.lang.String dbContext, long deviceID)
          Initialize the command with the deviceID and database context.
 void reinitialize(long deviceID)
           
 void selAllInterfaces()
          Select all interfaces from the database.
 void selMonInterfaces()
          Select monitored interfaces from the database.
 void selRemInterfaces()
          Select removed interfaces from the database.
 void selUnMonInterfaces()
          Select unmonitored interfaces from the database.
 void selUnRemInterfaces()
          Select unremoved interfaces from the database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectInterfaces

public SelectInterfaces()
Construct a default SelectInterfaces command with an empty array.

Method Detail

getDevice

public Device getDevice()

getInterfaces

public java.util.ArrayList getInterfaces()

initialize

public void initialize(java.lang.String dbContext,
                       long deviceID)
                throws java.lang.Exception
Initialize the command with the deviceID and database context. If either has problems, throw an exception to indicate the problem.

Parameters:
dbContext - String containing the JNDI context resource
deviceID - long value of the device record in the DB
Throws:
java.lang.Exception - containing the reason the initialize failed

initialize

public void initialize(java.lang.String dbContext,
                       javax.servlet.http.HttpServletRequest request)
                throws java.lang.Exception
Initialize the command with the parameters and database context. If either has problems, throw an exception to indicate the problem.

Parameters:
dbContext - String containing the JNDI context resource
request - HttpServletRequest request header from the Web page
Throws:
java.lang.Exception - containing the reason the initialize failed

initialize

public void initialize(java.sql.Connection dbConn,
                       long deviceID)
                throws java.lang.Exception
Initialize the command with the DB connection and a deviceID. If either has problems, throw an exception to indicate the problem.

Parameters:
dbConn - Connection already established to the DB
deviceID - long value of the device record in the DB
Throws:
java.lang.Exception - containing the reason the initialize failed

reinitialize

public void reinitialize(long deviceID)
                  throws java.lang.Exception
Throws:
java.lang.Exception

selUnMonInterfaces

public void selUnMonInterfaces()
                        throws java.lang.Exception
Select unmonitored interfaces from the database.

Throws:
java.lang.Exception - to problems

selUnRemInterfaces

public void selUnRemInterfaces()
                        throws java.lang.Exception
Select unremoved interfaces from the database.

Throws:
java.lang.Exception - to problems

selRemInterfaces

public void selRemInterfaces()
                      throws java.lang.Exception
Select removed interfaces from the database.

Throws:
java.lang.Exception - to problems

selMonInterfaces

public void selMonInterfaces()
                      throws java.lang.Exception
Select monitored interfaces from the database.

Throws:
java.lang.Exception - to problems

selAllInterfaces

public void selAllInterfaces()
                      throws java.lang.Exception
Select all interfaces from the database.

Throws:
java.lang.Exception - to problems

done

public void done()
Clean up after the command's execution.