Class PipeClonerImpl
Since Pipes may form an arbitrary directed graph, someone needs
to keep track of isomorphism for a clone to happen correctly. This class
serves that role.
- Author:
- Kohsuke Kawaguchi
-
Field Summary
Fields inherited from class com.sun.xml.ws.api.pipe.TubeCloner
master2copy -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(AbstractTubeImpl original, AbstractTubeImpl copy) Disambiguation version.voidThePipeversion ofadd(Tube, Tube).voidThis method must be called from within the copy constructor to notify that the copy was created.<T extends Pipe>
Tcopy(T p) Pipeversion ofcopy(Tube)Methods inherited from class com.sun.xml.ws.api.pipe.PipeCloner
cloneMethods inherited from class com.sun.xml.ws.api.pipe.TubeCloner
clone
-
Constructor Details
-
PipeClonerImpl
public PipeClonerImpl() -
PipeClonerImpl
-
-
Method Details
-
copy
Pipeversion ofcopy(Tube)- Specified by:
copyin classPipeCloner
-
add
ThePipeversion ofadd(Tube, Tube).- Specified by:
addin classPipeCloner
-
add
Disambiguation version. -
add
Description copied from class:TubeClonerThis method must be called from within the copy constructor to notify that the copy was created.When your pipe has references to other pipes, it's particularly important to call this method before you start copying the pipes you refer to, or else there's a chance of inifinite loop.
- Specified by:
addin classTubeCloner
-
copy
Description copied from class:TubeClonerInvoked by aTube.copy(com.sun.xml.ws.api.pipe.TubeCloner)implementation to copy a reference to another pipe.This method is for
Tubeimplementations, not for users.If the given tube is already copied for this cloning episode, this method simply returns that reference. Otherwise it copies a tube, make a note, and returns a copied tube. This additional step ensures that a graph is cloned isomorphically correctly.
(Think about what happens when a graph is A->B, A->C, B->D, and C->D if you don't have this step.)
- Specified by:
copyin classTubeCloner- Parameters:
t- The tube to be copied.- Returns:
- The cloned tube. Always non-null.
-