KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > snmp4j > smi > Address


1 /*_############################################################################
2   _##
3   _## SNMP4J - Address.java
4   _##
5   _## Copyright 2003-2007 Frank Fock and Jochen Katz (SNMP4J.org)
6   _##
7   _## Licensed under the Apache License, Version 2.0 (the "License");
8   _## you may not use this file except in compliance with the License.
9   _## You may obtain a copy of the License at
10   _##
11   _## http://www.apache.org/licenses/LICENSE-2.0
12   _##
13   _## Unless required by applicable law or agreed to in writing, software
14   _## distributed under the License is distributed on an "AS IS" BASIS,
15   _## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   _## See the License for the specific language governing permissions and
17   _## limitations under the License.
18   _##
19   _##########################################################################*/

20
21
22 package org.snmp4j.smi;
23
24 /**
25  * The <code>Address</code> interface serves as a base class for all SNMP
26  * transport addresses.
27  * <p>
28  * Note: This class should be moved to package <code>org.snmp4j</code>
29  * in SNMP4J 2.0.
30  * </p>
31  *
32  * @author Frank Fock
33  * @version 1.7
34  */

35 public interface Address extends Comparable JavaDoc, AssignableFromString {
36
37   /**
38    * Checks whether this <code>Address</code> is a valid transport address.
39    * @return
40    * <code>true</code> if the address is valid, <code>false</code> otherwise.
41    */

42   boolean isValid();
43
44   /**
45    * Parses the address from the supplied string representation.
46    * @param address
47    * a String representation of this address.
48    * @return
49    * <code>true</code> if <code>address</code> could be successfully
50    * parsed and has been assigned to this address object, <code>false</code>
51    * otherwise.
52    */

53   boolean parseAddress(String JavaDoc address);
54
55   /**
56    * Sets the address value from the supplied String. The string must match
57    * the format required for the Address instance implementing this interface.
58    * Otherwise an {@link IllegalArgumentException} runtime exception is thrown.
59    * @param address
60    * an address String.
61    * @since 1.7
62    */

63   void setValue(String JavaDoc address);
64 }
65
66
Popular Tags