org.snmp4j.smi
Interface Address

All Superinterfaces:
AssignableFromString, java.lang.Comparable
All Known Implementing Classes:
GenericAddress, IpAddress, SMIAddress, TcpAddress, TransportIpAddress, UdpAddress

public interface Address
extends java.lang.Comparable, AssignableFromString

The Address interface serves as a base class for all SNMP transport addresses.

Note: This class should be moved to package org.snmp4j in SNMP4J 2.0.

Version:
1.7
Author:
Frank Fock

Method Summary
 boolean isValid()
          Checks whether this Address is a valid transport address.
 boolean parseAddress(java.lang.String address)
          Parses the address from the supplied string representation.
 void setValue(java.lang.String address)
          Sets the address value from the supplied String.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

isValid

boolean isValid()
Checks whether this Address is a valid transport address.

Returns:
true if the address is valid, false otherwise.

parseAddress

boolean parseAddress(java.lang.String address)
Parses the address from the supplied string representation.

Parameters:
address - a String representation of this address.
Returns:
true if address could be successfully parsed and has been assigned to this address object, false otherwise.

setValue

void setValue(java.lang.String address)
Sets the address value from the supplied String. The string must match the format required for the Address instance implementing this interface. Otherwise an IllegalArgumentException runtime exception is thrown.

Specified by:
setValue in interface AssignableFromString
Parameters:
address - an address String.
Since:
1.7

Copyright 2005-2010 Frank Fock (SNMP4J.org)

Copyright © 2011 SNMP4J.org. All Rights Reserved.