Package pcap.spi
Interface Selectable
- All Superinterfaces:
AutoCloseable
- All Known Subinterfaces:
Pcap
Object that can be multiplexed via a
Selector
.- Since:
- 1.1.0
-
Method Summary
-
Method Details
-
id
Get selectablefile descriptor
on Unix, orHANDLE
event on Windows.- Returns:
- returns selectable id, or
null
on error. - Throws:
IllegalAccessException
- restricted function call.- Since:
- 1.3.1
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
- error when closing object handle (fd).
-
register
Selection register(Selector selector, int interestOperations, Object attachment) throws IllegalArgumentException, IllegalStateException RegisterSelectable
to givenSelector
.- Parameters:
selector
- selector.interestOperations
- interest operations.attachment
- attachment.- Returns:
- returns
Selection
on success. - Throws:
IllegalArgumentException
- illegal argument.IllegalStateException
- selector is closed.- Since:
- 1.4.0
-