public interface ISocketProvider
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungdefault Optional
<FileDescriptor> createFileDescriptor
(int _fd) Attempts to create nativeFileDescriptor
from raw int value.createReader
(SocketChannel _socket) Method to create aIMessageReader
implementation.createWriter
(SocketChannel _socket) Method to create aIMessageWriter
implementation.Attempts to extract raw FileDescriptor value fromFileDescriptor
instance.boolean
Indicate if reader/writer supports file descriptor passing.void
setFileDescriptorSupport
(boolean _support) Called to indicate if the currentAbstractTransport
implementation supports file descriptor passing.
-
Methodendetails
-
createReader
Method to create aIMessageReader
implementation.- Parameter:
_socket
- socket to use for reading- Gibt zurück:
- MessageReader
- Löst aus:
IOException
- if reader could not be created
-
createWriter
Method to create aIMessageWriter
implementation.- Parameter:
_socket
- socket to write to- Gibt zurück:
- MessageWriter
- Löst aus:
IOException
- if write could not be created
-
setFileDescriptorSupport
void setFileDescriptorSupport(boolean _support) Called to indicate if the currentAbstractTransport
implementation supports file descriptor passing.- Parameter:
_support
- true if file descriptor passing is supported, false otherwise
-
isFileDescriptorPassingSupported
boolean isFileDescriptorPassingSupported()Indicate if reader/writer supports file descriptor passing. This is to show if the provider is able to handle file descriptors.- Gibt zurück:
- true if file descriptors are supported by this provider, false otherwise
-
getFileDescriptorValue
Attempts to extract raw FileDescriptor value fromFileDescriptor
instance. Note that not anyFileDescriptor
can be represented as int, for example Windows uses HANDLE as descriptor, which excess range of int values, thus cannot be safely cast to int.- Parameter:
_fd
- FileDescriptor to extract value from- Gibt zurück:
- int representation, packed to
Optional
if operation succeeded, orOptional.empty()
otherwise - Seit:
- 5.0.0 - 2023-10-07
- Siehe auch:
-
createFileDescriptor
Attempts to create nativeFileDescriptor
from raw int value.- Parameter:
_fd
- FileDescriptor to extract value from- Gibt zurück:
FileDescriptor
, instantiated with provided value, packed toOptional
if operation succeeded, orOptional.empty()
otherwise- Seit:
- 5.0.0 - 2023-10-07
- Siehe auch:
-