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() {
313
313
SimplePipeRunnable r = SimplePipeHelper .getPipe (p .pipeKey );
314
314
if (r == null || !r .isPipeLive ()) {
315
315
if (now - p .lastLiveDetected > p .pipeWaitClosingInterval ()) {
316
+ p .pipeDestroy (); // Pipe's server side destroying
317
+ p .pipeClosed (); // Pipe's client side closing
316
318
synchronized (notifyingMutex ) {
317
319
notifyingPipes .remove (p );
318
320
}
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ public abstract class SimplePipeRunnable extends SimpleRPCRunnable {
66
66
long notifySequence = 1 ;
67
67
68
68
@ J2SIgnore
69
- int sequenceIndex ; // Index of last SimplePipeSequence in pipeData
69
+ int sequenceIndex ; // Index of first SimplePipeSequence in pipeData
70
70
71
71
@ J2SIgnore
72
72
int bufferedIndex ; // Index of last buffered object in pipeData, data before this object is sent
@@ -110,12 +110,12 @@ public List<SimpleSerializable> getPipeData() {
110
110
}
111
111
112
112
@ J2SIgnore
113
- public void setLastPipeSequenceIndex (int index ) {
113
+ public void setFirstPipeSequenceIndex (int index ) {
114
114
sequenceIndex = index ;
115
115
}
116
116
117
117
@ J2SIgnore
118
- public int getLastPipeSequenceIndex () {
118
+ public int getFirstPipeSequenceIndex () {
119
119
return sequenceIndex ;
120
120
}
121
121
@@ -139,6 +139,11 @@ public void setSequence(long sequence) {
139
139
pipeSequence = sequence ;
140
140
}
141
141
142
+ /**
143
+ * Monitoring to see if all events has been received and call #pipeDataOK.
144
+ *
145
+ * @return
146
+ */
142
147
@ J2SIgnore
143
148
public boolean isMonitoringEvents () {
144
149
return false ;
@@ -308,6 +313,15 @@ public void pipeFailed() {
308
313
pipeDestroy ();
309
314
}
310
315
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
+
311
325
/**
312
326
* The pipe is lost. Reasons may be server is down, physical connection
313
327
* is broken or client side failed to keep pipe alive.
You can’t perform that action at this time.
0 commit comments