Class EConfigure.MulticastBuilder

    • Method Detail

      • name

        public EConfigure.MulticastBuilder name​(String name)
        Sets the multicast connection name. Name must be unique within the JVM.

        This setting is required.

        Parameters:
        name - multicast connection name.
        Returns:
        this multicast connection builder.
        Throws:
        com.typesafe.config.ConfigException - if name is null or empty.
      • role

        public EConfigure.MulticastBuilder role​(EConfigure.MulticastRole role)
        Sets the multicast connection role to either publisher or subscriber.

        This setting is required.

        Parameters:
        role - multicast connection role.
        Returns:
        this multicast connection builder.
        Throws:
        com.typesafe.config.ConfigException - if role is null.
      • group

        public EConfigure.MulticastBuilder group​(InetAddress group)
        Set multicast group address.

        This setting is required.

        Parameters:
        group - multicast group address.
        Returns:
        this multicast connection builder.
        Throws:
        com.typesafe.config.ConfigException - if group is null or not a multicast address.
      • targetPort

        public EConfigure.MulticastBuilder targetPort​(int port)
        Set multicast group target port. This port is only used when posting messages to the group.

        This setting is required.

        Parameters:
        port - multicast group port.
        Returns:
        this multicast connection builder.
        Throws:
        com.typesafe.config.ConfigException - if port is outside the range [ENetConfigure.MIN_PORT, ENetConfigure.MAX_PORT] inclusive.
      • networkInterface

        public EConfigure.MulticastBuilder networkInterface​(NetworkInterface netIf)
        Sets the network interface associated with the multicast group.

        This setting is required.

        Parameters:
        netIf - multicast group network interface.
        Returns:
        this multicast connection builder.
        Throws:
        com.typesafe.config.ConfigException - if netIf is null.
      • sources

        public EConfigure.MulticastBuilder sources​(List<InetAddress> sources)
        Optional set of multicast source addresses. If configured then only those messages pasted from the given source addresses are accepted. Does nothing if sources is either null or empty.

        This setting is optional.

        Parameters:
        sources - accepted multicast message source addresses. May be null or empty.
        Returns:
        this multicast connection builder.
      • bindAddress

        public EConfigure.MulticastBuilder bindAddress​(InetAddress address)
        Bind socket to given local address. If address is null then socket is bound to an automatically assigned address.

        This setting is optional.

        Parameters:
        address - bind socket local side to this address. May be null.
        Returns:
        this multicast connection builder.
      • protocolFamily

        public EConfigure.MulticastBuilder protocolFamily​(ProtocolFamily family)
        Sets the multicast group protocol family.

        This setting is required.

        Parameters:
        family - multicast protocol family. Must match group(InetAddress).
        Returns:
        this multicast connection builder.
        Throws:
        com.typesafe.config.ConfigException - if family is null.
      • byteOrder

        public EConfigure.MulticastBuilder byteOrder​(ByteOrder byteOrder)
        Sets the byte order used by the multicast connection.

        This setting is optional. Default setting is EConfigure.DEFAULT_BYTE_ORDER.

        Parameters:
        byteOrder - multicast connection serialize and de-serialize messages using this byte order.
        Returns:
        this multicast connection builder.
        Throws:
        com.typesafe.config.ConfigException - if byteOrder is nuill.
      • selector

        public EConfigure.MulticastBuilder selector​(String selector)
        Sets the selector used for the multicast connection.

        This setting is optional. Default setting is ENetConfigure.defaultSelector().

        Parameters:
        selector - eBus selector name.
        Returns:
        this multicast connection builder.
        Throws:
        com.typesafe.config.ConfigException - if name is null, an empty string or not a known selector.
      • inputBufferSize

        public EConfigure.MulticastBuilder inputBufferSize​(int size)
        Sets the input buffer size for the multicast connection. If size is zero, then the default input buffer size is used.

        This setting is optional.

        Parameters:
        size - multicast connection input buffer size.
        Returns:
        this multicast connection builder.
        Throws:
        com.typesafe.config.ConfigException - if size < zero.
      • outputBufferSize

        public EConfigure.MulticastBuilder outputBufferSize​(int size)
        Sets the output buffer size for the multicast connection. If size is zero, then the default output buffer size is used.

        This setting is optional.

        Parameters:
        size - multicast connection output buffer size.
        Returns:
        this multicast connection builder.
        Throws:
        com.typesafe.config.ConfigException - if size < zero.
      • notifications

        public EConfigure.MulticastBuilder notifications​(List<EConfigure.McastNotifyConfig> notifications)
        Set notification message key configurations.

        This setting is required.

        Parameters:
        notifications - notification message keys.
        Returns:
        this multicast connection builder.
        Throws:
        com.typesafe.config.ConfigException - if notifications is either null or empty.
      • build

        public EConfigure.MulticastConnection build()
        Returns MulticastConnection configured as per this builder's current settings.
        Returns:
        EConfigure.MulticastConnection configured as per this builder's current settings.
        Throws:
        com.typesafe.config.ConfigException - if the current builder settings are not valid.