com.ibm.datapower.wamt.amp
Class DeviceContext

java.lang.Object
  extended by com.ibm.datapower.wamt.amp.DeviceContext

public class DeviceContext
extends java.lang.Object

This provides the information/context necessary to identify a particular DataPower device for communicating with it, and have the authentication or other data necessary to connect to it. This should provide the context to invoke methods in Commands.


Field Summary
static java.lang.String COPYRIGHT_2009_2010
           
 
Constructor Summary
DeviceContext(java.lang.String hostname, int ampPort, java.lang.String userid, java.lang.String password)
          Create a new DeviceContext object.
 
Method Summary
 int getAMPPort()
          Get the device's port for AMP commands.
 java.lang.String getHostname()
          Get the device's hostname or IP address from this context.
 java.lang.String getPassword()
          Get the device's password for the administrative userid id from this context.
 java.lang.String getUserId()
          Get the device's administrative userid from this context.
 java.lang.String toString()
          Get a String representation of this object for the purpose of debugging and tracing.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

COPYRIGHT_2009_2010

public static final java.lang.String COPYRIGHT_2009_2010
See Also:
Constant Field Values
Constructor Detail

DeviceContext

public DeviceContext(java.lang.String hostname,
                     int ampPort,
                     java.lang.String userid,
                     java.lang.String password)
Create a new DeviceContext object. The following parameters are required.

Parameters:
hostname - the hostname or IP address of the device
ampPort - the device's port to connect to for AMP commands (XML Management Interface that has the AMP endpoint enabled). AMP is the Appliance Management Protocol.
userid - the device's administrative userid to execute AMP commands
password - the password for the above administrative userid
Method Detail

getHostname

public java.lang.String getHostname()
Get the device's hostname or IP address from this context.

Returns:
the device's hostname

getAMPPort

public int getAMPPort()
Get the device's port for AMP commands.

Returns:
the port number for AMP

getUserId

public java.lang.String getUserId()
Get the device's administrative userid from this context.

Returns:
the device's administrative userid. This userid can be used to both read and change the device's configuration.
See Also:
getPassword()

getPassword

public java.lang.String getPassword()
Get the device's password for the administrative userid id from this context.

Returns:
the device's password for the administrative userid. This password can be used with the administrative userid to both read and change the device's configuraiton.
See Also:
getUserId()

toString

public java.lang.String toString()
Get a String representation of this object for the purpose of debugging and tracing.

Overrides:
toString in class java.lang.Object
Returns:
a String representation of this object for the purpose of debugging and tracing.


© Copyright IBM Corp. 2006, 2010 All Rights Reserved.