Active Virtual Network Management Prediction (AVNMP) Classes

snmp.agent
Class SnmpAgentContext

java.lang.Object
  |
  +--snmp.agent.SnmpAgentContext
All Implemented Interfaces:
java.lang.Runnable, java.io.Serializable

public class SnmpAgentContext
extends java.lang.Object
implements java.lang.Runnable, java.io.Serializable

This class handles the SNMP connection details. This research is funded by DARPA/ITO Contract Number: F30602-98-C-0230 supported by the Air Force Research Laboratory/IF.

Version:
$Revision: 1.1.1.1 $ $State: Exp $
Author:
Steve Bush
See Also:
Serialized Form

Field Summary
 AgentTable agentTable
          A list of all the managemable objects.
 java.io.InputStream in
          This input stream
 int iport
          The client port.
 java.io.OutputStream out
          The output stream
static int STD_PORT
          The default port to use.
 
Constructor Summary
SnmpAgentContext(int p)
          Start to run this thread.
SnmpAgentContext(int p, AgentTable agenttab)
          Start to run this thread.
 
Method Summary
 void finalize()
           
 void removeGreaterSubAgents(java.lang.String fromOid, java.lang.String suffix)
          Remove all subagents greater than index.
 void removeSmallerSubAgents(java.lang.String fromOid, java.lang.String suffix)
          Remove all subagents smaller than index.
 void run()
          Wait for an SNMP packet to arrive and decode it.
 void stop()
          Stop this thread.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

public java.io.OutputStream out
The output stream

in

public java.io.InputStream in
This input stream

iport

public int iport
The client port.

STD_PORT

public static final int STD_PORT
The default port to use.

agentTable

public AgentTable agentTable
A list of all the managemable objects.
Constructor Detail

SnmpAgentContext

public SnmpAgentContext(int p)
                 throws java.io.IOException
Start to run this thread.
Parameters:
p - The port to wait on for requests.

SnmpAgentContext

public SnmpAgentContext(int p,
                        AgentTable agenttab)
                 throws java.io.IOException
Start to run this thread.
Parameters:
p - The port to wait on for requests.
Method Detail

stop

public void stop()
Stop this thread.

finalize

public void finalize()
Overrides:
finalize in class java.lang.Object

run

public void run()
Wait for an SNMP packet to arrive and decode it.
Specified by:
run in interface java.lang.Runnable

removeSmallerSubAgents

public void removeSmallerSubAgents(java.lang.String fromOid,
                                   java.lang.String suffix)
Remove all subagents smaller than index.
Parameters:
fromOid - The base of the table.
suffix - Remove subagents smaller than the suffix.

removeGreaterSubAgents

public void removeGreaterSubAgents(java.lang.String fromOid,
                                   java.lang.String suffix)
Remove all subagents greater than index.
Parameters:
fromOid - The base of the table.
suffix - Remove subagents strictly greater than the suffix.

Active Virtual Network Management Prediction (AVNMP) Classes