Node Director
Public Member Functions | Protected Member Functions | Static Protected Attributes | List of all members
sfi.director.application.FilePackageHandler Class Reference
Inheritance diagram for sfi.director.application.FilePackageHandler:
sfi.director.application.PackageHandler sfi.director.util.FWManagerDriver sfi.director.util.FWManagerDriver sfi.director.application.DEBPackageHandler sfi.director.application.Director3PackageHandler sfi.director.application.INFAppUpdatePackageHandler sfi.director.application.RPMPackageHandler sfi.director.application.SUNPackageHandler sfi.director.application.SUNPatchPackageHandler

Public Member Functions

 FilePackageHandler (String name)
String name ()
Vector pkgFromFile (String filename, sfi.director.util.Options opts)
PackageInstaller installerFor (DBObject pkg, DBObject repository, DBObject host)
 returns an PackageInstaller object if package can be installed by this handler, null otherwise.
JobNode installPkg (FilePackageInstaller installer, DBObject pkg, DBObject repository, DBObject host)
 return a job installing exactly one package.
JobNode removePkg (FilePackageInstaller installer, DBObject pkg, DBObject repository, DBObject host)
 return a job removing exactly one package.
JobNode flushPkgs (FilePackageInstaller installer, DBObject host)
 return a job cleaning up after successfull install/remove.
JobNode cleanupPkgs (FilePackageInstaller installer, DBObject host)
 return a job cleaning up after unsuccessfull install/remove.
void setupJob (RemoteJob job, DBObject pkg, DBObject repository, DBObject host)
boolean accept (RemoteJob job)
Connection connect (final RemoteJob job)
Vector inventory ()
- Public Member Functions inherited from sfi.director.application.PackageHandler
Vector pkgFromFile (String filename, Options opts)
- Public Member Functions inherited from sfi.director.util.FWManagerDriver
Connection connect (RemoteJob job)

Protected Member Functions

boolean isResponsibleFor (DBObject pkg, DBObject repository, DBObject host)
 returns true if handler feels responsible for this type of packages.
PackageInstaller installer ()
PackageInstaller simpleInstaller ()
JobNode makeJob (String mode, FilePackageInstaller installer, DBObject pkg, DBObject repository, DBObject host)
void install (RemoteJob job) throws DirectorException
void remove (RemoteJob job) throws DirectorException
void flush (RemoteJob job) throws DirectorException
void targetRemovePkgs (Vector pkgs) throws DirectorException
 remove a whole bunch of packages.
void targetInstallPkgs (Vector pkgs) throws DirectorException
 install a whole bunch of packages.
void cleanup (RemoteJob job) throws DirectorException
String listFileName (RemoteJob job) throws DirectorException
void addToList (RemoteJob job, String mode) throws DirectorException
void addToList (RemoteJob job, String mode, File file) throws DirectorException
DBSet readList (RemoteJob job) throws DirectorException
void makeAndRunCommand (String cmdroot[], Vector args) throws DirectorException

Static Protected Attributes

static String MODE_INSTALL = "install"
static String MODE_REMOVE = "remove"
static String MODE_FLUSH = "flush"
static String MODE_CLEANUP = "cleanup"

Constructor & Destructor Documentation

sfi.director.application.FilePackageHandler.FilePackageHandler ( String  name)

Member Function Documentation

boolean sfi.director.application.FilePackageHandler.accept ( RemoteJob  job)
void sfi.director.application.FilePackageHandler.addToList ( RemoteJob  job,
String  mode 
) throws DirectorException
protected
void sfi.director.application.FilePackageHandler.addToList ( RemoteJob  job,
String  mode,
File  file 
) throws DirectorException
protected
void sfi.director.application.FilePackageHandler.cleanup ( RemoteJob  job) throws DirectorException
protected
JobNode sfi.director.application.FilePackageHandler.cleanupPkgs ( FilePackageInstaller  installer,
DBObject  host 
)
Connection sfi.director.application.FilePackageHandler.connect ( final RemoteJob  job)
void sfi.director.application.FilePackageHandler.flush ( RemoteJob  job) throws DirectorException
protected
JobNode sfi.director.application.FilePackageHandler.flushPkgs ( FilePackageInstaller  installer,
DBObject  host 
)

return a job cleaning up after successfull install/remove.

The job is run after all the installPkg() jobs have successfully completed. Some FilePackageHandlers will only copy the packages over in a temp dir or will remember its URL during install()/remove() and will only actually install or remove packages during the flush() stage.

References sfi.director.application.FilePackageHandler.makeJob(), and sfi.director.application.FilePackageHandler.MODE_FLUSH.

Referenced by sfi.director.application.FilePackageInstaller.flush().

void sfi.director.application.FilePackageHandler.install ( RemoteJob  job) throws DirectorException
protected
PackageInstaller sfi.director.application.FilePackageHandler.installer ( )
protected
PackageInstaller sfi.director.application.FilePackageHandler.installerFor ( DBObject  pkg,
DBObject  repository,
DBObject  host 
)
JobNode sfi.director.application.FilePackageHandler.installPkg ( FilePackageInstaller  installer,
DBObject  pkg,
DBObject  repository,
DBObject  host 
)
Vector sfi.director.application.FilePackageHandler.inventory ( )
boolean sfi.director.application.FilePackageHandler.isResponsibleFor ( DBObject  pkg,
DBObject  repository,
DBObject  host 
)
protected
String sfi.director.application.FilePackageHandler.listFileName ( RemoteJob  job) throws DirectorException
protected
void sfi.director.application.FilePackageHandler.makeAndRunCommand ( String  cmdroot[],
Vector  args 
) throws DirectorException
protected
JobNode sfi.director.application.FilePackageHandler.makeJob ( String  mode,
FilePackageInstaller  installer,
DBObject  pkg,
DBObject  repository,
DBObject  host 
)
protected
String sfi.director.application.FilePackageHandler.name ( )
Vector sfi.director.application.FilePackageHandler.pkgFromFile ( String  filename,
sfi.director.util.Options  opts 
)
DBSet sfi.director.application.FilePackageHandler.readList ( RemoteJob  job) throws DirectorException
protected
void sfi.director.application.FilePackageHandler.remove ( RemoteJob  job) throws DirectorException
protected
JobNode sfi.director.application.FilePackageHandler.removePkg ( FilePackageInstaller  installer,
DBObject  pkg,
DBObject  repository,
DBObject  host 
)
void sfi.director.application.FilePackageHandler.setupJob ( RemoteJob  job,
DBObject  pkg,
DBObject  repository,
DBObject  host 
)
PackageInstaller sfi.director.application.FilePackageHandler.simpleInstaller ( )
protected
void sfi.director.application.FilePackageHandler.targetInstallPkgs ( Vector  pkgs) throws DirectorException
protected

install a whole bunch of packages.

This method is run on target side if the default install()/remove()/flush() methods are active.

Reimplemented in sfi.director.application.DEBPackageHandler, and sfi.director.application.RPMPackageHandler.

Referenced by sfi.director.application.FilePackageHandler.flush().

void sfi.director.application.FilePackageHandler.targetRemovePkgs ( Vector  pkgs) throws DirectorException
protected

remove a whole bunch of packages.

This method is run on target side if the default install()/remove()/flush() methods are active.

Reimplemented in sfi.director.application.DEBPackageHandler, and sfi.director.application.RPMPackageHandler.

Referenced by sfi.director.application.FilePackageHandler.flush().

Member Data Documentation

String sfi.director.application.FilePackageHandler.MODE_CLEANUP = "cleanup"
staticprotected
String sfi.director.application.FilePackageHandler.MODE_FLUSH = "flush"
staticprotected
String sfi.director.application.FilePackageHandler.MODE_INSTALL = "install"
staticprotected
String sfi.director.application.FilePackageHandler.MODE_REMOVE = "remove"
staticprotected

The documentation for this class was generated from the following file: