Package org.jbpm.workflow.core.impl

## Class ConnectionImpl

- java.lang.Object
- - org.jbpm.workflow.core.impl.ConnectionImpl

- All Implemented Interfaces:
    `Serializable`, `Connection`, `org.kie.api.definition.process.Connection`

      public class ConnectionImpl
      extends Object
      implements Connection, Serializable

  Default implementation of a connection.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ConnectionImpl()` |
    `ConnectionImpl​(org.kie.api.definition.process.Node from, String fromType, org.kie.api.definition.process.Node to, String toType)` | This constructor calls `connect()` itself!

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `connect()` |
    `org.kie.api.definition.process.Node` | `getFrom()` |
    `String` | `getFromType()` |
    `Map<String,​Object>` | `getMetaData()` |
    `Object` | `getMetaData​(String name)` |
    `org.kie.api.definition.process.Node` | `getTo()` |
    `String` | `getToType()` |
    `void` | `setFrom​(org.kie.api.definition.process.Node from)` |
    `void` | `setFromType​(String fromType)` |
    `void` | `setMetaData​(String name, Object value)` |
    `void` | `setTo​(org.kie.api.definition.process.Node to)` |
    `void` | `setToType​(String toType)` |
    `void` | `terminate()` |
    `String` | `toString()` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ConnectionImpl

          public ConnectionImpl()

    - #### ConnectionImpl

          public ConnectionImpl​(org.kie.api.definition.process.Node from,
                                String fromType,
                                org.kie.api.definition.process.Node to,
                                String toType)

      This constructor calls `connect()` itself! That means that simply creating the object also adds it to the appropriate `List` fields in other objects. Creates a new connection, given a from node, a to node and a type.
      Parameters:
        `from` - The from node
        `fromType` - The node type
        `to` - The to node
        `toType` - The connection type

  - ### Method Detail

    - #### connect

          public void connect()

    - #### terminate

          public void terminate()

    - #### getFrom

          public org.kie.api.definition.process.Node getFrom()

      Specified by:
        `getFrom` in interface `org.kie.api.definition.process.Connection`

    - #### getTo

          public org.kie.api.definition.process.Node getTo()

      Specified by:
        `getTo` in interface `org.kie.api.definition.process.Connection`

    - #### getFromType

          public String getFromType()

      Specified by:
        `getFromType` in interface `org.kie.api.definition.process.Connection`

    - #### getToType

          public String getToType()

      Specified by:
        `getToType` in interface `org.kie.api.definition.process.Connection`

    - #### setFrom

          public void setFrom​(org.kie.api.definition.process.Node from)

    - #### setTo

          public void setTo​(org.kie.api.definition.process.Node to)

    - #### setFromType

          public void setFromType​(String fromType)

    - #### setToType

          public void setToType​(String toType)

    - #### getMetaData

          public Map<String,​Object> getMetaData()

      Specified by:
        `getMetaData` in interface `org.kie.api.definition.process.Connection`

    - #### setMetaData

          public void setMetaData​(String name,
                                  Object value)

      Specified by:
        `setMetaData` in interface `Connection`

    - #### getMetaData

          public Object getMetaData​(String name)

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`