com.adventnet.snmp.mibs.agent
Class ProxyCommand

java.lang.Object
  extended by com.adventnet.snmp.mibs.AgentClauseCommandUtil
      extended by com.adventnet.snmp.mibs.ProxyCommandUtil
          extended by com.adventnet.snmp.mibs.agent.ProxyCommand

public class ProxyCommand
extends com.adventnet.snmp.mibs.ProxyCommandUtil

ProxyCommand class is used to implement the PROXY-COMMAND construct in the AGENTCLAUSE. The associated getrequest is proxied to another snmp agent.


Field Summary
(package private)  SnmpProxy proxy
           
 
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
ProxyCommand()
          costructor, create SnmpProxy object with default parameter.
 
Method Summary
 java.lang.String getAgentClauseString()
          This method implements the getAgentClauseString().
 java.lang.String getHost()
          getter for proxy host.
 int getPort()
          getter fro proxy agent port.
 java.lang.String getRegisteredOid()
          getter for oid the proxy agent will respond for this oid.
(package private)  java.lang.String getReqMesg(byte type)
           
(package private)  java.lang.String getReqMesg(SnmpVarBind varbind, byte type)
           
 SnmpProxy getSnmpProxy()
          getter for proxy Agent which is having proxy agent information.
 int[] getSubidList()
          getter for SubOidList returns child OIDs.
 long getTimeout()
          getter for command timeout
 java.util.Vector makeInstances(com.adventnet.snmp.mibs.AgentMibNode leafNode)
          This method implements the getAgentClauseString().
 void parseCommand(java.util.StringTokenizer strTok, java.lang.String str)
          Following methods are used by the previous parseClause method to interpret different COMMAND syntax.
 void setHost(java.lang.String host)
          setter for proxy host.
 void setPort(int port)
          setter for proxy port .
 void setRegisteredOid(java.lang.String oid)
          setter for oid of registered proxy agent.
(package private)  java.lang.String setReqMesg(SnmpVarBind varbind, java.util.Vector args)
           
(package private)  java.lang.String setReqMesg(java.util.Vector args)
           
 void setSnmpProxy(SnmpProxy p)
          setter for proxy agent.
 void setTimeout(long time)
          setter for command timeout
 
Methods inherited from class com.adventnet.snmp.mibs.AgentClauseCommandUtil
getCommandString, getName, initialize, isRunTime, setAgentMibOperations, setCommandString, setName, setRunTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

proxy

SnmpProxy proxy
Constructor Detail

ProxyCommand

public ProxyCommand()
costructor, create SnmpProxy object with default parameter.

Method Detail

getSnmpProxy

public SnmpProxy getSnmpProxy()
getter for proxy Agent which is having proxy agent information.

Returns:
SnmpProxy object.
See Also:
()

setSnmpProxy

public void setSnmpProxy(SnmpProxy p)
setter for proxy agent.

Parameters:
SnmpProxy - which is having the proxy agent information.
See Also:
()

getPort

public int getPort()
getter fro proxy agent port.

Overrides:
getPort in class com.adventnet.snmp.mibs.ProxyCommandUtil
Returns:
port.
See Also:
()

setPort

public void setPort(int port)
setter for proxy port .

Overrides:
setPort in class com.adventnet.snmp.mibs.ProxyCommandUtil
Parameters:
port - , the port number where the proxy agent is running.
See Also:
().

getHost

public java.lang.String getHost()
getter for proxy host.

Overrides:
getHost in class com.adventnet.snmp.mibs.ProxyCommandUtil
Returns:
proxy agent host name.
See Also:
()

setHost

public void setHost(java.lang.String host)
setter for proxy host.

Overrides:
setHost in class com.adventnet.snmp.mibs.ProxyCommandUtil
Parameters:
host - , the host name of proxy agent.
See Also:
()

getTimeout

public long getTimeout()
getter for command timeout

Overrides:
getTimeout in class com.adventnet.snmp.mibs.ProxyCommandUtil

setTimeout

public void setTimeout(long time)
setter for command timeout

Overrides:
setTimeout in class com.adventnet.snmp.mibs.ProxyCommandUtil

getRegisteredOid

public java.lang.String getRegisteredOid()
getter for oid the proxy agent will respond for this oid.

Overrides:
getRegisteredOid in class com.adventnet.snmp.mibs.ProxyCommandUtil
Returns:
oid
See Also:
()

setRegisteredOid

public void setRegisteredOid(java.lang.String oid)
setter for oid of registered proxy agent.

Overrides:
setRegisteredOid in class com.adventnet.snmp.mibs.ProxyCommandUtil
Parameters:
oid -
See Also:
()

getSubidList

public int[] getSubidList()
getter for SubOidList returns child OIDs.

Overrides:
getSubidList in class com.adventnet.snmp.mibs.ProxyCommandUtil

parseCommand

public void parseCommand(java.util.StringTokenizer strTok,
                         java.lang.String str)
                  throws MibException
Following methods are used by the previous parseClause method to interpret different COMMAND syntax.

Overrides:
parseCommand in class com.adventnet.snmp.mibs.ProxyCommandUtil
Throws:
MibException

getAgentClauseString

public java.lang.String getAgentClauseString()
This method implements the getAgentClauseString().

Overrides:
getAgentClauseString in class com.adventnet.snmp.mibs.ProxyCommandUtil
Returns:
String having PROXY-COMMAND information.

getReqMesg

java.lang.String getReqMesg(byte type)
                      throws AgentSnmpException
Throws:
AgentSnmpException

getReqMesg

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

setReqMesg

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

setReqMesg

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

makeInstances

public java.util.Vector makeInstances(com.adventnet.snmp.mibs.AgentMibNode leafNode)
                               throws MibException
This method implements the getAgentClauseString(). does nothing.

Overrides:
makeInstances in class com.adventnet.snmp.mibs.ProxyCommandUtil
Throws:
MibException