|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.snmp4j.AbstractTarget
public abstract class AbstractTarget
A AbstratTarget class is an abstract representation of a remote
SNMP entity. It represents a target with an Address object, as well protocol
parameters such as retransmission and timeout policy. Implementors of the
Target interface can subclass AbstratTarget to
take advantage of the implementation of common Target
properties.
| Constructor Summary | |
|---|---|
protected |
AbstractTarget()
Default constructor |
protected |
AbstractTarget(Address address)
Creates a SNMPv3 target with no retries and a timeout of one second. |
| Method Summary | |
|---|---|
java.lang.Object |
clone()
|
Address |
getAddress()
Gets the address of this target. |
int |
getMaxSizeRequestPDU()
Gets the maxmim size of request PDUs that this target is able to respond to. |
int |
getRetries()
Gets the number of retries. |
long |
getTimeout()
Gets the timeout for a target. |
int |
getVersion()
Gets the SNMP version (NMP messagen processing model) of the target. |
void |
setAddress(Address address)
Sets the address of the target. |
void |
setMaxSizeRequestPDU(int maxSizeRequestPDU)
Sets the maximum size of request PDUs that this target is able to receive. |
void |
setRetries(int retries)
Sets the number of retries to be performed before a request is timed out. |
void |
setTimeout(long timeout)
Sets the timeout for a target. |
void |
setVersion(int version)
Sets the SNMP version (thus the SNMP messagen processing model) of the target. |
java.lang.String |
toString()
|
protected java.lang.String |
toStringAbstractTarget()
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractTarget()
protected AbstractTarget(Address address)
address - an Address instance.| Method Detail |
|---|
public Address getAddress()
getAddress in interface Targetpublic void setAddress(Address address)
setAddress in interface Targetaddress - an Address instance.public void setVersion(int version)
setVersion in interface Targetversion - the message processing model ID.SnmpConstants.version1,
SnmpConstants.version2c,
SnmpConstants.version3public int getVersion()
getVersion in interface TargetSnmpConstants.version1,
SnmpConstants.version2c,
SnmpConstants.version3public void setRetries(int retries)
setRetries in interface Targetretries - the number of retries. Note: If the number of retries is set to
0, then the request will be sent out exactly once.public int getRetries()
getRetries in interface Targetpublic void setTimeout(long timeout)
setTimeout in interface Targettimeout - timeout in milliseconds before a confirmed request is resent or
timed out.public long getTimeout()
getTimeout in interface Targetpublic int getMaxSizeRequestPDU()
getMaxSizeRequestPDU in interface Targetpublic void setMaxSizeRequestPDU(int maxSizeRequestPDU)
setMaxSizeRequestPDU in interface TargetmaxSizeRequestPDU - the maximum PDU (SNMP message) size this session will be able to
process.protected java.lang.String toStringAbstractTarget()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Object clone()
clone in interface Targetclone in class java.lang.Object
|
Copyright 2003-2009 Frank Fock and Jochen Katz (SNMP4J.org) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||