Interface IMediaTransportProvider


public interface IMediaTransportProvider
IMediaTransportProvider enables data objects to be transported to the defined destination.
  • Field Details

    • TRANSPORT_PROVIDER_PROCESS_SYNC

      static final int TRANSPORT_PROVIDER_PROCESS_SYNC
      See Also:
    • TRANSPORT_PROVIDER_PROCESS_ASYNC

      static final int TRANSPORT_PROVIDER_PROCESS_ASYNC
      See Also:
    • TRANSPORT_PROVIDER_DEFAULT_PROCESS

      static final int TRANSPORT_PROVIDER_DEFAULT_PROCESS
      See Also:
  • Method Details

    • setTransportProviderConfiguration

      void setTransportProviderConfiguration(IMediaTransportProviderConfiguration configuration)
      Set the configuration for this transport provider
      Parameters:
      IMediaTransportProviderConfiguration -
    • getTransportProviderConfiguration

      IMediaTransportProviderConfiguration getTransportProviderConfiguration()
      Get the configuration for this transport provider
      Returns:
      IMediaTransportProviderConfiguration
    • init

      void init()
      Initialise this transport provider. This should ONLY be called AFTER the configuration has been added so to allow any custom initialisation from the configuration provided.
    • setDebug

      void setDebug(boolean debug)
      Set the debug flag. By default it should be false
      Parameters:
      boolean -
    • getDebug

      boolean getDebug()
      Get the debug flag set.
      Returns:
      boolean
    • setTransportProcessType

      void setTransportProcessType(int type)
      Set the processing type for this provider. It should be set as MediaTransportProviderBase.TRANSPORT_PROVIDER_PROCESS_SYNC or MediaTransportProviderBase.TRANSPORT_PROVIDER_PROCESS_ASYNC The provider MUST provide both synchronous and asynchronous delivery types.
      Parameters:
      type -
    • getTransportProcessType

      int getTransportProcessType()
      Get the transport type used by this provider.
      Returns:
      int
    • setTransportProviderName

      void setTransportProviderName(String methodName)
      Set the name of this transport provider. This name is passed to the IMediaTransportProviderListener if implemented when objects have been processed.
      Parameters:
      String -
    • getTransportProviderName

      String getTransportProviderName()
      Get the transport provider name.
      Returns:
      String
    • setThreadPoolSize

      void setThreadPoolSize(int threadpoolsize)
      If you have configured the transport provider to use ASYNC processing then you should also define a thread pool size.
      Parameters:
      int -
    • addTransportObject

      boolean addTransportObject(IMediaTransportDataObject transportDataObject)
      This method gets called by the IMediaTransport object when a data object is added for transport. If this transport provider does not want to handle this object it should return false If you have configured the transport provider to use ASYNC processing then you need to add this to your pool of executors to process.
      Parameters:
      IMediaTransportDataObject -
      Returns:
      boolean
    • transportObject

      IMediaTransportResponse transportObject(IMediaTransportObject transportObject)
      This is called when the provider attempts to transport the object. It MUST return an IMediaTransportResponse object.
      Parameters:
      IMediaTransportObject -
      Returns:
      IMediaTransportResponse
    • addProviderListener

      void addProviderListener(IMediaTransportProviderListener providerlistener)
      This adds a transport provider listener which has the following calls onTransportObjectStatus This is triggered when a transport provider attempts to transport an object.
      Parameters:
      IMediaTransportProviderListener -
    • removeProviderListener

      void removeProviderListener(IMediaTransportProviderListener providerlistener)
      This removes a transport provider listener.
      Parameters:
      IMediaTransportProviderListener -
    • isReady

      boolean isReady()
      This should return true if the transport provider is ready to use.
      Returns:
    • setIsReady

      void setIsReady(boolean ready)
      Set the state of the transport provider.
      Parameters:
      ready -