42 * {@link #open open} methods of this class. A newly-created channel is open but 43 * not yet connected, that is, there is no association setup with a remote peer. 44 * An attempt to invoke an I/O operation upon an unconnected 45 * channel will cause a {@link java.nio.channels.NotYetConnectedException} to be 46 * thrown. An association can be setup by connecting the channel using one of 47 * its {@link #connect connect} methods. Once connected, the channel remains 48 * connected until it is closed. Whether or not a channel is connected may be 49 * determined by invoking {@link #getRemoteAddresses getRemoteAddresses}. 50 * 51 * <p> SCTP channels support <i>non-blocking connection:</i> A 52 * channel may be created and the process of establishing the link to 53 * the remote socket may be initiated via the {@link #connect connect} method 54 * for later completion by the {@link #finishConnect finishConnect} method. 55 * Whether or not a connection operation is in progress may be determined by 56 * invoking the {@link #isConnectionPending isConnectionPending} method. 57 * 58 * <p> Socket options are configured using the 59 * {@link #setOption(SctpSocketOption,Object) setOption} method. An SCTP 60 * channel support the following options: 61 * <blockquote> 62 * <table class="striped"><caption style="display:none">Socket options</caption> 63 * <tr> 64 * <th>Option Name</th> 65 * <th>Description</th> 66 * </tr> 67 * <tr> 68 * <td> {@link SctpStandardSocketOptions#SCTP_DISABLE_FRAGMENTS 69 * SCTP_DISABLE_FRAGMENTS} </td> 70 * <td> Enables or disables message fragmentation </td> 71 * </tr> 72 * <tr> 73 * <td> {@link SctpStandardSocketOptions#SCTP_EXPLICIT_COMPLETE 74 * SCTP_EXPLICIT_COMPLETE} </td> 75 * <td> Enables or disables explicit message completion </td> 76 * </tr> 77 * <tr> 78 * <td> {@link SctpStandardSocketOptions#SCTP_FRAGMENT_INTERLEAVE 79 * SCTP_FRAGMENT_INTERLEAVE} </td> 80 * <td> Controls how the presentation of messages occur for the message 81 * receiver </td> 82 * </tr> 83 * <tr> 84 * <td> {@link SctpStandardSocketOptions#SCTP_INIT_MAXSTREAMS 85 * SCTP_INIT_MAXSTREAMS} </td> 86 * <td> The maximum number of streams requested by the local endpoint during 87 * association initialization </td> 88 * </tr> 89 * <tr> 90 * <td> {@link SctpStandardSocketOptions#SCTP_NODELAY SCTP_NODELAY} </td> 91 * <td> Enables or disable a Nagle-like algorithm </td> 92 * </tr> 93 * <tr> 94 * <td> {@link SctpStandardSocketOptions#SCTP_PRIMARY_ADDR 95 * SCTP_PRIMARY_ADDR} </td> 96 * <td> Requests that the local SCTP stack use the given peer address as the 97 * association primary </td> 98 * </tr> 99 * <tr> 100 * <td> {@link SctpStandardSocketOptions#SCTP_SET_PEER_PRIMARY_ADDR 101 * SCTP_SET_PEER_PRIMARY_ADDR} </td> 102 * <td> Requests that the peer mark the enclosed address as the association 103 * primary </td> 104 * </tr> 105 * <tr> 106 * <td> {@link SctpStandardSocketOptions#SO_SNDBUF 107 * SO_SNDBUF} </td> 108 * <td> The size of the socket send buffer </td> 109 * </tr> 110 * <tr> 111 * <td> {@link SctpStandardSocketOptions#SO_RCVBUF 112 * SO_RCVBUF} </td> 113 * <td> The size of the socket receive buffer </td> 114 * </tr> 115 * <tr> 116 * <td> {@link SctpStandardSocketOptions#SO_LINGER 117 * SO_LINGER} </td> 118 * <td> Linger on close if data is present (when configured in blocking mode 119 * only) </td> 120 * </tr> 121 * </table> 122 * </blockquote> 123 * Additional (implementation specific) options may also be supported. The list 124 * of options supported is obtained by invoking the {@link #supportedOptions() 125 * supportedOptions} method. 126 * 127 * <p> SCTP channels are safe for use by multiple concurrent threads. 128 * They support concurrent reading and writing, though at most one thread may be 129 * reading and at most one thread may be writing at any given time. The 130 * {@link #connect connect} and {@link #finishConnect 131 * finishConnect} methods are mutually synchronized against each other, and 132 * an attempt to initiate a send or receive operation while an invocation of one 133 * of these methods is in progress will block until that invocation is complete. 134 * 135 * @since 1.7 136 */ 137 public abstract class SctpChannel 138 extends AbstractSelectableChannel 139 { 140 /** | 42 * {@link #open open} methods of this class. A newly-created channel is open but 43 * not yet connected, that is, there is no association setup with a remote peer. 44 * An attempt to invoke an I/O operation upon an unconnected 45 * channel will cause a {@link java.nio.channels.NotYetConnectedException} to be 46 * thrown. An association can be setup by connecting the channel using one of 47 * its {@link #connect connect} methods. Once connected, the channel remains 48 * connected until it is closed. Whether or not a channel is connected may be 49 * determined by invoking {@link #getRemoteAddresses getRemoteAddresses}. 50 * 51 * <p> SCTP channels support <i>non-blocking connection:</i> A 52 * channel may be created and the process of establishing the link to 53 * the remote socket may be initiated via the {@link #connect connect} method 54 * for later completion by the {@link #finishConnect finishConnect} method. 55 * Whether or not a connection operation is in progress may be determined by 56 * invoking the {@link #isConnectionPending isConnectionPending} method. 57 * 58 * <p> Socket options are configured using the 59 * {@link #setOption(SctpSocketOption,Object) setOption} method. An SCTP 60 * channel support the following options: 61 * <blockquote> 62 * <table class="striped"> 63 * <caption style="display:none">Socket options</caption> 64 * <thead> 65 * <tr> 66 * <th scope="col">Option Name</th> 67 * <th scope="col">Description</th> 68 * </tr> 69 * </thead> 70 * <tbody> 71 * <tr> 72 * <th scope="row"> {@link SctpStandardSocketOptions#SCTP_DISABLE_FRAGMENTS 73 * SCTP_DISABLE_FRAGMENTS} </th> 74 * <td> Enables or disables message fragmentation </td> 75 * </tr> 76 * <tr> 77 * <th scope="row"> {@link SctpStandardSocketOptions#SCTP_EXPLICIT_COMPLETE 78 * SCTP_EXPLICIT_COMPLETE} </th> 79 * <td> Enables or disables explicit message completion </td> 80 * </tr> 81 * <tr> 82 * <th scope="row"> {@link SctpStandardSocketOptions#SCTP_FRAGMENT_INTERLEAVE 83 * SCTP_FRAGMENT_INTERLEAVE} </th> 84 * <td> Controls how the presentation of messages occur for the message 85 * receiver </td> 86 * </tr> 87 * <tr> 88 * <th scope="row"> {@link SctpStandardSocketOptions#SCTP_INIT_MAXSTREAMS 89 * SCTP_INIT_MAXSTREAMS} </th> 90 * <td> The maximum number of streams requested by the local endpoint during 91 * association initialization </td> 92 * </tr> 93 * <tr> 94 * <th scope="row"> {@link SctpStandardSocketOptions#SCTP_NODELAY SCTP_NODELAY} </th> 95 * <td> Enables or disable a Nagle-like algorithm </td> 96 * </tr> 97 * <tr> 98 * <th scope="row"> {@link SctpStandardSocketOptions#SCTP_PRIMARY_ADDR 99 * SCTP_PRIMARY_ADDR} </th> 100 * <td> Requests that the local SCTP stack use the given peer address as the 101 * association primary </td> 102 * </tr> 103 * <tr> 104 * <th scope="row"> {@link SctpStandardSocketOptions#SCTP_SET_PEER_PRIMARY_ADDR 105 * SCTP_SET_PEER_PRIMARY_ADDR} </th> 106 * <td> Requests that the peer mark the enclosed address as the association 107 * primary </td> 108 * </tr> 109 * <tr> 110 * <th scope="row"> {@link SctpStandardSocketOptions#SO_SNDBUF 111 * SO_SNDBUF} </th> 112 * <td> The size of the socket send buffer </td> 113 * </tr> 114 * <tr> 115 * <th scope="row"> {@link SctpStandardSocketOptions#SO_RCVBUF 116 * SO_RCVBUF} </th> 117 * <td> The size of the socket receive buffer </td> 118 * </tr> 119 * <tr> 120 * <th scope="row"> {@link SctpStandardSocketOptions#SO_LINGER 121 * SO_LINGER} </th> 122 * <td> Linger on close if data is present (when configured in blocking mode 123 * only) </td> 124 * </tr> 125 * </tbody> 126 * </table> 127 * </blockquote> 128 * Additional (implementation specific) options may also be supported. The list 129 * of options supported is obtained by invoking the {@link #supportedOptions() 130 * supportedOptions} method. 131 * 132 * <p> SCTP channels are safe for use by multiple concurrent threads. 133 * They support concurrent reading and writing, though at most one thread may be 134 * reading and at most one thread may be writing at any given time. The 135 * {@link #connect connect} and {@link #finishConnect 136 * finishConnect} methods are mutually synchronized against each other, and 137 * an attempt to initiate a send or receive operation while an invocation of one 138 * of these methods is in progress will block until that invocation is complete. 139 * 140 * @since 1.7 141 */ 142 public abstract class SctpChannel 143 extends AbstractSelectableChannel 144 { 145 /** |