Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

WebLogic Server 6.0sp2 API Reference

## weblogic.zac
Class ZAC

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

public class ZAC
extends java.lang.Object
implements weblogic.drp.events.ProgressListener, weblogic.drp.common.DRPConstants

This class encapsulates the ZAC kernel API. The main method of this class takes the following options:

     $ java weblogic.ZAC [options]
          -help              This information
          -verbose           Debugging information while running (false)
          -host [host name]  WebLogic Server host name (localhost)
          -port [port]       WebLogic Server port number (7001)
          -name [name]       OSD application name, required
          -user [username]   WebLogic username for ZAC access
          -pass [password]   WebLogic password for ZAC access
          -dir [local dir]   Local directory path for application (./[name])
          -nolaunch          Disable launch
          -noupdate          Disable update
          -noprogress        Don't show progress window
         (c) 1998-99 BEA Systems, Inc.

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

Field Summary
`static int` | `ZAC_EXIT_RESTART` If the current application was loaded by a ZAC bootstrapper executable, an exit value of `ZAC_EXIT_RESTART` will cause the current application to be relaunched identically to the current runtime.

Constructor Summary
`ZAC(java.lang.String host, int port, java.lang.String applicationName, java.io.File localDirectory)` Creates a new ZAC without a progress listener.
`ZAC(java.lang.String host, int port, java.lang.String applicationName, java.io.File localDirectory, weblogic.drp.events.ProgressListener pl)` Creates a new ZAC with a progress listener.
`ZAC(java.net.URL url, java.lang.String applicationName, java.io.File localDirectory, weblogic.drp.events.ProgressListener pl)` Creates a new ZAC with a progress listener that connects to the WebLogic Server at the specified URL.

Method Summary
`void` | `delete()` Deletes a ZAC application (currently unimplemented).
`java.lang.ClassLoader` | `getClassLoader()` Returns the classloader responsible for loading all the classes of a ZAC instance.
`java.lang.String` | `getClasspath()` Gets the system CLASSPATH associated with a ZAC package and its dependencies.
`static ZAC` | `getCurrentZAC()` Gets the ZAC instance that loaded the currently running ZAC program.
`java.io.File` | `getInstallDirectory()` Gets the install directory associated with a published package.
`java.io.File` | `getLocalDirectory()` Gets the local directory associated with a published package.
`protected weblogic.osd.Pakage` | `getPackage()`
`java.lang.String` | `getPackageName()` Returns the package name of a ZAC package.
`ZACLog` | `getZACLog()` Get the ZACLog associated with the last update session.
`void` | `launch()` Launches a ZAC application.
`static boolean` | `loadedByZAC()` Returns true if ZAC has launched the currently running application (i.e., the caller of this method).
`void` | `loadLocalSubZacs()` Loads all local dependencies without initiating any network IO.
`static void` | `main(java.lang.String[] args)` Updates the application listed on the command line and then launches the application.
`void` | `postUpdate()` Invokes the post-update hook, if any.
`void` | `preUpdate()` Invokes the pre-update hook, if any.
`void` | `progressChanged(weblogic.drp.events.ProgressEvent pe)` Updates the progress listener for a ZAC package to a "changed" state.
`void` | `progressDone(weblogic.drp.events.ProgressEvent pe)` Updates the progress listener for a ZAC package to a "done" state.
`void` | `progressStarting(weblogic.drp.events.ProgressEvent pe)` Updates the progress listener for a ZAC package to a "starting" state.
`void` | `setDoUpdate(boolean b)` Sets whether the ZAC package does automatic updating.
`void` | `setProgressListener(weblogic.drp.events.ProgressListener pl)` Sets the progress listener for a ZAC package.
`void` | `update()` `update()` will sync the local directory of this ZAC object with the current state of the package on the server.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ZAC_EXIT_RESTART

    public static final int ZAC_EXIT_RESTART

  If the current application was loaded by a ZAC bootstrapper executable, an exit value of `ZAC_EXIT_RESTART` will cause the current application to be relaunched identically to the current runtime.

Constructor Detail

### ZAC

    public ZAC(java.lang.String host,
               int port,
               java.lang.String applicationName,
               java.io.File localDirectory,
               weblogic.drp.events.ProgressListener pl)

  Creates a new ZAC with a progress listener.

  Parameters:
    `host` - Hostname of publishing WebLogic Server
    `port` - Port at which WebLogic is listening for login requests
    `applicationName` - Name of the published application
    `localDirectory` - Location on client's machine where downloaded files should be stored
    `pl` - Listener for progress

### ZAC

    public ZAC(java.lang.String host,
               int port,
               java.lang.String applicationName,
               java.io.File localDirectory)

  Creates a new ZAC without a progress listener.

  Parameters:
    `host` - Hostname of publishing WebLogic Server
    `port` - Port at which WebLogic is listening for login requests
    `applicationName` - Name of the published application
    `localDirectory` - Location on client's machine where downloaded files should be stored

### ZAC

    public ZAC(java.net.URL url,
               java.lang.String applicationName,
               java.io.File localDirectory,
               weblogic.drp.events.ProgressListener pl)

  Creates a new ZAC with a progress listener that connects to the WebLogic Server at the specified URL.

  Parameters:
    `url` - URL for publishing WebLogic Server
    `applicationName` - Name of the published application
    `localDirectory` - Location on client's machine where downloaded files should be stored
    `pl` - Listener for progress

Method Detail

### getLocalDirectory

    public java.io.File getLocalDirectory()

  Gets the local directory associated with a published package.

  Returns:
    File path

### getInstallDirectory

    public java.io.File getInstallDirectory()

  Gets the install directory associated with a published package.

  Returns:
    File path

### loadedByZAC

    public static boolean loadedByZAC()

  Returns true if ZAC has launched the currently running application (i.e., the caller of this method). If false, it usually means that the classes for the current application were not loaded by ZAC, but rather came from the system CLASSPATH.

  Returns:
    True if loaded by ZAC

### getCurrentZAC

    public static ZAC getCurrentZAC()

  Gets the ZAC instance that loaded the currently running ZAC program. If the current program was not loaded by ZAC (i.e., the classes for that program are in the system CLASSPATH) this method returns `null`.

  Returns:
    Current ZAC instance or null

### main

    public static void main(java.lang.String[] args)
                     throws java.lang.Exception

  Updates the application listed on the command line and then launches the application. If this method is called without arguments, it will run successfully only if the system properties `zac.system.home` and `zac.name` have been set.

  Parameters:
    `args` - The command line arguments
  Throws:
    java.lang.Exception - if there is an error

### getZACLog

    public ZACLog getZACLog()

  Get the ZACLog associated with the last update session. One must call update() before the ZACLog object will contain any useful data.

### loadLocalSubZacs

    public void loadLocalSubZacs()

  Loads all local dependencies without initiating any network IO. If any needed OSD file is not present, causes an error.

### update

    public void update()

  `update()` will sync the local directory of this ZAC object with the current state of the package on the server. The server is determined by the hostname and port that this ZAC object was created with. After `update()` is called, one can review the ZACLog as returned by getZACLog() to see how the update went. The ZACLog will tell how many files were updated, the names of those files, or, if the update failed, why it failed.

### preUpdate

    public void preUpdate()

  Invokes the pre-update hook, if any.

### postUpdate

    public void postUpdate()

  Invokes the post-update hook, if any.

### delete

    public void delete()

  Deletes a ZAC application (currently unimplemented).

### launch

    public void launch()
                throws java.lang.Exception

  Launches a ZAC application.

  Throws:
    java.lang.Exception - if there is any problem

### getClassLoader

    public java.lang.ClassLoader getClassLoader()

  Returns the classloader responsible for loading all the classes of a ZAC instance.

  Returns:
    ClassLoader object

### getPackage

    protected weblogic.osd.Pakage getPackage()
                                      throws weblogic.xml.parser.ParseException,
                                             java.io.IOException

### getClasspath

    public java.lang.String getClasspath()
                                  throws weblogic.xml.parser.ParseException,
                                         java.io.IOException

  Gets the system CLASSPATH associated with a ZAC package and its dependencies.

  Returns:
    CLASSPATH
  Throws:
    weblogic.xml.parser.ParseException - if there is an error in the CLASSPATH
    java.io.IOException - if there is an IO error

### progressStarting

    public void progressStarting(weblogic.drp.events.ProgressEvent pe)

  Updates the progress listener for a ZAC package to a "starting" state.
  Specified by:
    progressStarting in interface weblogic.drp.events.ProgressListener

  Parameters:
    `pe` - ProgressEvent

### progressChanged

    public void progressChanged(weblogic.drp.events.ProgressEvent pe)

  Updates the progress listener for a ZAC package to a "changed" state.
  Specified by:
    progressChanged in interface weblogic.drp.events.ProgressListener

  Parameters:
    `pe` - ProgressEvent

### progressDone

    public void progressDone(weblogic.drp.events.ProgressEvent pe)

  Updates the progress listener for a ZAC package to a "done" state.
  Specified by:
    progressDone in interface weblogic.drp.events.ProgressListener

  Parameters:
    `pe` - ProgressEvent

### setProgressListener

    public void setProgressListener(weblogic.drp.events.ProgressListener pl)

  Sets the progress listener for a ZAC package.

  Parameters:
    `pl` - ProgressListener

### setDoUpdate

    public void setDoUpdate(boolean b)

  Sets whether the ZAC package does automatic updating. param b True sets for updating

### getPackageName

    public java.lang.String getPackageName()

  Returns the package name of a ZAC package.

  Returns:
    Package name

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs60
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD