Class RemoteRenderingClient

java.lang.Object
com.azure.mixedreality.remoterendering.RemoteRenderingClient

public final class RemoteRenderingClient extends Object
Client to communicate with remote rendering service.
  • Method Details

    • beginSession

      public SyncPoller<RenderingSession,RenderingSession> beginSession(String sessionId, BeginSessionOptions options)
      Creates a new rendering session.
      Parameters:
      sessionId - An ID uniquely identifying the rendering session for the given account. The ID is case sensitive, can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 256 characters.
      options - Options for the session to be created.
      Returns:
      the rendering session.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • beginSession

      public SyncPoller<RenderingSession,RenderingSession> beginSession(String sessionId)
      Creates a new rendering session.
      Parameters:
      sessionId - An ID uniquely identifying the rendering session for the given account. The ID is case sensitive, can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 256 characters.
      Returns:
      the rendering session.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • beginSession

      public SyncPoller<RenderingSession,RenderingSession> beginSession(String sessionId, BeginSessionOptions options, Context context)
      Creates a new rendering session.
      Parameters:
      sessionId - An ID uniquely identifying the rendering session for the given account. The ID is case sensitive, can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 256 characters.
      options - Options for the session to be created.
      context - The context to use.
      Returns:
      the rendering session.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • getSession

      public RenderingSession getSession(String sessionId)
      Gets properties of a particular rendering session.
      Parameters:
      sessionId - An ID uniquely identifying the rendering session for the given account. The ID is case sensitive, can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 256 characters.
      Returns:
      the rendering session.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • getSessionWithResponse

      public Response<RenderingSession> getSessionWithResponse(String sessionId, Context context)
      Gets properties of a particular rendering session.
      Parameters:
      sessionId - An ID uniquely identifying the rendering session for the given account. The ID is case sensitive, can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 256 characters.
      context - The context to use.
      Returns:
      the rendering session.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • updateSession

      public RenderingSession updateSession(String sessionId, UpdateSessionOptions options)
      Updates a particular rendering session.
      Parameters:
      sessionId - An ID uniquely identifying the rendering session for the given account. The ID is case sensitive, can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 256 characters.
      options - Options for the session to be updated.
      Returns:
      the rendering session.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • updateSessionWithResponse

      public Response<RenderingSession> updateSessionWithResponse(String sessionId, UpdateSessionOptions options, Context context)
      Updates a particular rendering session.
      Parameters:
      sessionId - An ID uniquely identifying the rendering session for the given account. The ID is case sensitive, can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 256 characters.
      options - Options for the session to be updated.
      context - The context to use.
      Returns:
      the rendering session.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • endSession

      public void endSession(String sessionId)
      Stops a particular rendering session.
      Parameters:
      sessionId - An ID uniquely identifying the rendering session for the given account. The ID is case sensitive, can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 256 characters.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • endSessionWithResponse

      public Response<Void> endSessionWithResponse(String sessionId, Context context)
      Stops a particular rendering session.
      Parameters:
      sessionId - An ID uniquely identifying the rendering session for the given account. The ID is case sensitive, can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 256 characters.
      context - The context to use.
      Returns:
      The response.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • listSessions

      public PagedIterable<RenderingSession> listSessions()
      Get a list of all rendering sessions.
      Returns:
      a list of all rendering sessions.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • listSessions

      public PagedIterable<RenderingSession> listSessions(Context context)
      Get a list of all rendering sessions.
      Parameters:
      context - The context to use.
      Returns:
      a list of all rendering sessions.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • beginConversion

      public SyncPoller<AssetConversion,AssetConversion> beginConversion(String conversionId, AssetConversionOptions options)
      Starts a conversion using an asset stored in an Azure Blob Storage account. If the remote rendering account has been linked with the storage account no Shared Access Signatures (storageContainerReadListSas, storageContainerWriteSas) for storage access need to be provided. Documentation how to link your Azure Remote Rendering account with the Azure Blob Storage account can be found in the [documentation](https://docs.microsoft.com/azure/remote-rendering/how-tos/create-an-account#link-storage-accounts).

      All files in the input container starting with the blobPrefix will be retrieved to perform the conversion. To cut down on conversion times only necessary files should be available under the blobPrefix.

      Parameters:
      conversionId - An ID uniquely identifying the conversion for the given account. The ID is case sensitive, can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 256 characters.
      options - The conversion options.
      Returns:
      the conversion.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • beginConversion

      public SyncPoller<AssetConversion,AssetConversion> beginConversion(String conversionId, AssetConversionOptions options, Context context)
      Starts a conversion using an asset stored in an Azure Blob Storage account. If the remote rendering account has been linked with the storage account no Shared Access Signatures (storageContainerReadListSas, storageContainerWriteSas) for storage access need to be provided. Documentation how to link your Azure Remote Rendering account with the Azure Blob Storage account can be found in the [documentation](https://docs.microsoft.com/azure/remote-rendering/how-tos/create-an-account#link-storage-accounts).

      All files in the input container starting with the blobPrefix will be retrieved to perform the conversion. To cut down on conversion times only necessary files should be available under the blobPrefix.

      Parameters:
      conversionId - An ID uniquely identifying the conversion for the given account. The ID is case sensitive, can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 256 characters.
      options - The conversion options.
      context - The context to use.
      Returns:
      the conversion.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • getConversion

      public AssetConversion getConversion(String conversionId)
      Gets the status of a previously created asset conversion.
      Parameters:
      conversionId - An ID uniquely identifying the conversion for the given account. The ID is case sensitive, can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 256 characters.
      Returns:
      the conversion.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • getConversionWithResponse

      public Response<AssetConversion> getConversionWithResponse(String conversionId, Context context)
      Gets the status of a previously created asset conversion.
      Parameters:
      conversionId - An ID uniquely identifying the conversion for the given account. The ID is case sensitive, can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 256 characters.
      context - The context to use.
      Returns:
      the conversion.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • listConversions

      public PagedIterable<AssetConversion> listConversions()
      Gets a list of all conversions.
      Returns:
      a list of all conversions.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • listConversions

      public PagedIterable<AssetConversion> listConversions(Context context)
      Gets a list of all conversions.
      Parameters:
      context - The context to use.
      Returns:
      a list of all conversions.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.