Class ClassPathElementImpl

java.lang.Object
org.jppf.node.protocol.ClassPathElementImpl
All Implemented Interfaces:
Serializable, ClassPathElement

public class ClassPathElementImpl extends Object implements ClassPathElement
A simple implementation of the ClassPathElement interface.
Author:
Laurent Cohen
See Also:
  • Method Details

    • getName

      public String getName()
      Deprecated.
      the name attribute has no clearly defined, consistent semantics. It is no longer used.
      Get the name of this classpath element.
      Specified by:
      getName in interface ClassPathElement
      Returns:
      the name as a string.
    • getSourceLocation

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

      public 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.
      Specified by:
      getLocalLocation in interface ClassPathElement
      Returns:
      a Location object.
    • getTargetLocation

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

      public 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.
      Specified by:
      getRemoteLocation in interface ClassPathElement
      Returns:
      a Location object.
    • validate

      public boolean validate()
      This default implementation always return true.
      Specified by:
      validate in interface ClassPathElement
      Returns:
      true.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isCopyToExistingFile

      public boolean isCopyToExistingFile()
      Description copied from interface: ClassPathElement
      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.
      Specified by:
      isCopyToExistingFile in interface ClassPathElement
      Returns:
      false if the target is a file and should not be copied into, true otherwise.