org.snmp4j
Class CommunityTarget

java.lang.Object
  extended by org.snmp4j.AbstractTarget
      extended by org.snmp4j.CommunityTarget
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Target

public class CommunityTarget
extends AbstractTarget

A CommunityTarget represents SNMP target properties for community based message processing models (SNMPv1 and SNMPv2c).

Version:
1.1
Author:
Frank Fock
See Also:
Serialized Form

Constructor Summary
CommunityTarget()
          Default constructor.
CommunityTarget(Address address, OctetString community)
          Creates a fully specified communtity target.
 
Method Summary
 OctetString getCommunity()
          Gets the community octet string.
 void setCommunity(OctetString community)
          Sets the community octet sting.
 java.lang.String toString()
           
 
Methods inherited from class org.snmp4j.AbstractTarget
clone, getAddress, getMaxSizeRequestPDU, getRetries, getTimeout, getVersion, setAddress, setMaxSizeRequestPDU, setRetries, setTimeout, setVersion, toStringAbstractTarget
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CommunityTarget

public CommunityTarget()
Default constructor.


CommunityTarget

public CommunityTarget(Address address,
                       OctetString community)
Creates a fully specified communtity target.

Parameters:
address - the transport Address of the target.
community - the community to be used for the target.
Method Detail

getCommunity

public OctetString getCommunity()
Gets the community octet string.

Returns:
an OctetString instance, never null.

setCommunity

public void setCommunity(OctetString community)
Sets the community octet sting.

Parameters:
community - an OctetString instance which must not be null.

toString

public java.lang.String toString()
Overrides:
toString in class AbstractTarget

Copyright 2005-2010 Frank Fock (SNMP4J.org)

Copyright © 2011 SNMP4J.org. All Rights Reserved.