public void setAVTransportURI(
      UnsignedIntegerFourBytes instanceId, String currentURI, String currentURIMetaData)
      throws AVTransportException {

    URI uri;
    try {
      uri = new URI(currentURI);
    } catch (Exception ex) {
      throw new AVTransportException(
          ErrorCode.INVALID_ARGS, "CurrentURI can not be null or malformed");
    }

    try {
      AVTransportStateMachine transportStateMachine = findStateMachine(instanceId, true);
      transportStateMachine.setTransportURI(uri, currentURIMetaData);
    } catch (TransitionException ex) {
      throw new AVTransportException(
          AVTransportErrorCode.TRANSITION_NOT_AVAILABLE, ex.getMessage());
    }
  }