code: private TargetStream createStream(StreamSet streamSet,
                                int priority,
                                Reliability reliability) throws SIResourceException
  
    {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.entry(
          tc,
          "createStream",
          new Object[] { streamSet, Integer.valueOf(priority), reliability });
  
      TargetStream stream = null;
  
      if(reliability.compareTo(Reliability.BEST_EFFORT_NONPERSISTENT) <= 0)
      {
        stream = new ExpressTargetStream(deliverer,
          streamSet.getRemoteMEUuid(), streamSet.getStreamID());
      }
      else
      {
        //Warning - this assumes that ASSURED is always the highest Reliability
        //and that UNKNOWN is always the lowest (0).
        stream = new GuaranteedTargetStream(
                          deliverer,
                          upControl,
                          am,
                          streamSet,
                          priority, //priority
                          reliability, //reliability
                          new ArrayList(),
                          messageProcessor);
      }
  
      streamSet.setStream(priority, reliability, stream);
  
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.exit(tc, "createStream", stream);
  
      return stream;
    }
docs: Create a new TargetStream in the given StreamSet
  
  @param streamSet
  @param priority
  @param reliability
  @return a new TargetStream
  @throws SIResourceException