com.h3c.util.net.msg

## Class LocalConnectionPair

- java.lang.Object
- - com.h3c.util.net.msg.LocalConnectionPair

-     public class LocalConnectionPair
      extends Object

  A pair of connections connected via twisted pair of piped input and output streams.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LocalConnectionPair(String name, ConversationProvider firstProvider, ConversationProvider secondProvider)` Creates a pair of connections using the supplied conversation providers.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Connection` | `first()` External end-point of the local connection pair.
    `Connection` | `second()` Internal end-point of the local connection pair.

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

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

- - ### Constructor Detail

    - #### LocalConnectionPair

          public LocalConnectionPair(String name,
                             ConversationProvider firstProvider,
                             ConversationProvider secondProvider)
                              throws IOException

      Creates a pair of connections using the supplied conversation providers.
      Parameters:
        `name` - base name for the pair of connections
        `firstProvider` - conversation provider for the first connection
        `secondProvider` - conversation provider for the second connection
      Throws:
        `IOException` - if an issue is encountered while creating local internal/external connection pair

  - ### Method Detail

    - #### first

          public Connection first()

      External end-point of the local connection pair.
      Returns:
        first connection end-point

    - #### second

          public Connection second()

      Internal end-point of the local connection pair. Used to consume and feed information between the external and remote.
      Returns:
        second connection end-point

Copyright © 2014. All Rights Reserved.