org.wildfly.swarm.spi.api

## Class SocketBindingGroup

- java.lang.Object
- - org.wildfly.swarm.spi.api.SocketBindingGroup

-     public class SocketBindingGroup
      extends Object

  A group of inbound and outbound socket-bindings.

  The default socket-binding group is typically named `standard-sockets`.

  All bindings within a group may be universally offset to accommodate shifting an entire server up or down some set number of ports.

  Author:
    Bob McWhirter
  See Also:
    `SocketBinding`, `OutboundSocketBinding`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SocketBindingGroup(String name, String defaultInterface, String portOffsetExpression)` Create a new socket-binding group.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `defaultInterface()` Retrieve the name of the default interface.
    `SocketBindingGroup` | `defaultInterface(String defaultInterface)`
    `String` | `name()` Retrieve the name of this group.
    `SocketBindingGroup` | `outboundSocketBinding(OutboundSocketBinding binding)` Add an outbound socket-binding to this group.
    `List<OutboundSocketBinding>` | `outboundSocketBindings()` Retrieve all outbound socket-bindings attached to this group.
    `SocketBindingGroup` | `portOffset(int offset)`
    `SocketBindingGroup` | `portOffset(String expr)`
    `String` | `portOffsetExpression()` Retrieve the port-offset expression.
    `SocketBindingGroup` | `socketBinding(SocketBinding binding)` Add a socket-binding to this group.
    `SocketBinding` | `socketBinding(String name)` Retrieve a socket-binding by name.
    `List<SocketBinding>` | `socketBindings()` Retrieve all socket-bindings attached to this group.

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

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

- - ### Constructor Detail

    - #### SocketBindingGroup

          public SocketBindingGroup(String name,
                                    String defaultInterface,
                                    String portOffsetExpression)

      Create a new socket-binding group.
      Parameters:
        `name` - The name of the group.
        `defaultInterface` - The name of the interface to bind to.
        `portOffsetExpression` - The port offset expression.

  - ### Method Detail

    - #### name

          public String name()

      Retrieve the name of this group.
      Returns:
        The name of this group.

    - #### defaultInterface

          public String defaultInterface()

      Retrieve the name of the default interface.
      Returns:
        The name of the default interface.

    - #### defaultInterface

          public SocketBindingGroup defaultInterface(String defaultInterface)

    - #### portOffsetExpression

          public String portOffsetExpression()

      Retrieve the port-offset expression.
      Returns:
        The port offset expression.

    - #### portOffset

          public SocketBindingGroup portOffset(String expr)

    - #### portOffset

          public SocketBindingGroup portOffset(int offset)

    - #### socketBinding

          public SocketBindingGroup socketBinding(SocketBinding binding)

      Add a socket-binding to this group.
      Parameters:
        `binding` - The binding to add.
      Returns:
        this group.

    - #### socketBinding

          public SocketBinding socketBinding(String name)

      Retrieve a socket-binding by name.
      Parameters:
        `name` - The socket-binding name.
      Returns:
        The socket-binding if present, otherwise `null`.

    - #### socketBindings

          public List<SocketBinding> socketBindings()

      Retrieve all socket-bindings attached to this group.
      Returns:
        All socket-bindings attached to this group.

    - #### outboundSocketBinding

          public SocketBindingGroup outboundSocketBinding(OutboundSocketBinding binding)

      Add an outbound socket-binding to this group.
      Parameters:
        `binding` - The binding to add.
      Returns:
        this group.

    - #### outboundSocketBindings

          public List<OutboundSocketBinding> outboundSocketBindings()

      Retrieve all outbound socket-bindings attached to this group.
      Returns:
        All outbound socket-bindings attached to this group.

Copyright © 2017 JBoss by Red Hat. All rights reserved.