30 import java.util.Set; 31 import java.nio.channels.SelectionKey; 32 import java.nio.channels.spi.SelectorProvider; 33 import java.nio.channels.spi.AbstractSelectableChannel; 34 35 /** 36 * A selectable channel for message-oriented listening SCTP sockets. 37 * 38 * <p> An {@code SCTPServerChannel} is created by invoking the 39 * {@link #open open} method of this class. A newly-created SCTP server 40 * channel is open but not yet bound. An attempt to invoke the 41 * {@link #accept accept} method of an unbound channel will cause the 42 * {@link java.nio.channels.NotYetBoundException} to be thrown. An SCTP server 43 * channel can be bound by invoking one of the 44 * {@link #bind(java.net.SocketAddress,int) bind} methods defined by this class. 45 * 46 * <p> Socket options are configured using the 47 * {@link #setOption(SctpSocketOption,Object) setOption} method. SCTP server socket 48 * channels support the following options: 49 * <blockquote> 50 * <table><caption style="display:none">Socket options</caption> 51 * <tr> 52 * <th>Option Name</th> 53 * <th>Description</th> 54 * </tr> 55 * <tr> 56 * <td> {@link SctpStandardSocketOptions#SCTP_INIT_MAXSTREAMS 57 * SCTP_INIT_MAXSTREAMS} </td> 58 * <td> The maximum number of streams requested by the local endpoint during 59 * association initialization </td> 60 * </tr> 61 * </table> 62 * </blockquote> 63 * Additional (implementation specific) options may also be supported. The list 64 * of options supported is obtained by invoking the {@link #supportedOptions() 65 * supportedOptions} method. 66 * 67 * <p>SCTP server channels are safe for use by multiple concurrent threads. 68 * 69 * @since 1.7 70 */ 71 public abstract class SctpServerChannel 72 extends AbstractSelectableChannel 73 { 74 /** 75 * Initializes a new instance of this class. 76 * 77 * @param provider 78 * The selector provider for this channel 79 */ 80 protected SctpServerChannel(SelectorProvider provider) { | 30 import java.util.Set; 31 import java.nio.channels.SelectionKey; 32 import java.nio.channels.spi.SelectorProvider; 33 import java.nio.channels.spi.AbstractSelectableChannel; 34 35 /** 36 * A selectable channel for message-oriented listening SCTP sockets. 37 * 38 * <p> An {@code SCTPServerChannel} is created by invoking the 39 * {@link #open open} method of this class. A newly-created SCTP server 40 * channel is open but not yet bound. An attempt to invoke the 41 * {@link #accept accept} method of an unbound channel will cause the 42 * {@link java.nio.channels.NotYetBoundException} to be thrown. An SCTP server 43 * channel can be bound by invoking one of the 44 * {@link #bind(java.net.SocketAddress,int) bind} methods defined by this class. 45 * 46 * <p> Socket options are configured using the 47 * {@link #setOption(SctpSocketOption,Object) setOption} method. SCTP server socket 48 * channels support the following options: 49 * <blockquote> 50 * <table class="striped"> 51 * <caption style="display:none">Socket options</caption> 52 * <thead> 53 * <tr> 54 * <th scope="col">Option Name</th> 55 * <th scope="col">Description</th> 56 * </tr> 57 * </thead> 58 * <tbody> 59 * <tr> 60 * <th scope="row"> {@link SctpStandardSocketOptions#SCTP_INIT_MAXSTREAMS 61 * SCTP_INIT_MAXSTREAMS} </th> 62 * <td> The maximum number of streams requested by the local endpoint during 63 * association initialization </td> 64 * </tr> 65 * </tbody> 66 * </table> 67 * </blockquote> 68 * Additional (implementation specific) options may also be supported. The list 69 * of options supported is obtained by invoking the {@link #supportedOptions() 70 * supportedOptions} method. 71 * 72 * <p>SCTP server channels are safe for use by multiple concurrent threads. 73 * 74 * @since 1.7 75 */ 76 public abstract class SctpServerChannel 77 extends AbstractSelectableChannel 78 { 79 /** 80 * Initializes a new instance of this class. 81 * 82 * @param provider 83 * The selector provider for this channel 84 */ 85 protected SctpServerChannel(SelectorProvider provider) { |