Get the stream processor for a given stream ID, if it exists

@param streamID of the desired stream
@return a stream object if it's in the open stream table, or null if the
ID is new or has already been removed from the stream table
422105
public H2StreamProcessor getStream(int streamID) {
        H2StreamProcessor streamProcessor = null;

        streamProcessor = streamTable.get(streamID);
        return streamProcessor;
    }
367472
public Broadcast getBroadcast(String broadcastId) throws OpenTokException {
        if(StringUtils.isEmpty(broadcastId)) {
            throw new InvalidArgumentException("Broadcast id is null or empty");
        }
        String stream = this.client.getBroadcast(broadcastId);
        try {
            return broadcastReader.readValue(stream);
        } catch (Exception e) {
            throw new RequestException("Exception mapping json: " + e.getMessage());
        }
    }
246241
def get_child(self, streamId, childId, options={}):
        """"""
        return self.get('stream/' + streamId + '/children/' + childId, options)
692431
public int getChannelIdForStreamId(Number streamId) {
        int channelId = (int) (streamId.doubleValue() * 5) - 1;
        if (log.isTraceEnabled()) {
            log.trace("Channel id: {} requested for stream id: {}", channelId, streamId);
        }
        return channelId;
    }
593614
@Override
    public org.fcrepo.server.types.gen.MIMETypedStream getDatastreamDissemination(String pid,
                                                                                  String dsID,
                                                                                  String asOfDateTime) {
        MessageContext ctx = context.getMessageContext();
        Context context = ReadOnlyContext.getSoapContext(ctx);
        assertInitialized();
        try {
            org.fcrepo.server.storage.types.MIMETypedStream mimeTypedStream =
                    m_access.getDatastreamDissemination(context,
                                                        pid,
                                                        dsID,
                                                        DateUtility
                                                                .parseDateOrNull(asOfDateTime));
            org.fcrepo.server.types.gen.MIMETypedStream genMIMETypedStream =
                    TypeUtility
                            .convertMIMETypedStreamToGenMIMETypedStream(mimeTypedStream);
            return genMIMETypedStream;
        } catch (OutOfMemoryError oome) {
            LOG.error("Out of memory error getting " + dsID
                    + " datastream dissemination for " + pid);
            String exceptionText =
                    "The datastream you are attempting to retrieve is too large "
                            + "to transfer via getDatastreamDissemination (as determined "
                            + "by the server memory allocation.) Consider retrieving this "
                            + "datastream via REST at: ";
            String restURL =
                    describeRepository().getRepositoryBaseURL() + "/get/" + pid
                            + "/" + dsID;
            throw CXFUtility.getFault(new Exception(exceptionText + restURL));

        } catch (Throwable th) {
            LOG.error("Error getting datastream dissemination", th);
            throw CXFUtility.getFault(th);
        }
    }
112688
@SuppressWarnings("unchecked")
    public static <T> StreamingProcess<T> getStreamingProcess(T entity, InjectionManager manager) {
        for (StreamingProcess process : getStreamingProcesses(manager)) {
            if (process.isSupported(entity)) {
                return process;
            }
        }
        return null;
    }
1227435
public static String nativeEventsTableName(final StreamId streamId) {
        // User defined ID
        if (streamId instanceof JpaStreamId) {
            final JpaStreamId jpaId = (JpaStreamId) streamId;
            return jpaId.getNativeTableName();
        }
        // Default ID
        if (streamId.isProjection()) {
            return camel2Underscore(streamId.getName());
        }
        if (streamId.getParameters().size() == 0) {
            return NoParamsEvent.NO_PARAMS_EVENTS_TABLE;
        }
        return camel2Underscore(streamId.getName()) + "_events";
    }
393464
public static EditLogInputStream getInputStream(JournalManager jm, long txid)
      throws IOException {
    List<EditLogInputStream> streams = new ArrayList<EditLogInputStream>();
    jm.selectInputStreams(streams, txid, true, false);
    if (streams.size() < 1) {
      throw new IOException("Cannot obtain stream for txid: " + txid);
    }
    Collections.sort(streams, JournalSet.EDIT_LOG_INPUT_STREAM_COMPARATOR);
    
    // we want the "oldest" available stream
    if (txid == HdfsConstants.INVALID_TXID) {
      return streams.get(0);
    }
    
    // we want a specific stream
    for (EditLogInputStream elis : streams) {
      if (elis.getFirstTxId() == txid) {
        return elis;
      }
    }
    // we cannot obtain the stream
    throw new IOException("Cannot obtain stream for txid: " + txid);
  }
1350904
private boolean isStreamPresentAndWritable(int streamId) {
        final Http2Stream stream = encoder.connection().stream(streamId);
        if (stream == null) {
            return false;
        }

        switch (stream.state()) {
            case RESERVED_LOCAL:
            case OPEN:
            case HALF_CLOSED_REMOTE:
                return true;
            default:
                // The response has been sent already.
                return false;
        }
    }
89121
func (m *MockStream) StreamID() protocol.StreamID {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "StreamID")
	ret0, _ := ret[0].(protocol.StreamID)
	return ret0
}
479642
public static StreamBootstrapper getInstance(String pubId, SystemId sysId, InputStream in)
    {
        return new StreamBootstrapper(pubId, sysId, in);
    }
43230
public function getReadStreamStatus(int $id = null)
    {
        return $id ? $this->readStreamStatus[$id] : $this->readStreamStatus;
    }
127531
public static EntityGetOperation<StreamingEndpointInfo> get(String streamingEndpointId) {
        return new DefaultGetOperation<StreamingEndpointInfo>(ENTITY_SET, streamingEndpointId,
                StreamingEndpointInfo.class);
    }
1220174
@Override
    public CompletableFuture<StreamSegmentRecord> getSegment(final long segmentId) {
        // extract epoch from segment id.
        // fetch epoch record for the said epoch
        // extract segment record from it.
        int epoch = StreamSegmentNameUtils.getEpoch(segmentId);
        return getEpochRecord(epoch)
                .thenApply(epochRecord -> {
                    Optional<StreamSegmentRecord> segmentRecord = epochRecord.getSegments().stream()
                                                                             .filter(x -> x.segmentId() == segmentId).findAny();
                    return segmentRecord
                            .orElseThrow(() -> StoreException.create(StoreException.Type.DATA_NOT_FOUND,
                                    "segment not found in epoch"));
                });
    }
611662
public H2StreamProcessor startNewInboundSession(Integer streamID) {
        H2StreamProcessor h2s = null;
        h2s = muxLink.createNewInboundLink(streamID);
        return h2s;
        // call the stream processor with the data it needs to then call "ready" are the underlying HttpInboundLink
        // (what H2HttpInboundLinkWrap for the stream is wrapping)
        // h2s.startNewInboundLink(....);
    }
1006808
public boolean dispose(Long streamId) {
    boolean result = false;
    if (streamId != null) {
      Disposable disposable = subscriptions.remove(streamId);
      result = disposable != null;
      if (result) {
        LOGGER.debug("Dispose subscription by sid={}, session={}", streamId, id);
        disposable.dispose();
      }
    }
    return result;
  }
472326
public OutboundMsgHolder getInFlightMessage(int streamId) {
        if (LOG.isDebugEnabled()) {
            LOG.debug("Getting in flight message for stream id: {} from channel: {}", streamId, this);
        }
        return inFlightMessages.get(streamId);
    }