protected AbstractFilterPipeImpl(AbstractFilterPipeImpl that, PipeCloner cloner) { super(that, cloner); this.next = cloner.copy(that.next); assert next!=null; }
protected final NextAction doInvoke(Tube next, Packet packet) { NextAction na = new NextAction(); na.invoke(next,packet); return na; }
protected final NextAction doInvokeAndForget(Tube next, Packet packet) { NextAction na = new NextAction(); na.invokeAndForget(next,packet); return na; }
/** * Basis for the copy constructor. * * <p> * This registers the newly created {@link Pipe} with the {@link PipeCloner} * through {@link PipeCloner#add(Pipe, Pipe)}. */ protected AbstractPipeImpl(Pipe that, PipeCloner cloner) { cloner.add(that,this); }
/** * Indicates that the next action is to abort the processResponse chain * because of an exception. How that exception is processed is not * defined. * * @param t * Either {@link RuntimeException} or {@link Error} */ public void throwExceptionAbortResponse(Throwable t) { set(THROW_ABORT_RESPONSE,null,null,t); }
/** * Indicates that the fiber should be suspended. * Once {@link Fiber#resume(Packet) resumed}, resume with the * {@link Tube#processRequest(Packet)} on the given next tube. * @deprecated Use variants that pass {@link Runnable} */ public void suspend(Tube next) { suspend(next, null); }
/** * Initiate the interception, and eventually invokes {@link Fiber#__doRun()}. */ Tube invoke(Tube next) { idx = 0; return execute(next); }
/** * Returns the Container in which the client is running * * @return Container in which client is running */ public Container getContainer() { return wrappedContext.getContainer(); }
/** * Copy constructor for {@link Tube#copy(TubeCloner)}. */ protected HandlerTube(HandlerTube that, TubeCloner cloner) { super(that,cloner); if(that.cousinTube != null) { this.cousinTube = cloner.copy(that.cousinTube); } this.port = that.port; this.binding = that.binding; }
protected ServerTubeAssemblerContext createServerTubeAssemblerContext( EndpointAwareTube terminalTube, boolean isSynchronous) { ServerTubeAssemblerContext ctx = new ServerPipeAssemblerContext( seiModel, port, this, terminalTube, isSynchronous); return ctx; }
/** * Copy constructor. */ protected AbstractTubeImpl(AbstractTubeImpl that, TubeCloner cloner) { cloner.add(that,this); }
/** * If this server pipeline is known to be used for serving synchronous transport, * then this method returns true. This can be potentially use as an optimization * hint, since often synchronous versions are cheaper to execute than asycnhronous * versions. */ public boolean isSynchronous() { return wrappedContext.isSynchronous(); }
public void preDestroy() { if(transport!=null) { transport.preDestroy(); transport = null; address = null; } }
/** * @deprecated * Use {@link #create(ClassLoader, BindingID, Container)} */ public static TubelineAssembler create(ClassLoader classLoader, BindingID bindingId) { return create(classLoader,bindingId,null); }
/** * Indicates that the next action should be to * invoke the next tube's {@link Tube#processRequest(Packet)}, * but the current tube doesn't want to receive the response packet to * its {@link Tube#processResponse(Packet)}. */ public void invokeAndForget(Tube next, Packet p) { set(INVOKE_AND_FORGET, next, p, null); }
/** * Indicates that the fiber should be suspended. * Once {@link Fiber#resume(Packet) resumed}, return the response processing. * @deprecated Use variants that pass {@link Runnable} */ public void suspend() { suspend(null, null); }
/** * Indicates that the next action is to invoke the next tube in the * tubeline async from the thread that started the tubeline. Only fibers * that were started using startSync should use this next action kind. * @param next The next tube in the tubeline * @param p The request to pass to the next tube */ public void invokeAsync(Tube next, Packet p) { set(INVOKE_ASYNC,next,p,null); }