Package org.jppf.node.protocol
Class ClassPathElementImpl
java.lang.Object
org.jppf.node.protocol.ClassPathElementImpl
- All Implemented Interfaces:
Serializable,ClassPathElement
A simple implementation of the
ClassPathElement interface.- Author:
- Laurent Cohen
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionLocation<?>Deprecated.getName()Deprecated.thenameattribute has no clearly defined, 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.toString()booleanvalidate()This default implementation always return true.
-
Method Details
-
getName
Deprecated.thenameattribute has no clearly defined, consistent semantics. It is no longer used.Get the name of this classpath element.- Specified by:
getNamein interfaceClassPathElement- Returns:
- the name as a string.
-
getSourceLocation
Description copied from interface:ClassPathElementGet the location of this element, pointing to or embedding the underlying jar or zip file in the client environment.- Specified by:
getSourceLocationin interfaceClassPathElement- Returns:
- a
Locationobject.
-
getLocalLocation
Deprecated.usegetSourceLocation()instead.Get the location of this element, pointing to or embedding the underlying jar or zip file in the client environment.- Specified by:
getLocalLocationin interfaceClassPathElement- Returns:
- a
Locationobject.
-
getTargetLocation
Description copied from interface:ClassPathElementGet the location of this element, pointing to or embedding the underlying jar or zip file in the node environment.- Specified by:
getTargetLocationin interfaceClassPathElement- Returns:
- a
Locationobject.
-
getRemoteLocation
Deprecated.usegetTargetLocation()instead.Get the location of this element, pointing to or embedding the underlying jar or zip file in the client environment.- Specified by:
getRemoteLocationin interfaceClassPathElement- Returns:
- a
Locationobject.
-
validate
public boolean validate()This default implementation always return true.- Specified by:
validatein interfaceClassPathElement- Returns:
true.
-
toString
-
isCopyToExistingFile
public boolean isCopyToExistingFile()Description copied from interface:ClassPathElementDetermine 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.- Specified by:
isCopyToExistingFilein interfaceClassPathElement- Returns:
falseif the target is a file and should not be copied into,trueotherwise.
-
getSourceLocation()instead.