File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed
sources/net.sf.j2s.ajax/ajaxpipe/net/sf/j2s/ajax Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -313,6 +313,8 @@ public void run() {
313313 SimplePipeRunnable r = SimplePipeHelper .getPipe (p .pipeKey );
314314 if (r == null || !r .isPipeLive ()) {
315315 if (now - p .lastLiveDetected > p .pipeWaitClosingInterval ()) {
316+ p .pipeDestroy (); // Pipe's server side destroying
317+ p .pipeClosed (); // Pipe's client side closing
316318 synchronized (notifyingMutex ) {
317319 notifyingPipes .remove (p );
318320 }
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ public abstract class SimplePipeRunnable extends SimpleRPCRunnable {
6666 long notifySequence = 1 ;
6767
6868 @ J2SIgnore
69- int sequenceIndex ; // Index of last SimplePipeSequence in pipeData
69+ int sequenceIndex ; // Index of first SimplePipeSequence in pipeData
7070
7171 @ J2SIgnore
7272 int bufferedIndex ; // Index of last buffered object in pipeData, data before this object is sent
@@ -110,12 +110,12 @@ public List<SimpleSerializable> getPipeData() {
110110 }
111111
112112 @ J2SIgnore
113- public void setLastPipeSequenceIndex (int index ) {
113+ public void setFirstPipeSequenceIndex (int index ) {
114114 sequenceIndex = index ;
115115 }
116116
117117 @ J2SIgnore
118- public int getLastPipeSequenceIndex () {
118+ public int getFirstPipeSequenceIndex () {
119119 return sequenceIndex ;
120120 }
121121
@@ -139,6 +139,11 @@ public void setSequence(long sequence) {
139139 pipeSequence = sequence ;
140140 }
141141
142+ /**
143+ * Monitoring to see if all events has been received and call #pipeDataOK.
144+ *
145+ * @return
146+ */
142147 @ J2SIgnore
143148 public boolean isMonitoringEvents () {
144149 return false ;
@@ -308,6 +313,15 @@ public void pipeFailed() {
308313 pipeDestroy ();
309314 }
310315
316+ /**
317+ * Pipe is connected.
318+ * For server side, client has already connected to server.
319+ * For client side, server has responded.
320+ */
321+ public void pipeConnected () {
322+
323+ }
324+
311325 /**
312326 * The pipe is lost. Reasons may be server is down, physical connection
313327 * is broken or client side failed to keep pipe alive.
You can’t perform that action at this time.
0 commit comments