org.fourthline.cling.support.model

## Class ConnectionInfo

- java.lang.Object
- - org.fourthline.cling.support.model.ConnectionInfo

-     public class ConnectionInfo
      extends Object

  Immutable type encapsulating the state of a single connection.
  Author:
    Alessio Gaeta, Christian Bauer

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ConnectionInfo.Direction`
    `static class` | `ConnectionInfo.Status`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int` | `avTransportID`
    `protected int` | `connectionID`
    `protected ConnectionInfo.Status` | `connectionStatus`
    `protected ConnectionInfo.Direction` | `direction`
    `protected int` | `peerConnectionID`
    `protected ServiceReference` | `peerConnectionManager`
    `protected ProtocolInfo` | `protocolInfo`
    `protected int` | `rcsID`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConnectionInfo()` Creates a default instance with values expected for the default connection ID "0".
    `ConnectionInfo(int connectionID, int rcsID, int avTransportID, ProtocolInfo protocolInfo, ServiceReference peerConnectionManager, int peerConnectionID, ConnectionInfo.Direction direction, ConnectionInfo.Status connectionStatus)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `int` | `getAvTransportID()`
    `int` | `getConnectionID()`
    `ConnectionInfo.Status` | `getConnectionStatus()`
    `ConnectionInfo.Direction` | `getDirection()`
    `int` | `getPeerConnectionID()`
    `ServiceReference` | `getPeerConnectionManager()`
    `ProtocolInfo` | `getProtocolInfo()`
    `int` | `getRcsID()`
    `int` | `hashCode()`
    `void` | `setConnectionStatus(ConnectionInfo.Status connectionStatus)`
    `String` | `toString()`

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

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

- - ### Field Detail

    - #### connectionID

          protected final int connectionID

    - #### rcsID

          protected final int rcsID

    - #### avTransportID

          protected final int avTransportID

    - #### protocolInfo

          protected final ProtocolInfo protocolInfo

    - #### peerConnectionManager

          protected final ServiceReference peerConnectionManager

    - #### peerConnectionID

          protected final int peerConnectionID

    - #### direction

          protected final ConnectionInfo.Direction direction

    - #### connectionStatus

          protected ConnectionInfo.Status connectionStatus

  - ### Constructor Detail

    - #### ConnectionInfo

          public ConnectionInfo()

      Creates a default instance with values expected for the default connection ID "0".

      The ConnectionManager 1.0 specification says:

      If optional action PrepareForConnection is not implemented then (limited) connection information can be retrieved for ConnectionID 0. The device should return all known information:

      - RcsID should be 0 or -1
      - AVTransportID should be 0 or -1
      - ProtocolInfo should contain accurate information if it is known, otherwhise it should be NULL (empty string)
      - PeerConnectionManager should be NULL (empty string)
      - PeerConnectionID should be -1
      - Direction should be Input or Output
      - Status should be OK or Unknown

    - #### ConnectionInfo

          public ConnectionInfo(int connectionID,
                                int rcsID,
                                int avTransportID,
                                ProtocolInfo protocolInfo,
                                ServiceReference peerConnectionManager,
                                int peerConnectionID,
                                ConnectionInfo.Direction direction,
                                ConnectionInfo.Status connectionStatus)

  - ### Method Detail

    - #### getConnectionID

          public int getConnectionID()

    - #### getRcsID

          public int getRcsID()

    - #### getAvTransportID

          public int getAvTransportID()

    - #### getProtocolInfo

          public ProtocolInfo getProtocolInfo()

    - #### getPeerConnectionManager

          public ServiceReference getPeerConnectionManager()

    - #### getPeerConnectionID

          public int getPeerConnectionID()

    - #### getDirection

          public ConnectionInfo.Direction getDirection()

    - #### getConnectionStatus

          public ConnectionInfo.Status getConnectionStatus()

    - #### setConnectionStatus

          public void setConnectionStatus(ConnectionInfo.Status connectionStatus)

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2016 4th Line GmbH, Switzerland. All rights reserved.