com.adventnet.utils.agent
Class ProxyByHost

java.lang.Object
  |
  +--com.adventnet.snmp.snmp2.agent.Cache
        |
        +--com.adventnet.snmp.snmp2.agent.BaseSnmpStore
              |
              +--com.adventnet.snmp.snmp2.agent.SnmpStore
                    |
                    +--com.adventnet.snmp.snmp2.agent.SnmpProxy
                          |
                          +--com.adventnet.utils.agent.ProxyByHost

Deprecated. This class is no longer used by the API.

public class ProxyByHost
extends SnmpProxy

This class proxies requests based on the community if is the received community the pdu is proxied to given host. Needless to say should be a write community

Since:
AdventNet Agent Toolkit (Java Edition) 4.2 release.
See Also:
com.adventnet.snmp.snmp2.agent.SnmpAgent.authenticate, Serialized Form

Field Summary
(package private)  SnmpAgent agent
          Deprecated.  
 
Fields inherited from class com.adventnet.snmp.snmp2.agent.SnmpProxy
agentHost, agentPortNumber, agentTimeOut, api, community, pdu, proxySession, registeredOid, retries, status, userBasedCommunityPolicy
 
Fields inherited from class com.adventnet.snmp.snmp2.agent.BaseSnmpStore
debugLevel, localAddress, oldAddress, oldPort, protocol, session, snmpLog
 
Fields inherited from class com.adventnet.snmp.snmp2.agent.Cache
cache, debug
 
Constructor Summary
ProxyByHost(SnmpAgent agent)
          Deprecated. The constructor whick takes the SnmpAgent reference as the parameter.
ProxyByHost(SnmpAgent agent, int[] oid)
          Deprecated.  
 
Method Summary
protected  java.lang.String getCommunity(java.lang.String community)
          Deprecated. get the host from the definition.
protected  java.lang.String getHost(java.lang.String community)
          Deprecated. get the host from the definition.
 void getNextRequest(VarBindRequestEvent pe)
          Deprecated. This method is called by AdventNet Extensible Agent for SNMP Get Next Requests
 int getPort()
          Deprecated. getter for port to proxy to
 void getRequest(VarBindRequestEvent pe)
          Deprecated. This method is called by AdventNet Extensible Agent for SNMP Get Requests
 java.lang.String getSeparator()
          Deprecated. Getter for seperator default value would be "/"
 void setDefaultHost(java.lang.String host)
          Deprecated. Setter for port to proxy to Default value is localhost
 void setOid(int[] oid)
          Deprecated. Setter for registered oid
 void setPort(int port)
          Deprecated. Setter for port to proxy to
 void setRequest(VarBindRequestEvent pe)
          Deprecated. This method is called by AdventNet Extensible Agent for SNMP Set Requests
 void setSeparator(java.lang.String sep)
          Deprecated. Setter for seperator
 void setV2Supported(boolean val)
          Deprecated. If v2 is not supported return before sending the request to the Proxy Agent
 
Methods inherited from class com.adventnet.snmp.snmp2.agent.SnmpProxy
addRegistrationListener, getAgentHost, getAgentPortNumber, getAgentTimeOut, getkey, getNextRequest, getRegisteredOid, getRespPdu, getRespPdu, getRetries, getRowStatus, getSubidList, getVersion, initProxySession, isProxySessionAlive, isProxyTimeOuts, isUserBasedCommunityPolicy, removeRegistrationListener, setAgentHost, setAgentPortNumber, setAgentTimeOut, setCommunity, setProxyTimeOuts, setRegisteredOid, setRetries, setRowStatus, setUserBasedCommunityPolicy, setVersion, startProxySession, stopProxySession
 
Methods inherited from class com.adventnet.snmp.snmp2.agent.SnmpStore
getProxySession, getTrapReceiverSession, initSnmpStore
 
Methods inherited from class com.adventnet.snmp.snmp2.agent.BaseSnmpStore
closeAll, createProtocolOptions, finalize, getSnmpAPI, getSnmpSession, getSnmpSession, initSession, initSnmpStore, isAlive, isDebug, killSnmpAgent, setDebug
 
Methods inherited from class com.adventnet.snmp.snmp2.agent.Cache
getFromCache, getMibOperations, putInCache, setMibOperations
 
Methods inherited from class java.lang.Object
, clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

agent

SnmpAgent agent
Deprecated. 
Constructor Detail

ProxyByHost

public ProxyByHost(SnmpAgent agent)
Deprecated. 
The constructor whick takes the SnmpAgent reference as the parameter.
Parameters:
the - SnmpAgent reference

ProxyByHost

public ProxyByHost(SnmpAgent agent,
                   int[] oid)
Deprecated. 
Parameters:
the - SnmpAgent reference and integer array oid which needs to be proxied on the basis of community
Method Detail

getSeparator

public java.lang.String getSeparator()
Deprecated. 
Getter for seperator default value would be "/"

setSeparator

public void setSeparator(java.lang.String sep)
Deprecated. 
Setter for seperator

setOid

public void setOid(int[] oid)
Deprecated. 
Setter for registered oid

getRequest

public void getRequest(VarBindRequestEvent pe)
                throws AgentSnmpException
Deprecated. 
This method is called by AdventNet Extensible Agent for SNMP Get Requests
Overrides:
getRequest in class SnmpProxy
Tags copied from class: SnmpProxy
Parameters:
pe - the VarBindRequestEvent contains varbinds and information about the manager.
Throws:
AgentSnmpException - thrown if any error occurs.

getNextRequest

public void getNextRequest(VarBindRequestEvent pe)
                    throws AgentSnmpException
Deprecated. 
This method is called by AdventNet Extensible Agent for SNMP Get Next Requests

setRequest

public void setRequest(VarBindRequestEvent pe)
                throws AgentSnmpException
Deprecated. 
This method is called by AdventNet Extensible Agent for SNMP Set Requests
Overrides:
setRequest in class SnmpProxy
Tags copied from class: SnmpProxy
Parameters:
pe - the VarBindRequestEvent contains varbinds and information about the manager.
Throws:
AgentSnmpException - thrown if any error occurs.

setV2Supported

public void setV2Supported(boolean val)
Deprecated. 
If v2 is not supported return before sending the request to the Proxy Agent

setPort

public void setPort(int port)
Deprecated. 
Setter for port to proxy to
See Also:
setRegisteredOid

getPort

public int getPort()
Deprecated. 
getter for port to proxy to
See Also:
getRegisteredOid

setDefaultHost

public void setDefaultHost(java.lang.String host)
Deprecated. 
Setter for port to proxy to Default value is localhost
See Also:
setPort

getHost

protected java.lang.String getHost(java.lang.String community)
Deprecated. 
get the host from the definition. override this method if anything specific is needed

getCommunity

protected java.lang.String getCommunity(java.lang.String community)
Deprecated. 
get the host from the definition. override this method if anything specific is needed based on community