@Deprecated public static FileDescriptor getDescriptorFromChannel(Channel channel) { return FilenoUtil.getDescriptorFromChannel(channel); }
@Deprecated public static FileDescriptor getDescriptorFromChannel(Channel channel) { return FilenoUtil.getDescriptorFromChannel(channel); }
/** * Construct a new ChannelDescriptor with the given channel, file number, * and file descriptor object. The channel will be kept open until all ChannelDescriptor * references to it have been closed. The channel's capabilities will be used * to determine the "original" set of mode flags. This version generates a * new fileno. * * @param channel The channel for the new descriptor */ public ChannelDescriptor(Channel channel) throws InvalidValueException { this(channel, ModeFlags.getModesFromChannel(channel), FilenoUtil.getDescriptorFromChannel(channel)); }
private static int getFilenoUsingReflection(Channel channel) { if (ReflectiveAccess.FILE_DESCRIPTOR_FD != null) { return filenoFrom(getDescriptorFromChannel(channel)); } return -1; }
/** * Construct a new ChannelDescriptor with the given channel, file number, mode flags, * and file descriptor object. The channel will be kept open until all ChannelDescriptor * references to it have been closed. * * @param channel The channel for the new descriptor * @param originalModes The mode flags for the new descriptor */ public ChannelDescriptor(Channel channel, ModeFlags originalModes) { this(channel, getNewFileno(), originalModes, FilenoUtil.getDescriptorFromChannel(channel), new AtomicInteger(1), true, false); }
private static int getFilenoUsingReflection(Channel channel) { if (ReflectiveAccess.FILE_DESCRIPTOR_FD != null) { return filenoFrom(getDescriptorFromChannel(channel)); } return -1; }
/** * Construct a new ChannelDescriptor with the given channel, file number, mode flags, * and file descriptor object. The channel will be kept open until all ChannelDescriptor * references to it have been closed. * * @param channel The channel for the new descriptor * @param originalModes The mode flags for the new descriptor */ public ChannelDescriptor(Channel channel, ModeFlags originalModes) { this(channel, getNewFileno(), originalModes, FilenoUtil.getDescriptorFromChannel(channel), new AtomicInteger(1), true, false); }
/** * Construct a new ChannelDescriptor with the given channel, file number, * and file descriptor object. The channel will be kept open until all ChannelDescriptor * references to it have been closed. The channel's capabilities will be used * to determine the "original" set of mode flags. This version generates a * new fileno. * * @param channel The channel for the new descriptor */ public ChannelDescriptor(Channel channel) throws InvalidValueException { this(channel, ModeFlags.getModesFromChannel(channel), FilenoUtil.getDescriptorFromChannel(channel)); }