com.adventnet.snmp.mibs.agent
Class AgentClauseCommand

java.lang.Object
  |
  +--com.adventnet.snmp.mibs.AgentClauseCommandUtil
        |
        +--com.adventnet.snmp.mibs.agent.AgentClauseCommand

public abstract class AgentClauseCommand
extends AgentClauseCommandUtil

This is the base class which is extended by FILE-COMMAND etc.

AGENTCLAUSE implementation API class which is extended by ClassCommand , FileCommand, ReadWriteCommand etc

API users do not need these classes and neednot use this class directly


Field Summary
static int AT_START
          Setting the value of instantiate to AT_START will make the command get executed only when the agent is start or object is instantiated
(package private)  java.lang.String command_string
           
static int EACH_TIME
          Setting the value of instantiate to EACH_TIME will make the command get executed each time
static int FIRST_TIME
          Setting the value of instantiate to FIRST_TIME will make the command get executed only the first time agent clause command is executed
 int instantiate
          This can be any of AT_START, EACH_TIME, FIRST_TIME
(package private)  AgentMibOperations mibOperations
           
(package private)  java.lang.String name
           
(package private)  AgentMibNode node
           
(package private)  boolean runTime
           
(package private)  long timeout
           
 
Fields inherited from class com.adventnet.snmp.mibs.AgentClauseCommandUtil
AT_START, command_string, EACH_TIME, FIRST_TIME, instantiate, mibOperations, name, node, runTime, timeout
 
Constructor Summary
AgentClauseCommand()
           
 
Method Summary
 java.lang.String getAgentClauseString()
          This method implements the getAgentClauseString()
 java.lang.String getCommandString()
          Getter for command string.
 java.lang.String getName()
          getter for the name of command associated with this AgentClause.
(package private) abstract  java.lang.String getReqMesg(byte type)
           
(package private) abstract  java.lang.String getReqMesg(SnmpVarBind varbind, byte type)
           
 long getTimeout()
          getter for command timeout.
 void initialize()
          initialize method,will be used in future.
 boolean isRunTime()
          checks whether runTime environment is set.
abstract  java.util.Vector makeInstances(AgentMibNode leafNode)
          This method makes instances of the leafNode and returns a vector which is stored as instances in AgentMibNode.
abstract  void parseCommand(java.util.StringTokenizer tok, java.lang.String s)
           
 void setAgentMibOperations(AgentMibOperations mibops)
          Set the miboperations for looking up nodes
 void setCommandString(java.lang.String str)
          Setter for command string.
 void setName(java.lang.String str)
          setter for the name of the command associated with this AgentClause.
(package private) abstract  java.lang.String setReqMesg(SnmpVarBind varbind, java.util.Vector args)
           
(package private) abstract  java.lang.String setReqMesg(java.util.Vector args)
           
 void setRunTime(boolean val)
          Setter for runtime environment variable which decides whether to throw exceptions
 void setTimeout(long time)
          setter for command timeout.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EACH_TIME

public static final int EACH_TIME
Setting the value of instantiate to EACH_TIME will make the command get executed each time

FIRST_TIME

public static final int FIRST_TIME
Setting the value of instantiate to FIRST_TIME will make the command get executed only the first time agent clause command is executed

AT_START

public static final int AT_START
Setting the value of instantiate to AT_START will make the command get executed only when the agent is start or object is instantiated

instantiate

public int instantiate
This can be any of AT_START, EACH_TIME, FIRST_TIME

command_string

java.lang.String command_string

timeout

long timeout

name

java.lang.String name

mibOperations

AgentMibOperations mibOperations

node

AgentMibNode node

runTime

boolean runTime
Constructor Detail

AgentClauseCommand

public AgentClauseCommand()
Method Detail

setCommandString

public void setCommandString(java.lang.String str)
Setter for command string.
Overrides:
setCommandString in class AgentClauseCommandUtil
See Also:
()

getCommandString

public java.lang.String getCommandString()
Getter for command string.
Overrides:
getCommandString in class AgentClauseCommandUtil
See Also:
()

getTimeout

public long getTimeout()
getter for command timeout.
Overrides:
getTimeout in class AgentClauseCommandUtil
See Also:
()

setTimeout

public void setTimeout(long time)
setter for command timeout.
Overrides:
setTimeout in class AgentClauseCommandUtil
See Also:
getTimeout()

getName

public java.lang.String getName()
getter for the name of command associated with this AgentClause.
Overrides:
getName in class AgentClauseCommandUtil
See Also:
()

setName

public void setName(java.lang.String str)
setter for the name of the command associated with this AgentClause.
Overrides:
setName in class AgentClauseCommandUtil
See Also:
()

setAgentMibOperations

public void setAgentMibOperations(AgentMibOperations mibops)
Set the miboperations for looking up nodes
Overrides:
setAgentMibOperations in class AgentClauseCommandUtil

setRunTime

public void setRunTime(boolean val)
Setter for runtime environment variable which decides whether to throw exceptions
Overrides:
setRunTime in class AgentClauseCommandUtil

isRunTime

public boolean isRunTime()
checks whether runTime environment is set.
Overrides:
isRunTime in class AgentClauseCommandUtil
See Also:
()

parseCommand

public abstract void parseCommand(java.util.StringTokenizer tok,
                                  java.lang.String s)
                           throws MibException
Overrides:
parseCommand in class AgentClauseCommandUtil

initialize

public void initialize()
                throws MibException
initialize method,will be used in future.
Overrides:
initialize in class AgentClauseCommandUtil

getAgentClauseString

public java.lang.String getAgentClauseString()
This method implements the getAgentClauseString()
Overrides:
getAgentClauseString in class AgentClauseCommandUtil

getReqMesg

abstract java.lang.String getReqMesg(byte type)
                              throws AgentSnmpException

getReqMesg

abstract java.lang.String getReqMesg(SnmpVarBind varbind,
                                     byte type)
                              throws AgentSnmpException

setReqMesg

abstract java.lang.String setReqMesg(java.util.Vector args)
                              throws AgentSnmpException

setReqMesg

abstract java.lang.String setReqMesg(SnmpVarBind varbind,
                                     java.util.Vector args)
                              throws AgentSnmpException

makeInstances

public abstract java.util.Vector makeInstances(AgentMibNode leafNode)
                                        throws MibException
This method makes instances of the leafNode and returns a vector which is stored as instances in AgentMibNode.

Overrides:
makeInstances in class AgentClauseCommandUtil
Parameters:
leafNode - Node where the instances are created
Returns:
vector of InstanceTypes