Interface ClassPathElement

All Superinterfaces:
Serializable
All Known Implementing Classes:
ClassPathElementImpl

public interface ClassPathElement extends Serializable
Instances of this class represent classpath elements that can be added dynamically to a JPPF class loader. The actual classpath element is a jar or zip file wrapped into, or pointed to by, a Location object. They are intended to be transported along with a job SLA.
Author:
Laurent Cohen
  • Method Details

    • getName

      String getName()
      Deprecated.
      the name attribute has no clearly definied, consistent semantics. It can be bypassed entirely.
      Get the name of this classpath element.
      Returns:
      the name as a string.
    • getSourceLocation

      Location<?> getSourceLocation()
      Get the location of this element, pointing to or embedding the underlying jar or zip file in the client environment.
      Returns:
      a Location object.
    • getLocalLocation

      Location<?> getLocalLocation()
      Deprecated.
      use getSourceLocation() instead.
      Get the location of this element, pointing to or embedding the underlying jar or zip file in the client environment.
      Returns:
      a Location object.
    • getTargetLocation

      Location<?> getTargetLocation()
      Get the location of this element, pointing to or embedding the underlying jar or zip file in the node environment.
      Returns:
      a Location object.
    • getRemoteLocation

      Location<?> getRemoteLocation()
      Deprecated.
      use getTargetLocation() instead.
      Get the location of this element, pointing to or embedding the underlying jar or zip file in the client environment.
      Returns:
      a Location object.
    • validate

      boolean validate()
      Perform a validation of this classpath element. If validation fails, if will not be added to the node's classpath and its classes will not be loaded nor executed.

      An example use is to check that a jar file is signed and that it is secure to use it.

      Returns:
      true if the validation issuccessful, false if it fails.
    • isCopyToExistingFile

      boolean isCopyToExistingFile()
      Determine whether to copy the source to the target if the target is a file and if it already exists on the file system.
      This applies to instances of FileLocation and instances of URLLocation whose URL protocol is "file".
      This is an optimization that can avoid unnecessary netword and/or disk I/O.
      Returns:
      false if the target is a file and should not be copied into, true otherwise.