@Override
 protected TransportAction[] getCurrentTransportActions(UnsignedIntegerFourBytes instanceId)
     throws Exception {
   AVTransportStateMachine stateMachine = findStateMachine(instanceId);
   try {
     return stateMachine.getCurrentState().getCurrentTransportActions();
   } catch (TransitionException ex) {
     return new TransportAction[0];
   }
 }
  public void setNextAVTransportURI(
      UnsignedIntegerFourBytes instanceId, String nextURI, String nextURIMetaData)
      throws AVTransportException {

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

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