Package org.jppf.node.protocol
Interface ClassPath
- All Superinterfaces:
Iterable<ClassPathElement>,Serializable
- All Known Implementing Classes:
ClassPathImpl
A container for class path elements.
- Author:
- Laurent Cohen
-
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Deprecated.thenameattribute has no clearly definied, consistent semantics.Add the specified element to this classpath.Add the specified element to this classpath.Add the specified element to this classpath.add(ClassPathElement element) Add the specified element to this classpath.Get a collection of all the classpath elements in this classpath.clear()Empty this classpath (remove all classpath elements).Deprecated.thenameattribute has no clearly definied, consistent semantics.booleanisEmpty()Determine whether this classpath is empty.booleanDetermine whether the node should force a reset of the class loader before executing the tasks.Deprecated.thenameattribute has no clearly definied, consistent semantics.remove(ClassPathElement element) Remove the specified element from this classpath.setForceClassLoaderReset(boolean forceReset) Specify whether the node should force a reset of the class loader before executing the tasks.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
add
Add the specified element to this classpath.- Parameters:
element- the classpath element to add.- Returns:
- this
ClassPath.
-
add
Add the specified element to this classpath. When using this method, the local and remote locations are assumed to be the same.- Parameters:
location- the location of the element to add.- Returns:
- this
ClassPath, for method call chaining.
-
add
Add the specified element to this classpath. Upon processing by the node, the local location will be copied into the remote location.- Parameters:
sourceLocation- the location of the element to add, in the client environment.targetLocation- the location of the element to add, in the node environment.- Returns:
- this
ClassPath, for method call chaining.
-
add
Add the specified element to this classpath. Upon processing by the node, the local location will be copied into the remote location, unless all of the following are true:- copyToExistingFile is
false - targetLocation is a
FileLocation - the file pointed to by targetLocation already exists on the file system
- Parameters:
sourceLocation- the location of the element to add, in the client environment.targetLocation- the location of the element to add, in the node environment.copyToExistingFile- whether to copy the source to the target if the target is either aFileLocationor anURLLocationwith afileURL protocol (e.g.file:/home/user/mylib.jar), and if it already exists on the file system.- Returns:
- this
ClassPath, for method call chaining.
- copyToExistingFile is
-
add
Deprecated.thenameattribute has no clearly definied, consistent semantics. It is no longer used. Useadd(location)instead.Add the specified element to this classpath. When using this method, the local and remote locations are assumed to be the same.- Parameters:
name- the the name of the element to add.location- the location of the element to add.- Returns:
- this
ClassPath, for method call chaining.
-
add
Deprecated.thenameattribute has no clearly definied, consistent semantics. It is no longer used. Useadd(sourceLocation, remoteLocation)instead.Add the specified element to this classpath. Upon processing by the node, the source location will be copied into the target location.- Parameters:
name- the the name of the element to add.sourceLocation- the location of the element to add, in the client environment.targetLocation- the location of the element to add, in the node environment.- Returns:
- this
ClassPath, for method call chaining.
-
remove
Remove the specified element from this classpath.- Parameters:
element- the classpath element to remove.- Returns:
- this
ClassPath, for method call chaining.
-
remove
Deprecated.thenameattribute has no clearly definied, consistent semantics. It is no longer used. Useremove(ClassPathElement)instead.Remove the specified element from this classpath.- Parameters:
name- the name of the classpath element to remove.- Returns:
- this
ClassPath, for method call chaining.
-
clear
ClassPath clear()Empty this classpath (remove all classpath elements).- Returns:
- this
ClassPath, for method call chaining.
-
element
Deprecated.thenameattribute has no clearly definied, consistent semantics. It is no longer used.Get the element with the specified name.- Parameters:
name- the name of the classpath element to find.- Returns:
- a
ClassPathElementinstance ornullif the element could no be found.
-
allElements
Collection<ClassPathElement> allElements()Get a collection of all the classpath elements in this classpath.- Returns:
- a
CollectionofClassPathElements.
-
isEmpty
boolean isEmpty()Determine whether this classpath is empty.- Returns:
trueif this classpath has no element,falseotherwise.
-
isForceClassLoaderReset
boolean isForceClassLoaderReset()Determine whether the node should force a reset of the class loader before executing the tasks.This only applies when this classpath is empty. If it is not empty, then the reset will occur regardless the value of this flag.
- Returns:
trueif the class loader reset should be forced,falseotherwise.
-
setForceClassLoaderReset
Specify whether the node should force a reset of the class loader before executing the tasks.This only applies when this classpath is empty. If it is not empty, then the reset will occur regardless the value of the specified flag.
- Parameters:
forceReset-trueif the class loader reset should be forced,falseotherwise.- Returns:
- this
ClassPath, for method call chaining.
-
nameattribute has no clearly definied, consistent semantics.