com.ibm.retail.si.mgmt.swdist
Interface MgmtSoftwareDistClientMBean


public interface MgmtSoftwareDistClientMBean

This interface represents defines the MBean interface for use on the client side of Software Distribution within the SIF environment. This intent of this interface is NOT to replicate a full software distribution entity, but rather to, in the controlled world of SIF, provide a way to signal a device, or class of devices that either an update is ready, or a new package is available for installation. In short, this is just a signalling mechanism. It remains the responsibility of the target device to understand how to unpack, and install the packages. Additionally, since this triggering mechanism is predicated on FTP, it is assumed that the target device will act as the FTP client, and that the FTP server is accessible by the client.

The ObjectName of this MBean includes the following attributes, in addition to the SIF attribute of DeviceID:

This management interface includes the following attributes. These attributes are described in more detail in the accessor methods.

The following operations are included in this management interface. These are described in more detail in the corresponding method documentation.

This MBean emits a MgmtSDProgressNotification after each percentage interval increment has passed, and a MgmtSDCompletionNotification when an installation has completed.

Author:
Paul Ruocchio
See Also:
MgmtSDProgressNotification, MgmtSDCompletionNotification

Field Summary
static java.lang.String OBJECT_NAME
           
 
Method Summary
 int distributePackage(com.ibm.retail.si.mgmt.swdist.MgmtSftPackage swPackage, java.lang.String HostPath, java.lang.String ClientPath, long size, int intervalPercentage)
          Issue the command to distribute a package.
 long getFreeSpace(java.lang.String Device)
          Get the amount of free space currently available on the target device on the client.
 java.lang.String getHost()
          Get the host information currently set for this device.
 java.lang.String getPending()
          Used to determine if there is a pending (deferred) distribution on this client.
 boolean isBusy()
          Used to determine if distribution engine is currently performing a distrbution/install.
 int removePackage(com.ibm.retail.si.mgmt.swdist.MgmtSftPackage swPackage, java.lang.String HostPath, java.lang.String ClientPath, long size, int intervalPercentage)
          Issue the command to remove or uninstal a package.
 int setFTPServerInfo(java.lang.String Host, int Port, java.lang.String UserID, java.lang.String Password)
          Set the FTP Server information to be used by this device.
 int testServer()
          Tests the FTP parameters, and the path to the server.
 

Field Detail

OBJECT_NAME

public static final java.lang.String OBJECT_NAME
See Also:
Constant Field Values
Method Detail

getHost

public java.lang.String getHost()
Get the host information currently set for this device. This can be either a host name, or an IP address in dotted decimal notation.

Returns:
String, the currently set host information, wither as a hostname, or dotted decimal IP address.

setFTPServerInfo

public int setFTPServerInfo(java.lang.String Host,
                            int Port,
                            java.lang.String UserID,
                            java.lang.String Password)
Set the FTP Server information to be used by this device.

Returns:
String, the currently set host information, wither as a hostname, or dotted decimal IP address.

testServer

public int testServer()
Tests the FTP parameters, and the path to the server.

Returns:
int, return code return codes listed above.

getFreeSpace

public long getFreeSpace(java.lang.String Device)
Get the amount of free space currently available on the target device on the client. This is for use by the management tools to determine if there is enough space to carry out a distribution.

Returns:
long, the amount of free space in bytes.

distributePackage

public int distributePackage(com.ibm.retail.si.mgmt.swdist.MgmtSftPackage swPackage,
                             java.lang.String HostPath,
                             java.lang.String ClientPath,
                             long size,
                             int intervalPercentage)
Issue the command to distribute a package. This will cause the client to create an FTP session with the server based on the Server information previously set. The client will then pull down the package in question, and install it. IF a value other then 0 is set for hte intervalPetcentage, then a MgmtSDProgressNotification will be sent for each "percentage" interval completed. Irregradless of that, the function will send a MgmtSDCompletionNotification when the operation has either completed successfully, or failed. If the client chooses to defer the distribution, then it should indicate that on the return from this function. NOTE: this function ALWAYS returns immediately with either a good return code, deferred code, or error. All subsequent information is passed to the caller by means of notifications.

Returns:
int - Immediate return code, as defined in MgmtConst

removePackage

public int removePackage(com.ibm.retail.si.mgmt.swdist.MgmtSftPackage swPackage,
                         java.lang.String HostPath,
                         java.lang.String ClientPath,
                         long size,
                         int intervalPercentage)
Issue the command to remove or uninstal a package. This will cause the client to create an FTP session with the server - if required, based on the Server information previously set. The client will then pull down the package in question, and remove it. IF a value other then 0 is set for hte intervalPetcentage, then a MgmtSDProgressNotification will be sent for each "percentage" interval completed. Irregradless of that, the function will send a MgmtSDCompletionNotification when the operation has either completed successfully, or failed. If the client chooses to defer the removal, then it should indicate that on the return from this function. NOTE: this function ALWAYS returns immediately with either a good return code, deferred code, or error. All subsequent information is passed to the caller by means of notifications.

Returns:
int - Immediate return code, as defined in MgmtConst

getPending

public java.lang.String getPending()
Used to determine if there is a pending (deferred) distribution on this client.

Returns:
String, If NON-NULL then this is the name of the package that is pending for distribution on the client.

isBusy

public boolean isBusy()
Used to determine if distribution engine is currently performing a distrbution/install.

Returns:
boolean


Copyright © 2004 IBM. All Rights Reserved.
Generated: July 19 2004