[SNMP4J] Address type and parse method
Marco.Bresciani at alcatel.it
Marco.Bresciani at alcatel.it
Mon Nov 6 14:02:31 CET 2006
Thank you,
why not something like
enum Type { UDP, TCP, IP };
so that it'll begin the step toJava 5?! ;-)
Ing. Marco Bresciani
--
Alcatel - WTD R&D SW CC
Via Trento, 30 - 20059 Vimercate (Mi) Italia
Phone: +39.039.686.5546
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GIT d++ s: a C++ UL++ P+ L+++ E-- W++ N o-- K- w-- O- M- V- PS--
PE-- Y+ PGP++ t+ 5 X+ R+++ tv+ b++ DI++++ D+ G e+++ h! !r !y+
------END GEEK CODE BLOCK------
Frank Fock <fock at agentpp.com>
03/11/2006 23.21
To: Marco BRESCIANI/IT/ALCATEL at ALCATEL
cc: snmp4j at agentpp.org
Subject: Re: [SNMP4J] Address type and parse method
Hello Marco,
Good point. In version 1.8 the following constants will be part
of GenericAddress:
/**
* Default address type identifier for an UpdAddress.
*/
public static final String TYPE_UDP = "udp";
/**
* Default address type identifier for a TcpAddress.
*/
public static final String TYPE_TCP = "tcp";
/**
* Default address type identifier for an IpAddress.
*/
public static final String TYPE_IP = "ip";
Best regards,
Frank
Marco.Bresciani at alcatel.it wrote:
> Hello,
> with respect to this description
>
http://www.snmp4j.org/doc/org/snmp4j/smi/GenericAddress.html#parse(java.lang.String)
> ... Does an enum or a set of constants exists in order to have a
reference
> to allowed types for address?
>
> I found the address.properties file checking inside the JAr file and I
saw
> the "udp", "tcp" and "ip" Strings but... there is a reference for
> programmer? Can I use an enum or final static values? It's not very
> "polite" to write "udp" hard-coded in the code... :-)
>
> Thank you.
>
> Ing. Marco Bresciani
>
--
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com
More information about the SNMP4J
mailing list