this.bodyDataSource = bodyDataSource;
this.primarySink = primarySink;
this.secondarySink = secondarySink;
IBodyDestroyListener destroyListenerPrimary = new IBodyDestroyListener() {
public void onDestroyed() {
isPrimarySinkClosed.set(true);
handlePeerDestroy();
}
};
primarySink.setDestroyListener(destroyListenerPrimary);
IBodyDestroyListener destroyListenerSecondary = new IBodyDestroyListener() {
public void onDestroyed() {
isSecondarySinkClosed.set(true);
handlePeerDestroy();
}
};