コード例 #1
0
 private void deadvertiseStream() {
   // Don't deadvertise if we're shutting down
   if (!mina.getCCM().isShuttingDown()) {
     List<String> streamIds = new ArrayList<String>();
     streamIds.add(streamId);
     UnAdvSource uas = UnAdvSource.newBuilder().addAllStreamId(streamIds).build();
     mina.getCCM().sendMessageToNetwork("UnAdvSource", uas);
   }
 }
コード例 #2
0
 /**
  * Checks to see if we still want sources, and if we don't, notifies the network
  *
  * @syncpriority 200
  */
 private boolean checkWantingSources() {
   // Don't do anything if we are shutting down, when we disconnect the
   // supernode will figure it out
   if (mina.getCCM().isShuttingDown()) return false;
   boolean wantingSources = false;
   synchronized (this) {
     wantingSources = ((listeners.size() != 0) || receiving);
   }
   if (!wantingSources) mina.getSourceMgr().dontWantSources(streamId);
   return wantingSources;
 }