BEA Systems, Inc.

WebLogic Server 5.1.0 API Reference

weblogic.zac
Class ZACLog

java.lang.Object
  |
  +--weblogic.zac.ZACLog

public class ZACLog
extends java.lang.Object

Provides a log record of each update/launch event for each ZAC directory.

Author:
Copyright (c) 1998 by WebLogic, Inc. All Rights Reserved., Copyright (c) 1999 by BEA WebXpress. All Rights Reserved.
Copyright © 2000 BEA Systems, Inc. All Rights Reserved.

Field Summary
static int UPDATE_FAILURE
          Returned by the getUpdateStatus() method.
static int UPDATE_NONE
          Returned by the getUpdateStatus() method.
static int UPDATE_SUCCESS
          Returned by the getUpdateStatus() method.
 
Method Summary
 java.io.File getLocalDirectory()
          Returns the local directory where a ZAC package is stored.
 long getUpdateByteCount()
          Returns the total number of bytes transferred in the last download/update sequence.
 java.lang.Throwable getUpdateFailure()
          Returns the Exception/Error that was encountered during the last download/update sequence for a ZAC package.
 java.lang.String getUpdateFailureString()
          Returns the entire stack trace of an update failure (probably when it is printed out later, most likely in a GUI) for exceptions raised in cases where there is a mix of classes both with and without classloaders on the stack.
 int getUpdateFileCount()
          Returns the number of files that were updated in a package during the last download/update sequence.
 java.util.Enumeration getUpdateFileList()
          Returns an Enumeration of java.lang.String objects that is a list of all files that were created/updated during the last update, if any.
static java.util.Enumeration getUpdateLogs()
          Returns an Enumeration of ZACLog object(s), one for each ZAC package in the current application's set of dependencies.
 int getUpdateStatus()
          Returned by the getUpdateStatus() method.
 java.lang.String getZACHost()
          Returns the hostname of the publishing WebLogic Server from which a ZAC package is programmed to download.
 java.lang.String getZACName()
          Returns the name by which a ZAC package is known.
 int getZACPort()
          Returns the listen port of the publishing WebLogic Server from which a ZAC package is programmed to download.
 java.lang.String toString()
          Returns a descriptive string for a ZAC status.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UPDATE_SUCCESS

public static final int UPDATE_SUCCESS
Returned by the getUpdateStatus() method. Indicates the update/download was successful. Calling the getUpdateFileCount() method after a successful update/download will indicate how many files were updated, and the getUpdateFileList() method will return an enumeration of all the affected files for a package.

UPDATE_FAILURE

public static final int UPDATE_FAILURE
Returned by the getUpdateStatus() method. Indicates the update failed. Call the getUpdateFailure() method to discover what exception was raised during ZAC update.

UPDATE_NONE

public static final int UPDATE_NONE
Returned by the getUpdateStatus() method. Indicates that no implicit download/update was performed at invocation time, so there is no further update status to report. Automatic updates are enabled/disabled through the ZAC properties specified in the PublishTool that created the bootstrap program.
Method Detail

getUpdateLogs

public static java.util.Enumeration getUpdateLogs()
Returns an Enumeration of ZACLog object(s), one for each ZAC package in the current application's set of dependencies. Each ZACLog provides information about whether the package has been updated. If the update was successful, the log will indicate how many files were updated and provide a list of which files. If an update failed, the log will indicate why it failed.

Returns:
One or more ZACLogs

getUpdateStatus

public int getUpdateStatus()
Returned by the getUpdateStatus() method. Indicates how an update of this ZAC package went during the last download/update sequence. This will return one of the final static ints in this class for:

Returns:
Int status

getUpdateFileCount

public int getUpdateFileCount()
Returns the number of files that were updated in a package during the last download/update sequence. Call the getUpdateFileList() method for an Enumeration of files which have changed.

Returns:
Number of updated files

getUpdateFileList

public java.util.Enumeration getUpdateFileList()
Returns an Enumeration of java.lang.String objects that is a list of all files that were created/updated during the last update, if any. Each String will be a path name relative to the local, installed ZAC directory for a package, as specified by the getLocalDirectory() method. An application may get the absolute path to the file by constructing a java.io.File with the return of the getLocalDirectory() method as the parent directory, and the relative path as the path argument:

ZACLog zl;
 ...
 Enumeration enum = zl.getUpdateFileList();
 File zacroot = zl.getLocalDirectory();
 while (enum.hasMoreElements()) {
   String path = (String)enum.nextElement();
   File updated = new File(zacroot, path);
   System.out.println("Updated: " + updated.getAbsolutePath());
 }

Returns:
Enumerated string list of files
See Also:
getLocalDirectory()

getUpdateByteCount

public long getUpdateByteCount()
Returns the total number of bytes transferred in the last download/update sequence.

Returns:
Byte count as a long

getZACName

public java.lang.String getZACName()
Returns the name by which a ZAC package is known.

Returns:
String name of package

getZACHost

public java.lang.String getZACHost()
Returns the hostname of the publishing WebLogic Server from which a ZAC package is programmed to download.

Returns:
Publishing WebLogic Server

getZACPort

public int getZACPort()
Returns the listen port of the publishing WebLogic Server from which a ZAC package is programmed to download.

getLocalDirectory

public java.io.File getLocalDirectory()
Returns the local directory where a ZAC package is stored.

getUpdateFailure

public java.lang.Throwable getUpdateFailure()
Returns the Exception/Error that was encountered during the last download/update sequence for a ZAC package. If no failure occurred, null is returned.

getUpdateFailureString

public java.lang.String getUpdateFailureString()
Returns the entire stack trace of an update failure (probably when it is printed out later, most likely in a GUI) for exceptions raised in cases where there is a mix of classes both with and without classloaders on the stack.

Returns:
Stack trace of update failure exception

toString

public java.lang.String toString()
Returns a descriptive string for a ZAC status.

Returns:
Status message
Overrides:
toString in class java.lang.Object

Documentation is available at
http://www.weblogic.com/docs51