Interface ProxyInfo

All Known Implementing Classes:
DefaultProxyInfo

public interface ProxyInfo
Information about an available proxy process to connect to.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Information about process that should be executed when initializing a proxy.
  • Method Summary

    Modifier and Type
    Method
    Description
    Access an optional ProxyInfo.Exec implementation giving information about the process that should be executed when initializing this proxy.
    default boolean
    Check whether the proxy is running on the same (local) machine.
    boolean
    matches(String rootID, org.praxislive.core.ComponentType rootType)
    Check whether this proxy should be used for creating and accessing the given root ID and root type.
    default List<Class<? extends org.praxislive.core.services.Service>>
    List of services that should be delegated to this proxy.
    Access the socket address to use to connect to the proxy.
  • Method Details

    • socketAddress

      SocketAddress socketAddress()
      Access the socket address to use to connect to the proxy.
      Returns:
      socket address
    • isLocal

      default boolean isLocal()
      Check whether the proxy is running on the same (local) machine. By default this method returns true if the socket address is an instance of InetSocketAddress and is using the loopback address. See InetAddress.isLoopbackAddress().
      Returns:
      true if proxy is local
    • matches

      boolean matches(String rootID, org.praxislive.core.ComponentType rootType)
      Check whether this proxy should be used for creating and accessing the given root ID and root type. The order of provided proxies is important as the first matching proxy will take precedence.
      Parameters:
      rootID - root ID to match against
      rootType - root type to match against
      Returns:
      true if this proxy should be used for this ID and type
    • exec

      default Optional<ProxyInfo.Exec> exec()
      Access an optional ProxyInfo.Exec implementation giving information about the process that should be executed when initializing this proxy.
      Returns:
      optional exec
    • services

      default List<Class<? extends org.praxislive.core.services.Service>> services()
      List of services that should be delegated to this proxy. The proxy will be registered as a provider of that service. The order of provided proxies is important, as later registrations supersede earlier ones.

      This method forms the reverse of NetworkCoreFactory.Builder.exposeServices(java.util.List).

      By default this method returns an empty list.

      Returns:
      list of delegated services