Class NetworkSocketExtension.Builder

java.lang.Object
security.whisper.javastix.coo.extension.types.NetworkSocketExtension.Builder
Enclosing class:
NetworkSocketExtension

@NotThreadSafe public static final class NetworkSocketExtension.Builder extends Object
Builds instances of type NetworkSocketExtension. Initialize attributes and then invoke the build() method to create an immutable instance.

Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

  • Method Details

    • from

      @CanIgnoreReturnValue public final NetworkSocketExtension.Builder from(StixCustomProperties instance)
      Fill a builder with attribute values from the provided security.whisper.javastix.common.StixCustomProperties instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      @CanIgnoreReturnValue public final NetworkSocketExtension.Builder from(NetworkSocketExtensionExt instance)
      Fill a builder with attribute values from the provided security.whisper.javastix.coo.extension.types.NetworkSocketExtensionExt instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      @CanIgnoreReturnValue public final NetworkSocketExtension.Builder from(CyberObservableExtensionCommonProperties instance)
      Fill a builder with attribute values from the provided security.whisper.javastix.coo.extension.CyberObservableExtensionCommonProperties instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • addressFamily

      @CanIgnoreReturnValue @JsonPropertyDescription("Specifies the address family (AF_*) that the socket is configured for.") public final NetworkSocketExtension.Builder addressFamily(String addressFamily)
      Initializes the value for the addressFamily attribute.
      Parameters:
      addressFamily - The value for addressFamily (can be null)
      Returns:
      this builder for use in a chained invocation
    • blocking

      @CanIgnoreReturnValue public final NetworkSocketExtension.Builder blocking(boolean blocking)
      Initializes the optional value blocking to blocking.
      Parameters:
      blocking - The value for blocking
      Returns:
      this builder for chained invocation
    • blocking

      @CanIgnoreReturnValue @JsonPropertyDescription("Specifies whether the socket is in blocking mode.") public final NetworkSocketExtension.Builder blocking(Optional<Boolean> blocking)
      Initializes the optional value blocking to blocking.
      Parameters:
      blocking - The value for blocking
      Returns:
      this builder for use in a chained invocation
    • listening

      @CanIgnoreReturnValue public final NetworkSocketExtension.Builder listening(boolean listening)
      Initializes the optional value listening to listening.
      Parameters:
      listening - The value for listening
      Returns:
      this builder for chained invocation
    • listening

      @CanIgnoreReturnValue @JsonPropertyDescription("Specifies whether the socket is in listening mode.") public final NetworkSocketExtension.Builder listening(Optional<Boolean> listening)
      Initializes the optional value listening to listening.
      Parameters:
      listening - The value for listening
      Returns:
      this builder for use in a chained invocation
    • protocolFamily

      @CanIgnoreReturnValue public final NetworkSocketExtension.Builder protocolFamily(String protocolFamily)
      Initializes the optional value protocolFamily to protocolFamily.
      Parameters:
      protocolFamily - The value for protocolFamily
      Returns:
      this builder for chained invocation
    • protocolFamily

      @CanIgnoreReturnValue @JsonPropertyDescription("Specifies the protocol family (PF_*) that the socket is configured for.") public final NetworkSocketExtension.Builder protocolFamily(Optional<String> protocolFamily)
      Initializes the optional value protocolFamily to protocolFamily.
      Parameters:
      protocolFamily - The value for protocolFamily
      Returns:
      this builder for use in a chained invocation
    • putOption

      @CanIgnoreReturnValue public final NetworkSocketExtension.Builder putOption(String key, String value)
      Put one entry to the options map.
      Parameters:
      key - The key in the options map
      value - The associated value in the options map
      Returns:
      this builder for use in a chained invocation
    • putOption

      @CanIgnoreReturnValue public final NetworkSocketExtension.Builder putOption(Map.Entry<String,? extends String> entry)
      Put one entry to the options map. Nulls are not permitted
      Parameters:
      entry - The key and value entry
      Returns:
      this builder for use in a chained invocation
    • options

      @CanIgnoreReturnValue @JsonPropertyDescription("Specifies any options (SO_*) that may be used by the socket, as a dictionary.") public final NetworkSocketExtension.Builder options(Map<String,? extends String> entries)
      Sets or replaces all mappings from the specified map as entries for the options map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the options map
      Returns:
      this builder for use in a chained invocation
    • putAllOptions

      @CanIgnoreReturnValue public final NetworkSocketExtension.Builder putAllOptions(Map<String,? extends String> entries)
      Put all mappings from the specified map as entries to options map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the options map
      Returns:
      this builder for use in a chained invocation
    • socketType

      @CanIgnoreReturnValue public final NetworkSocketExtension.Builder socketType(String socketType)
      Initializes the optional value socketType to socketType.
      Parameters:
      socketType - The value for socketType
      Returns:
      this builder for chained invocation
    • socketType

      @CanIgnoreReturnValue @JsonPropertyDescription("Specifies the type of the socket.") public final NetworkSocketExtension.Builder socketType(Optional<String> socketType)
      Initializes the optional value socketType to socketType.
      Parameters:
      socketType - The value for socketType
      Returns:
      this builder for use in a chained invocation
    • socketDescriptor

      @CanIgnoreReturnValue public final NetworkSocketExtension.Builder socketDescriptor(long socketDescriptor)
      Initializes the optional value socketDescriptor to socketDescriptor.
      Parameters:
      socketDescriptor - The value for socketDescriptor
      Returns:
      this builder for chained invocation
    • socketDescriptor

      @CanIgnoreReturnValue @JsonPropertyDescription("Specifies the socket file descriptor value associated with the socket, as a non-negative integer.") public final NetworkSocketExtension.Builder socketDescriptor(Optional<Long> socketDescriptor)
      Initializes the optional value socketDescriptor to socketDescriptor.
      Parameters:
      socketDescriptor - The value for socketDescriptor
      Returns:
      this builder for use in a chained invocation
    • socketHandle

      @CanIgnoreReturnValue public final NetworkSocketExtension.Builder socketHandle(long socketHandle)
      Initializes the optional value socketHandle to socketHandle.
      Parameters:
      socketHandle - The value for socketHandle
      Returns:
      this builder for chained invocation
    • socketHandle

      @CanIgnoreReturnValue @JsonPropertyDescription("Specifies the handle or inode value associated with the socket.") public final NetworkSocketExtension.Builder socketHandle(Optional<Long> socketHandle)
      Initializes the optional value socketHandle to socketHandle.
      Parameters:
      socketHandle - The value for socketHandle
      Returns:
      this builder for use in a chained invocation
    • type

      @CanIgnoreReturnValue public final NetworkSocketExtension.Builder type(String type)
      Initializes the value for the type attribute.
      Parameters:
      type - The value for type (can be null)
      Returns:
      this builder for use in a chained invocation
    • putCustomProperty

      @CanIgnoreReturnValue public final NetworkSocketExtension.Builder putCustomProperty(String key, Object value)
      Put one entry to the customProperties map.
      Parameters:
      key - The key in the customProperties map
      value - The associated value in the customProperties map
      Returns:
      this builder for use in a chained invocation
    • putCustomProperty

      @CanIgnoreReturnValue public final NetworkSocketExtension.Builder putCustomProperty(Map.Entry<String,? extends Object> entry)
      Put one entry to the customProperties map. Nulls are not permitted
      Parameters:
      entry - The key and value entry
      Returns:
      this builder for use in a chained invocation
    • customProperties

      @CanIgnoreReturnValue public final NetworkSocketExtension.Builder customProperties(Map<String,? extends Object> entries)
      Sets or replaces all mappings from the specified map as entries for the customProperties map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the customProperties map
      Returns:
      this builder for use in a chained invocation
    • putAllCustomProperties

      @CanIgnoreReturnValue public final NetworkSocketExtension.Builder putAllCustomProperties(Map<String,? extends Object> entries)
      Put all mappings from the specified map as entries to customProperties map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the customProperties map
      Returns:
      this builder for use in a chained invocation
    • build

      public NetworkSocketExtension build()
      Returns:
      An immutable instance of NetworkSocketExtension
      Throws:
      IllegalStateException - if any required attributes are missing