Class NetworkSocketExtension
java.lang.Object
security.whisper.javastix.coo.extension.types.NetworkSocketExtension
- All Implemented Interfaces:
Serializable,StixCustomProperties,CyberObservableExtension,CyberObservableExtensionCommonProperties,NetworkSocketExtensionExt,GenericValidation,SdoDefaultValidator
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
@AllowedParents(NetworkTrafficCoo.class)
public final class NetworkSocketExtension
extends Object
implements NetworkSocketExtensionExt, Serializable
socket-ext
The Network Socket extension specifies a default extension for capturing network traffic properties associated with network sockets.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeNetworkSocketExtension. -
Field Summary
Fields inherited from interface security.whisper.javastix.validation.SdoDefaultValidator
VALIDATOR -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forNetworkSocketExtension.static NetworkSocketExtensioncopyOf(NetworkSocketExtensionExt instance) Creates an immutable copy of aNetworkSocketExtensionExtvalue.booleanThis instance is equal to all instances ofNetworkSocketExtensionthat have equal attribute values.Custom Properties for STIX Objects.getType()This property is used for generation of the dictionary during serialization, and used as the "Type" mapping value for polymorphic when deserializing.inthashCode()Computes a hash code from attributes:addressFamily,blocking,listening,protocolFamily,options,socketType,socketDescriptor,socketHandle,type,customProperties.toString()Prints the immutable valueNetworkSocketExtensionwith attribute values.final NetworkSocketExtensionwithAddressFamily(String value) Copy the current immutable object by setting a value for theaddressFamilyattribute.final NetworkSocketExtensionwithBlocking(boolean value) Copy the current immutable object by setting a present value for the optionalblockingattribute.final NetworkSocketExtensionwithBlocking(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for theblockingattribute.final NetworkSocketExtensionwithCustomProperties(Map<String, ? extends Object> entries) Copy the current immutable object by replacing thecustomPropertiesmap with the specified map.final NetworkSocketExtensionwithListening(boolean value) Copy the current immutable object by setting a present value for the optionallisteningattribute.final NetworkSocketExtensionwithListening(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for thelisteningattribute.final NetworkSocketExtensionwithOptions(Map<String, ? extends String> entries) Copy the current immutable object by replacing theoptionsmap with the specified map.final NetworkSocketExtensionwithProtocolFamily(String value) Copy the current immutable object by setting a present value for the optionalprotocolFamilyattribute.final NetworkSocketExtensionwithProtocolFamily(Optional<String> optional) Copy the current immutable object by setting an optional value for theprotocolFamilyattribute.final NetworkSocketExtensionwithSocketDescriptor(long value) Copy the current immutable object by setting a present value for the optionalsocketDescriptorattribute.final NetworkSocketExtensionwithSocketDescriptor(Optional<Long> optional) Copy the current immutable object by setting an optional value for thesocketDescriptorattribute.final NetworkSocketExtensionwithSocketHandle(long value) Copy the current immutable object by setting a present value for the optionalsocketHandleattribute.final NetworkSocketExtensionwithSocketHandle(Optional<Long> optional) Copy the current immutable object by setting an optional value for thesocketHandleattribute.final NetworkSocketExtensionwithSocketType(String value) Copy the current immutable object by setting a present value for the optionalsocketTypeattribute.final NetworkSocketExtensionwithSocketType(Optional<String> optional) Copy the current immutable object by setting an optional value for thesocketTypeattribute.final NetworkSocketExtensionCopy the current immutable object by setting a value for thetypeattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface security.whisper.javastix.validation.GenericValidation
validateEntityMethods inherited from interface security.whisper.javastix.validation.SdoDefaultValidator
validate, validateOnlyId
-
Method Details
-
getAddressFamily
@JsonPropertyDescription("Specifies the address family (AF_*) that the socket is configured for.") public String getAddressFamily()- Specified by:
getAddressFamilyin interfaceNetworkSocketExtensionExt- Returns:
- The value of the
addressFamilyattribute
-
getBlocking
@JsonPropertyDescription("Specifies whether the socket is in blocking mode.") public Optional<Boolean> getBlocking()- Specified by:
getBlockingin interfaceNetworkSocketExtensionExt- Returns:
- The value of the
blockingattribute
-
getListening
@JsonPropertyDescription("Specifies whether the socket is in listening mode.") public Optional<Boolean> getListening()- Specified by:
getListeningin interfaceNetworkSocketExtensionExt- Returns:
- The value of the
listeningattribute
-
getProtocolFamily
@JsonPropertyDescription("Specifies the protocol family (PF_*) that the socket is configured for.") public Optional<String> getProtocolFamily()- Specified by:
getProtocolFamilyin interfaceNetworkSocketExtensionExt- Returns:
- The value of the
protocolFamilyattribute
-
getOptions
@JsonPropertyDescription("Specifies any options (SO_*) that may be used by the socket, as a dictionary.") public com.google.common.collect.ImmutableMap<String,String> getOptions()- Specified by:
getOptionsin interfaceNetworkSocketExtensionExt- Returns:
- The value of the
optionsattribute
-
getSocketType
@JsonPropertyDescription("Specifies the type of the socket.") public Optional<String> getSocketType()- Specified by:
getSocketTypein interfaceNetworkSocketExtensionExt- Returns:
- The value of the
socketTypeattribute
-
getSocketDescriptor
@JsonPropertyDescription("Specifies the socket file descriptor value associated with the socket, as a non-negative integer.") public Optional<Long> getSocketDescriptor()- Specified by:
getSocketDescriptorin interfaceNetworkSocketExtensionExt- Returns:
- The value of the
socketDescriptorattribute
-
getSocketHandle
@JsonPropertyDescription("Specifies the handle or inode value associated with the socket.") public Optional<Long> getSocketHandle()- Specified by:
getSocketHandlein interfaceNetworkSocketExtensionExt- Returns:
- The value of the
socketHandleattribute
-
getType
This property is used for generation of the dictionary during serialization, and used as the "Type" mapping value for polymorphic when deserializing.- Specified by:
getTypein interfaceCyberObservableExtensionCommonProperties
-
getCustomProperties
Custom Properties for STIX Objects. Any object that supports custom properties will have a validation of the custom property prefix (typically "x_"). If the additional property in the JSON does not meet the StartsWith condition, then the JSON will be rejected.- Specified by:
getCustomPropertiesin interfaceStixCustomProperties- Returns:
- Map of custom properties
Map<String, Object>
-
withAddressFamily
Copy the current immutable object by setting a value for theaddressFamilyattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for addressFamily (can benull)- Returns:
- A modified copy of the
thisobject
-
withBlocking
Copy the current immutable object by setting a present value for the optionalblockingattribute.- Parameters:
value- The value for blocking- Returns:
- A modified copy of
thisobject
-
withBlocking
Copy the current immutable object by setting an optional value for theblockingattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for blocking- Returns:
- A modified copy of
thisobject
-
withListening
Copy the current immutable object by setting a present value for the optionallisteningattribute.- Parameters:
value- The value for listening- Returns:
- A modified copy of
thisobject
-
withListening
Copy the current immutable object by setting an optional value for thelisteningattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for listening- Returns:
- A modified copy of
thisobject
-
withProtocolFamily
Copy the current immutable object by setting a present value for the optionalprotocolFamilyattribute.- Parameters:
value- The value for protocolFamily- Returns:
- A modified copy of
thisobject
-
withProtocolFamily
Copy the current immutable object by setting an optional value for theprotocolFamilyattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for protocolFamily- Returns:
- A modified copy of
thisobject
-
withOptions
Copy the current immutable object by replacing theoptionsmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the options map- Returns:
- A modified copy of
thisobject
-
withSocketType
Copy the current immutable object by setting a present value for the optionalsocketTypeattribute.- Parameters:
value- The value for socketType- Returns:
- A modified copy of
thisobject
-
withSocketType
Copy the current immutable object by setting an optional value for thesocketTypeattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for socketType- Returns:
- A modified copy of
thisobject
-
withSocketDescriptor
Copy the current immutable object by setting a present value for the optionalsocketDescriptorattribute.- Parameters:
value- The value for socketDescriptor- Returns:
- A modified copy of
thisobject
-
withSocketDescriptor
Copy the current immutable object by setting an optional value for thesocketDescriptorattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for socketDescriptor- Returns:
- A modified copy of
thisobject
-
withSocketHandle
Copy the current immutable object by setting a present value for the optionalsocketHandleattribute.- Parameters:
value- The value for socketHandle- Returns:
- A modified copy of
thisobject
-
withSocketHandle
Copy the current immutable object by setting an optional value for thesocketHandleattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for socketHandle- Returns:
- A modified copy of
thisobject
-
withType
Copy the current immutable object by setting a value for thetypeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type (can benull)- Returns:
- A modified copy of the
thisobject
-
withCustomProperties
Copy the current immutable object by replacing thecustomPropertiesmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the customProperties map- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofNetworkSocketExtensionthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:addressFamily,blocking,listening,protocolFamily,options,socketType,socketDescriptor,socketHandle,type,customProperties. -
toString
Prints the immutable valueNetworkSocketExtensionwith attribute values. -
copyOf
Creates an immutable copy of aNetworkSocketExtensionExtvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable NetworkSocketExtension instance
-
builder
Creates a builder forNetworkSocketExtension.- Returns:
- A new NetworkSocketExtension builder
-