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
-
Information()
-
-
clone()
- Clone the object.
-
UseProxy(String address, int port)
- Set the Proxy server address that will be used for the communications.
-
UseProxy(String address)
- Set the Proxy server address that will be used for the
communications. The default Proxy port (1998) is used.
-
SetAttribute(String name, Object value)
- Add an entry inside the hashtable.
-
GetAttribute(String name)
- Retrieve the attribute whose key is name.
-
RemoveAttribute(String name)
- Remove from the hastable the attribute whose key is name.
-
GetAttributes()
- Return the list of attribute values contained in the hashtable.
-
GetAttributeKeys()
- Return the list of attribute id contained in the hashtable.
-
RemoveAllAttributes()
- Clean up the hashtable.
-
CopyValue(Information in)
- Copy the input instance inside the instance itself.
-
toString()
- Covert the instance to a String. Mostly used in order to print the instance.
-
marshall()
- Marshall the data in a sequence of HTTP encoded elements (id=value&...)
-
GetProxyBindingsVersion()
- Return the current version of the bindings (useful for versioning purposes).
Information
public Information()
- Creates an Information instance
clone
public Information clone()
- Clone the object.
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
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
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
GetAttribute
public Object GetAttribute(String name)
- Retrieves the attribute whose key is name.
- Parameters:
- name - the attribute Id
RemoveAttribute
public void RemoveAttribute(String name)
- Removes, if part of the hashtable, the attribute whose key is name.
- Parameters:
- name - the attribute Id
GetAttributes
public Enumeration GetAttributes()
- Returns the list of attribute values contained in the hashtable.
- Returns:
- The list of attribute values.
GetAttributeKeys
public Enumeration GetAttributeKeys()
- Returns the list of attribute keys contained in the hashtable.
- Returns:
- The list of attribute keys.
RemoveAllAttributes
public void RemoveAllAttributes()
- Cleans up the hashtable.
CopyValue
public void CopyValue(Information in)
- Copies the input instance inside the instance itself.
- Parameters:
- in - the instance to copy
toString
public synchronized String toString()
- Coverts the instance to a String.
marshall
public synchronized String marshall()
- Marshalls the data in a sequence of HTTP encoded elements (id=value&...).
- Returns:
- A string containing the marshalled data.
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