Class Connection

  • All Implemented Interfaces:
    LocationSerializable
    Direct Known Subclasses:
    TypedConnection

    public abstract class Connection
    extends java.lang.Object
    implements LocationSerializable
    Represents a connection based on a componentId and the type of connection offered by the component

    param: connectionType represents a type of connection offered by the Component

    • Constructor Detail

    • Method Detail

      • from

        public static Connection from​(java.lang.String input)
        Create a Connection from provided String input

        Parameters:
        input - is the string representation of connection e.g. TromboneAssembly-assembly-akka
        Returns:
        a Connection model created from string
      • from

        public static Connection from​(ConnectionInfo connectionInfo)
        Create a Connection from provided ConnectionInfo

        Parameters:
        connectionInfo - represents component name, component type and connection type
        Returns:
        A Connection created from connectionInfo
      • connectionReads

        public static play.api.libs.json.Reads<Connection> connectionReads()
      • connectionWrites

        public static play.api.libs.json.Writes<Connection> connectionWrites()
      • componentId

        public abstract ComponentId componentId()
        The component that is providing this connection
        Returns:
        (undocumented)
      • connectionInfo

        public ConnectionInfo connectionInfo()
        Returns a ConnectionInfo which represents component name, component type and connection type for this Connection
        Returns:
        (undocumented)
      • name

        public java.lang.String name()
        Creates a unique name for Connection based on Component name, ComponentType and ConnectionType
        Returns:
        (undocumented)
      • of

        public <T extends LocationTypedConnection<T> of()
        A helper method to cast this Connection to TypedConnection

        Returns:
        A TypedConnection casted from this Connection