© 2001 BEA Systems, Inc.


com.bea.p13n.management.data
Class DirectoryDataSync

java.lang.Object
  |
  +--com.bea.p13n.management.data.DirectoryDataSync

public class DirectoryDataSync
extends java.lang.Object

This class synchronizes a directory on disk with a running WLS server.


Constructor Summary
DirectoryDataSync(java.lang.String rootDirectory, java.lang.String url, java.lang.String realm, java.lang.String login, java.lang.String password, com.bea.p13n.management.data.repository.SynchronizationListener listener)
          Creates an object capable of synchronizing the data in a directory on the file system with that within a running WLS server.
 
Method Summary
static void main(java.lang.String[] args)
          Main method for running the directory synchronization utility.
 void sync(java.lang.String syncMode)
          Synchronizes the data on the file system with that in a running WLS server instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectoryDataSync

public DirectoryDataSync(java.lang.String rootDirectory,
                         java.lang.String url,
                         java.lang.String realm,
                         java.lang.String login,
                         java.lang.String password,
                         com.bea.p13n.management.data.repository.SynchronizationListener listener)
                  throws java.lang.NumberFormatException,
                         DataManagementException,
                         java.lang.IllegalArgumentException
Creates an object capable of synchronizing the data in a directory on the file system with that within a running WLS server. Call the sync method to perform the synchronization.

Parameters:
rootDirectory - the root directory on the file system to be sychronized
url - the synchronization URL in the form http://localhost:7501/datasync/DataSyncServlet
realm - the realm in which the user should be authenticated.
login - the login name to use for HTTP authentication.
password - the password to use for HTTP authentication.
listener - the SynchronizationListener on which to make perform callbacks as results of a data synchronization are parsed.
Method Detail

sync

public void sync(java.lang.String syncMode)
          throws com.bea.p13n.management.data.message.MessageException,
                 com.bea.p13n.management.data.repository.PersistenceException
Synchronizes the data on the file system with that in a running WLS server instance.

Parameters:
syncMode - the mode to use. One of: SynchronizerFactory.ONE_WAY_FROM_CLIENT ("one-way-from-client") or SynchronizerFactory.REFRESH_FROM_CLIENT ("refresh-from-client")

The ONE_WAY_FROM_CLIENT mode will only send the created/updated or deleted files to the server to minimize bandwidth.

The REFRESH_FROM_CLIENT mode will clear the data from the server and send all the data on the file system. This mode should be used to recover from an earlier failure.


main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Main method for running the directory synchronization utility.

© 2001 BEA Systems, Inc.

Copyright © 2001 BEA Systems, Inc. All Rights Reserved