//
//  Generated by the J2ObjC translator.  DO NOT EDIT!
//  source: android/libcore/luni/src/main/java/java/nio/channels/InterruptibleChannel.java
//

#include "../../../J2ObjC_header.h"

#pragma push_macro("JavaNioChannelsInterruptibleChannel_INCLUDE_ALL")
#ifdef JavaNioChannelsInterruptibleChannel_RESTRICT
#define JavaNioChannelsInterruptibleChannel_INCLUDE_ALL 0
#else
#define JavaNioChannelsInterruptibleChannel_INCLUDE_ALL 1
#endif
#undef JavaNioChannelsInterruptibleChannel_RESTRICT

#pragma clang diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"

#if !defined (JavaNioChannelsInterruptibleChannel_) && (JavaNioChannelsInterruptibleChannel_INCLUDE_ALL || defined(JavaNioChannelsInterruptibleChannel_INCLUDE))
#define JavaNioChannelsInterruptibleChannel_

#define JavaNioChannelsChannel_RESTRICT 1
#define JavaNioChannelsChannel_INCLUDE 1
#include "../../../java/nio/channels/Channel.h"

/*!
 @brief Channels that implement this interface can be asynchronously closed and
 interrupted.
 <p>
 A channel that can be asynchronously closed permits that a thread blocked on
 an I/O operation (the I/O thread) can be released by another thread calling
 the channel's <code>close()</code> method. The I/O thread will throw an
 <code>AsynchronousCloseException</code> and the channel will be closed.
 <p>
 A channel that is interruptible permits a thread blocked on an I/O operation
 (the I/O thread) to be interrupted by another thread (by invoking
 <code>Thread.interrupt()</code> on the I/O thread). When the I/O thread is
 interrupted it will throw a <code>ClosedByInterruptException</code>, it will have
 its interrupted status set and the channel will be closed. If the I/O thread
 attempts to make an I/O call with the interrupt status set the call will
 immediately fail with a <code>ClosedByInterruptException</code>.
 */
@protocol JavaNioChannelsInterruptibleChannel < JavaNioChannelsChannel, NSObject, JavaObject >

/*!
 @brief Closes the channel.
 <p>
 Any threads that are blocked on I/O operations on this channel will be
 interrupted with an <code>AsynchronousCloseException</code>. Otherwise, this
 method behaves the same as defined in the <code>Channel</code> interface.
 @throws IOException
 if an I/O error occurs while closing the channel.
 */
- (void)close;

@end

J2OBJC_EMPTY_STATIC_INIT(JavaNioChannelsInterruptibleChannel)

J2OBJC_TYPE_LITERAL_HEADER(JavaNioChannelsInterruptibleChannel)

#endif


#pragma clang diagnostic pop
#pragma pop_macro("JavaNioChannelsInterruptibleChannel_INCLUDE_ALL")
