Class Information

Class Information

java.lang.Object
   |
   +----Information

public class Information
extends Object
This class is used to store information about instances and their attributes. It is based on a hashtable where each entry is a couple [attributeId, attributeValue]. Attributes (id and value) are represented using strings.
See Also:
CMIPObj, SNMPObj

Constructor Index

 o Information()

Method Index

 o clone()
Clone the object.
 o UseProxy(String address, int port)
Set the Proxy server address that will be used for the communications.
 o UseProxy(String address)
Set the Proxy server address that will be used for the communications. The default Proxy port (1998) is used.
 o SetAttribute(String name, Object value)
Add an entry inside the hashtable.
 o GetAttribute(String name)
Retrieve the attribute whose key is name.
 o RemoveAttribute(String name)
Remove from the hastable the attribute whose key is name.
 o GetAttributes()
Return the list of attribute values contained in the hashtable.
 o GetAttributeKeys()
Return the list of attribute id contained in the hashtable.
 o RemoveAllAttributes()
Clean up the hashtable.
 o CopyValue(Information in)
Copy the input instance inside the instance itself.
 o toString()
Covert the instance to a String. Mostly used in order to print the instance.
 o marshall()
Marshall the data in a sequence of HTTP encoded elements (id=value&...)
 o GetProxyBindingsVersion()
Return the current version of the bindings (useful for versioning purposes).

Constructors

 o Information
  public Information()
Creates an Information instance

Methods

 o clone
  public Information clone()
Clone the object.
 o UseProxy
  public void UseProxy(String addr, int port)
      throws UnknownHostException, IOException
Sets the Proxy server address that will be used for the communications.
Parameters:
addr - the TCP/IP address of the host where the Proxy runs
int - the TCP/IP port where the Proxy listens
Throws: UnknownHostException, IOException
It is thrown if the host is unknown or if there have been some communication problems
 o UseProxy
  public void UseProxy(String addr)
      throws UnknownHostException, IOException
Sets the Proxy server address that will be used for the communications. It is assumed that the Proxy listens at the default port (1998).
Parameters:
addr - the TCP/IP address of the host where the Proxy runs
Throws: UnknownHostException, IOException
It is thrown if the host is unknown or if there have been some communication problems
 o SetAttribute
  public void SetAttribute(String name, Object value) throws IllegalArgumentException
Adds an entry inside the hashtable.
Parameters:
name - the attribute Id
value - the attribute value
Throws: IllegalArgumentException
It is thrown if the attribute value is not a valid string
 o GetAttribute
  public Object GetAttribute(String name)
Retrieves the attribute whose key is name.
Parameters:
name - the attribute Id
 o RemoveAttribute
  public void RemoveAttribute(String name)
Removes, if part of the hashtable, the attribute whose key is name.
Parameters:
name - the attribute Id
 o GetAttributes
  public Enumeration GetAttributes()
Returns the list of attribute values contained in the hashtable.
Returns:
The list of attribute values.
 o GetAttributeKeys
  public Enumeration GetAttributeKeys()
Returns the list of attribute keys contained in the hashtable.
Returns:
The list of attribute keys.
 o RemoveAllAttributes
  public void RemoveAllAttributes()
Cleans up the hashtable.
 o CopyValue
  public void CopyValue(Information in)
Copies the input instance inside the instance itself.
Parameters:
in - the instance to copy
 o toString
  public synchronized String toString()
Coverts the instance to a String.
 o marshall
  public synchronized String marshall()
Marshalls the data in a sequence of HTTP encoded elements (id=value&...).
Returns:
A string containing the marshalled data.
 o GetProxyBindingsVersion
  public int String GetProxyBindingsVersion()
Returns the current version of the bindings (useful for versioning purposes). Note that the version is not hardcoded in the bindings but it's returned by the Proxy. Make sure that you call GetProxyBindingsVersion() on an object on which you've called the UseProxy() method already.
Returns:
The bindings version (Integer) returned by the Proxy.

Last modified: Thu Mar 6 11:58:36 MET 1997