Package org.snmp4j.smi
Interface Address
- All Superinterfaces:
AssignableFromByteArray
,AssignableFromString
- All Known Implementing Classes:
GenericAddress
,IpAddress
,SMIAddress
,SshAddress
,TcpAddress
,TlsAddress
,TransportIpAddress
,UdpAddress
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:
- 2.0
- Author:
- Frank Fock
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isValid()
Checks whether thisAddress
is a valid transport address.boolean
parseAddress
(String address) Parses the address from the supplied string representation.void
Sets the address value from the supplied String.Methods inherited from interface org.snmp4j.smi.AssignableFromByteArray
setValue, toByteArray
-
Method Details
-
isValid
boolean isValid()Checks whether thisAddress
is a valid transport address.- Returns:
true
if the address is valid,false
otherwise.
-
parseAddress
Parses the address from the supplied string representation.- Parameters:
address
- a String representation of this address.- Returns:
true
ifaddress
could be successfully parsed and has been assigned to this address object,false
otherwise.
-
setValue
Sets the address value from the supplied String. The string must match the format required for the Address instance implementing this interface. Otherwise anIllegalArgumentException
runtime exception is thrown.- Specified by:
setValue
in interfaceAssignableFromString
- Parameters:
address
- an address String.- Since:
- 1.7
-