Interface HostContextAccessor


public interface HostContextAccessor
Interface for accessing host information, meant to be exposed as a host component
  • Method Details

    • getComponentsOfType

      <T> Map<String,T> getComponentsOfType(Class<T> iface)
      Gets all beans of a given type
      Parameters:
      iface - The interface to use
      Returns:
      A map of String keys and object instances
    • doInTransaction

      <T> T doInTransaction(HostContextAccessor.HostTransactionCallback<T> callback)
      Runs an action in a transaction and returns a optional value.
      Parameters:
      callback - The callback class to execute
      Returns:
      Optional result of the operation. May be null
      Throws:
      RuntimeException - if anything went wrong. The caller will be responsible for rolling back.