add Channel.join()

This commit is contained in:
Shikhar Bhushan
2010-08-13 23:01:35 +01:00
parent 7ccd078e52
commit c8de9ed915
2 changed files with 9 additions and 1 deletions

View File

@@ -83,7 +83,7 @@ public abstract class AbstractChannel
/** Channel open event */
protected final Event<ConnectionException> open;
/** Channel close event */
private final Event<ConnectionException> close;
protected final Event<ConnectionException> close;
/* Access to these fields should be synchronized using this object */
private boolean eofSent;
@@ -267,6 +267,11 @@ public abstract class AbstractChannel
}
}
public void join()
throws ConnectionException {
close.await();
}
protected synchronized void sendClose()
throws TransportException {
try {

View File

@@ -135,4 +135,7 @@ public interface Channel
*/
void setAutoExpand(boolean autoExpand);
void join()
throws ConnectionException;
}