Package org.jppf.node.protocol
Interface ClassPathElement
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
ClassPathElementImpl
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 Summary
Modifier and TypeMethodDescriptionLocation<?>Deprecated.getName()Deprecated.thenameattribute has no clearly definied, consistent semantics.Location<?>Deprecated.usegetTargetLocation()instead.Location<?>Get the location of this element, pointing to or embedding the underlying jar or zip file in the client environment.Location<?>Get the location of this element, pointing to or embedding the underlying jar or zip file in the node environment.booleanDetermine whether to copy the source to the target if the target is a file and if it already exists on the file system.booleanvalidate()Perform a validation of this classpath element.
-
Method Details
-
getName
String getName()Deprecated.thenameattribute 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
Locationobject.
-
getLocalLocation
Location<?> getLocalLocation()Deprecated.usegetSourceLocation()instead.Get the location of this element, pointing to or embedding the underlying jar or zip file in the client environment.- Returns:
- a
Locationobject.
-
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
Locationobject.
-
getRemoteLocation
Location<?> getRemoteLocation()Deprecated.usegetTargetLocation()instead.Get the location of this element, pointing to or embedding the underlying jar or zip file in the client environment.- Returns:
- a
Locationobject.
-
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:
trueif the validation issuccessful,falseif 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 ofFileLocationand instances ofURLLocationwhose URL protocol is "file".
This is an optimization that can avoid unnecessary netword and/or disk I/O.- Returns:
falseif the target is a file and should not be copied into,trueotherwise.
-
getSourceLocation()instead.