org.snmp4j
Interface Target

All Superinterfaces:
java.lang.Cloneable, java.io.Serializable
All Known Implementing Classes:
AbstractTarget, CommunityTarget, SecureTarget, UserTarget

public interface Target
extends java.io.Serializable, java.lang.Cloneable

A Target interface defines 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.

Version:
1.6
Author:
Frank Fock

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.
 

Method Detail

getAddress

Address getAddress()
Gets the address of this target.

Returns:
an Address instance.

setAddress

void setAddress(Address address)
Sets the address of the target.

Parameters:
address - an Address instance.

setVersion

void setVersion(int version)
Sets the SNMP version (thus the SNMP messagen processing model) of the target.

Parameters:
version - the message processing model ID.
See Also:
SnmpConstants.version1, SnmpConstants.version2c, SnmpConstants.version3

getVersion

int getVersion()
Gets the SNMP version (NMP messagen processing model) of the target.

Returns:
the message processing model ID.
See Also:
SnmpConstants.version1, SnmpConstants.version2c, SnmpConstants.version3

setRetries

void setRetries(int retries)
Sets the number of retries to be performed before a request is timed out.

Parameters:
retries - the number of retries. Note: If the number of retries is set to 0, then the request will be sent out exactly once.

getRetries

int getRetries()
Gets the number of retries.

Returns:
an integer >= 0.

setTimeout

void setTimeout(long timeout)
Sets the timeout for a target.

Parameters:
timeout - timeout in milliseconds before a confirmed request is resent or timed out.

getTimeout

long getTimeout()
Gets the timeout for a target.

Returns:
the timeout in milliseconds.

getMaxSizeRequestPDU

int getMaxSizeRequestPDU()
Gets the maxmim size of request PDUs that this target is able to respond to. The default is 65535.

Returns:
the maximum PDU size of request PDUs for this target. Which is always greater than 484.

setMaxSizeRequestPDU

void setMaxSizeRequestPDU(int maxSizeRequestPDU)
Sets the maximum size of request PDUs that this target is able to receive.

Parameters:
maxSizeRequestPDU - the maximum PDU (SNMP message) size this session will be able to process.

clone

java.lang.Object clone()

Copyright 2005-2010 Frank Fock (SNMP4J.org)

Copyright © 2011 SNMP4J.org. All Rights Reserved.