Class NetworkSocketExtension.Builder
java.lang.Object
security.whisper.javastix.coo.extension.types.NetworkSocketExtension.Builder
- Enclosing class:
NetworkSocketExtension
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 Summary
Modifier and TypeMethodDescriptionaddressFamily(String addressFamily) Initializes the value for theaddressFamilyattribute.blocking(boolean blocking) Initializes the optional valueblockingto blocking.Initializes the optional valueblockingto blocking.build()Builds a newNetworkSocketExtension.customProperties(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for thecustomPropertiesmap.from(StixCustomProperties instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.common.StixCustomPropertiesinstance.from(CyberObservableExtensionCommonProperties instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.coo.extension.CyberObservableExtensionCommonPropertiesinstance.from(NetworkSocketExtensionExt instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.coo.extension.types.NetworkSocketExtensionExtinstance.listening(boolean listening) Initializes the optional valuelisteningto listening.Initializes the optional valuelisteningto listening.Sets or replaces all mappings from the specified map as entries for theoptionsmap.protocolFamily(String protocolFamily) Initializes the optional valueprotocolFamilyto protocolFamily.protocolFamily(Optional<String> protocolFamily) Initializes the optional valueprotocolFamilyto protocolFamily.putAllCustomProperties(Map<String, ? extends Object> entries) Put all mappings from the specified map as entries tocustomPropertiesmap.putAllOptions(Map<String, ? extends String> entries) Put all mappings from the specified map as entries tooptionsmap.putCustomProperty(String key, Object value) Put one entry to thecustomPropertiesmap.putCustomProperty(Map.Entry<String, ? extends Object> entry) Put one entry to thecustomPropertiesmap.Put one entry to theoptionsmap.Put one entry to theoptionsmap.socketDescriptor(long socketDescriptor) Initializes the optional valuesocketDescriptorto socketDescriptor.socketDescriptor(Optional<Long> socketDescriptor) Initializes the optional valuesocketDescriptorto socketDescriptor.socketHandle(long socketHandle) Initializes the optional valuesocketHandleto socketHandle.socketHandle(Optional<Long> socketHandle) Initializes the optional valuesocketHandleto socketHandle.socketType(String socketType) Initializes the optional valuesocketTypeto socketType.socketType(Optional<String> socketType) Initializes the optional valuesocketTypeto socketType.Initializes the value for thetypeattribute.
-
Method Details
-
from
@CanIgnoreReturnValue public final NetworkSocketExtension.Builder from(StixCustomProperties instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.common.StixCustomPropertiesinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final NetworkSocketExtension.Builder from(NetworkSocketExtensionExt instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.coo.extension.types.NetworkSocketExtensionExtinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final NetworkSocketExtension.Builder from(CyberObservableExtensionCommonProperties instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.coo.extension.CyberObservableExtensionCommonPropertiesinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder 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 theaddressFamilyattribute.- Parameters:
addressFamily- The value for addressFamily (can benull)- Returns:
thisbuilder for use in a chained invocation
-
blocking
Initializes the optional valueblockingto blocking.- Parameters:
blocking- The value for blocking- Returns:
thisbuilder 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 valueblockingto blocking.- Parameters:
blocking- The value for blocking- Returns:
thisbuilder for use in a chained invocation
-
listening
Initializes the optional valuelisteningto listening.- Parameters:
listening- The value for listening- Returns:
thisbuilder 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 valuelisteningto listening.- Parameters:
listening- The value for listening- Returns:
thisbuilder for use in a chained invocation
-
protocolFamily
@CanIgnoreReturnValue public final NetworkSocketExtension.Builder protocolFamily(String protocolFamily) Initializes the optional valueprotocolFamilyto protocolFamily.- Parameters:
protocolFamily- The value for protocolFamily- Returns:
thisbuilder 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 valueprotocolFamilyto protocolFamily.- Parameters:
protocolFamily- The value for protocolFamily- Returns:
thisbuilder for use in a chained invocation
-
putOption
@CanIgnoreReturnValue public final NetworkSocketExtension.Builder putOption(String key, String value) Put one entry to theoptionsmap.- Parameters:
key- The key in the options mapvalue- The associated value in the options map- Returns:
thisbuilder for use in a chained invocation
-
putOption
@CanIgnoreReturnValue public final NetworkSocketExtension.Builder putOption(Map.Entry<String, ? extends String> entry) Put one entry to theoptionsmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder 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 theoptionsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the options map- Returns:
thisbuilder 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 tooptionsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the options map- Returns:
thisbuilder for use in a chained invocation
-
socketType
Initializes the optional valuesocketTypeto socketType.- Parameters:
socketType- The value for socketType- Returns:
thisbuilder for chained invocation
-
socketType
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the type of the socket.") public final NetworkSocketExtension.Builder socketType(Optional<String> socketType) Initializes the optional valuesocketTypeto socketType.- Parameters:
socketType- The value for socketType- Returns:
thisbuilder for use in a chained invocation
-
socketDescriptor
@CanIgnoreReturnValue public final NetworkSocketExtension.Builder socketDescriptor(long socketDescriptor) Initializes the optional valuesocketDescriptorto socketDescriptor.- Parameters:
socketDescriptor- The value for socketDescriptor- Returns:
thisbuilder 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 valuesocketDescriptorto socketDescriptor.- Parameters:
socketDescriptor- The value for socketDescriptor- Returns:
thisbuilder for use in a chained invocation
-
socketHandle
Initializes the optional valuesocketHandleto socketHandle.- Parameters:
socketHandle- The value for socketHandle- Returns:
thisbuilder 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 valuesocketHandleto socketHandle.- Parameters:
socketHandle- The value for socketHandle- Returns:
thisbuilder for use in a chained invocation
-
type
Initializes the value for thetypeattribute.- Parameters:
type- The value for type (can benull)- Returns:
thisbuilder for use in a chained invocation
-
putCustomProperty
@CanIgnoreReturnValue public final NetworkSocketExtension.Builder putCustomProperty(String key, Object value) Put one entry to thecustomPropertiesmap.- Parameters:
key- The key in the customProperties mapvalue- The associated value in the customProperties map- Returns:
thisbuilder for use in a chained invocation
-
putCustomProperty
@CanIgnoreReturnValue public final NetworkSocketExtension.Builder putCustomProperty(Map.Entry<String, ? extends Object> entry) Put one entry to thecustomPropertiesmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder 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 thecustomPropertiesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the customProperties map- Returns:
thisbuilder 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 tocustomPropertiesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the customProperties map- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newNetworkSocketExtension.- Returns:
- An immutable instance of NetworkSocketExtension
- Throws:
IllegalStateException- if any required attributes are missing
-