com.adventnet.utils.agent
Class DynamicRegistrationEntry

java.lang.Object
  extended by com.adventnet.utils.agent.DynamicRegistrationEntry
All Implemented Interfaces:
TableEntry

public class DynamicRegistrationEntry
extends java.lang.Object
implements TableEntry

This class is for Storing all the Sub Agent Informations. Represents an entry under Dynamic registration table Supports a row Status of createAndGo.

This class having information of PROXY AGENT.

If any requests comes for this OID , the requests proxied to the the coresponding agent which is specified in the table.

Dynamically we can create new entry and we can overwrite an old entry.


Field Summary
(package private)  java.lang.String community
           
(package private)  java.lang.String entryInstance
           
(package private)  java.lang.String host
           
(package private)  boolean isOid
           
(package private)  SnmpOID oid
           
(package private)  java.lang.Long port
           
(package private)  java.lang.String proxyContextName
           
(package private)  java.lang.Long retries
           
(package private)  java.lang.Integer rowStatus
           
(package private)  java.lang.Long timeout
           
(package private)  java.lang.Integer version
           
 
Constructor Summary
DynamicRegistrationEntry()
           
DynamicRegistrationEntry(java.lang.String className)
           
 
Method Summary
 int[] computeInstanceOID()
          This Method is used for the computing the InstanceOids.
 void decrementCount()
          Decrementer for columnCount.
 java.lang.String getCommunity()
          Getter for the Community to be proxied.
 int getCount()
          getter for number of coulmn in a row.
 java.lang.String getEntryInstance()
          This method will be used when the proxy table is instance based proxy table, to get the entry instance OID column value.
 java.lang.String getHost()
          Getter for the host name to be proxied.
 int[] getInstanceOID()
          Getter for the InstanceOid of the Row, Part of interface TableEntry.
 java.lang.String getOid()
          Getter for the oid to be proxied.
 java.lang.String getPort()
          Getter for the port to be proxied.
 SnmpProxy getProxyCommand()
          Getter for SnmpProxy.
 java.lang.String getProxyContextName()
          This method will be used when the proxy table is Context based proxy table, to get the proxyContextName column value.
 java.lang.String getRetries()
          Getter for the Retries that is used while proxying.
 java.lang.String getRowStatus()
          Getter for the rowStatus.
 java.lang.String getTimeOut()
          Getter for the Agent Time Out Values.
 java.lang.String getVersion()
          Getter for the proxying PDU Version.
 boolean isOid()
          Checks if the Oid is set.
 void setCommunity(SnmpVar var)
          Setter for the Community to be proxied.
 void setEntryInstance(SnmpVar var)
          This method will be used when the proxy table is instance based proxy table, to set the entry instance OID column value.
 void setHost(SnmpVar var)
          Setter for the HOST to be proxied.
 void setInstanceOID(int[] instanceOID)
          Setter for the InstanceOID of the Row, Part of interface TableEntry.
 void setOid(SnmpVar var)
          Setter for the oid to be proxied.
 void setPort(SnmpVar var)
          Setter for the PORT to be proxied.
 void setProxyContextName(SnmpVar var)
          This method will be used when the proxy table is Context based proxy table, to set the proxyContextName column value.
 void setRetries(SnmpVar var)
          Setter for the Retries value for which the Request is to be proxied.
 void setRowStatus(SnmpVar var)
          Setter for the RowStatus.
 void setTimeOut(SnmpVar var)
          The setter for timeout.
 void setVersion(SnmpVar var)
          The setter for Version of the PDU to be proxied.
 java.lang.String toString()
          The toString method to show the registration with details.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

oid

SnmpOID oid

isOid

boolean isOid

host

java.lang.String host

community

java.lang.String community

proxyContextName

java.lang.String proxyContextName

port

java.lang.Long port

retries

java.lang.Long retries

rowStatus

java.lang.Integer rowStatus

timeout

java.lang.Long timeout

version

java.lang.Integer version

entryInstance

java.lang.String entryInstance
Constructor Detail

DynamicRegistrationEntry

DynamicRegistrationEntry()

DynamicRegistrationEntry

DynamicRegistrationEntry(java.lang.String className)
Method Detail

getProxyCommand

public SnmpProxy getProxyCommand()
Getter for SnmpProxy.

Returns:
SnmpProxy object to which the request to be proxied.

setOid

public void setOid(SnmpVar var)
            throws AgentSnmpException
Setter for the oid to be proxied.

Parameters:
var - The OID value to be proxied.
Throws:
AgentSnmpException - This Wraps all the Exceptions thrown while processing this Event.
See Also:
getOid()

getOid

public java.lang.String getOid()
Getter for the oid to be proxied.

Returns:
String having OID .
See Also:
setOid(SnmpVar var)

isOid

public boolean isOid()
Checks if the Oid is set.

Returns:
True if the Oid has been set else False.

setHost

public void setHost(SnmpVar var)
             throws AgentSnmpException
Setter for the HOST to be proxied. Default value is localhost

Parameters:
var - having real agent name.
Throws:
AgentSnmpException - This Wraps all the Exceptions thrown while processing this Event.
See Also:
getHost()

getHost

public java.lang.String getHost()
Getter for the host name to be proxied.

Returns:
String having Host name.
See Also:
setHost(SnmpVar var)

setCommunity

public void setCommunity(SnmpVar var)
                  throws AgentSnmpException
Setter for the Community to be proxied.

Parameters:
var - having real agent community.
Throws:
AgentSnmpException - This Wraps all the Exceptions thrown while processing this Event.
See Also:
getCommunity()

getCommunity

public java.lang.String getCommunity()
Getter for the Community to be proxied.

Returns:
String having community
See Also:
setCommunity(SnmpVar var)

getInstanceOID

public int[] getInstanceOID()
Getter for the InstanceOid of the Row, Part of interface TableEntry.

Specified by:
getInstanceOID in interface TableEntry
Returns:
The instanceOID.
See Also:
setInstanceOID()

setInstanceOID

public void setInstanceOID(int[] instanceOID)
Setter for the InstanceOID of the Row, Part of interface TableEntry.

Specified by:
setInstanceOID in interface TableEntry
Parameters:
instanceOID - The Instance Oid Value.
See Also:
getInstanceOID().

computeInstanceOID

public int[] computeInstanceOID()
This Method is used for the computing the InstanceOids. overrides method , return null.

Specified by:
computeInstanceOID in interface TableEntry
Returns:
The Computed Oid Value.
See Also:
AgentUtil.encodeInstanceString()

setPort

public void setPort(SnmpVar var)
             throws AgentSnmpException
Setter for the PORT to be proxied.

Parameters:
var - The port number.
Throws:
AgentSnmpException - This Wraps all the Exceptions thrown while processing this Event.
See Also:
getPort().

getPort

public java.lang.String getPort()
Getter for the port to be proxied.

Returns:
String of value port number.
See Also:
setPort(SnmpVar var).

setRetries

public void setRetries(SnmpVar var)
                throws AgentSnmpException
Setter for the Retries value for which the Request is to be proxied.

Parameters:
var - The Retries value.
Throws:
AgentSnmpException - This Wraps all the Exceptions thrown while processing this Event.
See Also:
getRetries().

getRetries

public java.lang.String getRetries()
Getter for the Retries that is used while proxying.

Returns:
String value of Retries.
See Also:
setRetires(SnmpVar var)

setRowStatus

public void setRowStatus(SnmpVar var)
                  throws AgentSnmpException
Setter for the RowStatus. if Rowstatus is active(1) then only the request is proxied.

Parameters:
var - SnmpVar having rowstatus information.
Throws:
AgentSnmpException - This Wraps all the Exceptions thrown while processing this Event.
See Also:
getRowStatus()

getRowStatus

public java.lang.String getRowStatus()
Getter for the rowStatus.

Returns:
String of Rowstatus value.
See Also:
setRowStatus(SnmpVar var)

setTimeOut

public void setTimeOut(SnmpVar var)
                throws AgentSnmpException
The setter for timeout.

The proxy agent waits for response for a specified time.

Parameters:
var - value of TimeOut.
Throws:
AgentSnmpException - This Wraps all the Exceptions thrown while processing this Event.
See Also:
getTimeOut()

getTimeOut

public java.lang.String getTimeOut()
                            throws AgentSnmpException
Getter for the Agent Time Out Values.

Returns:
The timeout value.

Throws:
AgentSnmpException - This Wraps all the Exceptions thrown while processing the event.
See Also:
setTimeOut(SnmpVar var)

setVersion

public void setVersion(SnmpVar var)
                throws AgentSnmpException
The setter for Version of the PDU to be proxied.

Parameters:
var - SnmpVersion value to be set.
Throws:
AgentSnmpException - This Wraps all the Exceptions thrown while processing this Event.
See Also:
getVersion()

getVersion

public java.lang.String getVersion()
                            throws AgentSnmpException
Getter for the proxying PDU Version.

Returns:
The proxying Snmp Version value.

Throws:
AgentSnmpException - This Wraps all the Exceptions thrown while processing the event.
See Also:
setVersion(SnmpVar var)

decrementCount

public void decrementCount()
Decrementer for columnCount. By default columnCount is 4.


getCount

public int getCount()
getter for number of coulmn in a row.

Returns:
int of number of columns.

getEntryInstance

public java.lang.String getEntryInstance()
This method will be used when the proxy table is instance based proxy table, to get the entry instance OID column value.

Returns:
The Entry Instance Oid Column Value.
See Also:
setEntryInstance(SnmpVar var)

setEntryInstance

public void setEntryInstance(SnmpVar var)
                      throws AgentSnmpException
This method will be used when the proxy table is instance based proxy table, to set the entry instance OID column value.

Parameters:
var - the SnmpVar of instance value to be set.
Throws:
AgentSnmpException - This Wraps all the Exceptions thrown while processing this Event.
See Also:
getEntryInstance()

toString

public java.lang.String toString()
The toString method to show the registration with details.

Overrides:
toString in class java.lang.Object
Returns:
String based representation of the registration.

setProxyContextName

public void setProxyContextName(SnmpVar var)
                         throws AgentSnmpException
This method will be used when the proxy table is Context based proxy table, to set the proxyContextName column value.

Parameters:
var - the SnmpVar of context value to be set.
Throws:
AgentSnmpException - This Wraps all the Exceptions thrown while processing this Event.
See Also:
getProxyContextName()

getProxyContextName

public java.lang.String getProxyContextName()
This method will be used when the proxy table is Context based proxy table, to get the proxyContextName column value.

Returns:
The Context name String.
See Also:
setProxyContextName(SnmpVar var)