public Set<String> getSourceNodeIds() { Set<String> result = mina.getSourceMgr().getReadyNodeIds(streamId); for (ConnectionPair lcp : streamConns.getAllListenConns()) { result.add(lcp.getCC().getNodeDescriptor().getId()); } return result; }
/** Returns a list of node ids */ public synchronized List<String> getConnectedSources() { ConnectionPair[] lcs = streamConns.getAllListenConns(); List<String> result = new ArrayList<String>(lcs.length); for (int i = 0; i < lcs.length; i++) { result.add(lcs[i].getCC().getNodeId()); } return result; }
/** @syncpriority 200 */ public synchronized void stopReception() { log.info("Stopping reception for stream " + streamId); if (!receiving) // Leftover thread return; receiving = false; // If we're still wanting to hear about sources, keep track of the ones we're receiving from if (checkWantingSources()) { for (LCPair lcp : streamConns.getAllListenConns()) { mina.getSourceMgr() .cacheSourceUntilReady(lcp.getLastSourceStatus(), lcp.getLastStreamStatus()); } } streamConns.closeAllListenConns(); }