< prev index next >

src/jdk.sctp/share/classes/com/sun/nio/sctp/SctpMultiChannel.java

Print this page




  46  * to be thrown. An attempt to invoke the {@link #send send} method of an
  47  * unbound channel will cause it to first invoke the {@link #bind bind} method.
  48  * The address(es) that the channel's socket is bound to can be retrieved by
  49  * calling {@link #getAllLocalAddresses getAllLocalAddresses}.
  50  *
  51  * <P> Messages may be sent and received without explicitly setting up an
  52  * association with the remote peer. The channel will implicitly setup
  53  * a new association whenever it sends or receives a message from a remote
  54  * peer if there is not already an association with that peer. Upon successful
  55  * association setup, an {@link AssociationChangeNotification
  56  * association changed} notification will be put to the SCTP stack with its
  57  * {@code event} parameter set to {@link
  58  * AssociationChangeNotification.AssocChangeEvent#COMM_UP
  59  * COMM_UP}. This notification can be received by invoking {@link #receive
  60  * receive}.
  61  *
  62  * <P> Socket options are configured using the
  63  * {@link #setOption(SctpSocketOption,Object,Association) setOption} method. An
  64  * {@code SctpMultiChannel} supports the following options:
  65  * <blockquote>
  66  * <table class="striped"><caption style="display:none">Socket options</caption>


  67  *   <tr>
  68  *     <th>Option Name</th>
  69  *     <th>Description</th>
  70  *   </tr>


  71  *   <tr>
  72  *     <td> {@link SctpStandardSocketOptions#SCTP_DISABLE_FRAGMENTS
  73  *                                          SCTP_DISABLE_FRAGMENTS} </td>
  74  *     <td> Enables or disables message fragmentation </td>
  75  *   </tr>
  76  *   <tr>
  77  *     <td> {@link SctpStandardSocketOptions#SCTP_EXPLICIT_COMPLETE
  78  *                                          SCTP_EXPLICIT_COMPLETE} </td>
  79  *     <td> Enables or disables explicit message completion </td>
  80  *   </tr>
  81  *    <tr>
  82  *     <td> {@link SctpStandardSocketOptions#SCTP_FRAGMENT_INTERLEAVE
  83  *                                          SCTP_FRAGMENT_INTERLEAVE} </td>
  84  *     <td> Controls how the presentation of messages occur for the message
  85  *          receiver </td>
  86  *   </tr>
  87  *   <tr>
  88  *     <td> {@link SctpStandardSocketOptions#SCTP_INIT_MAXSTREAMS
  89  *                                          SCTP_INIT_MAXSTREAMS} </td>
  90  *     <td> The maximum number of streams requested by the local endpoint during
  91  *          association initialization </td>
  92  *   </tr>
  93  *   <tr>
  94  *     <td> {@link SctpStandardSocketOptions#SCTP_NODELAY SCTP_NODELAY} </td>
  95  *     <td> Enables or disable a Nagle-like algorithm </td>
  96  *   </tr>
  97  *   <tr>
  98  *     <td> {@link SctpStandardSocketOptions#SCTP_PRIMARY_ADDR
  99  *                                          SCTP_PRIMARY_ADDR} </td>
 100  *     <td> Requests that the local SCTP stack use the given peer address as the
 101  *          association primary </td>
 102  *   </tr>
 103  *   <tr>
 104  *     <td> {@link SctpStandardSocketOptions#SCTP_SET_PEER_PRIMARY_ADDR
 105  *                                          SCTP_SET_PEER_PRIMARY_ADDR} </td>
 106  *     <td> Requests that the peer mark the enclosed address as the association
 107  *          primary </td>
 108  *   </tr>
 109  *   <tr>
 110  *     <td> {@link SctpStandardSocketOptions#SO_SNDBUF
 111  *                                          SO_SNDBUF} </td>
 112  *     <td> The size of the socket send buffer </td>
 113  *   </tr>
 114  *   <tr>
 115  *     <td> {@link SctpStandardSocketOptions#SO_RCVBUF
 116  *                                          SO_RCVBUF} </td>
 117  *     <td> The size of the socket receive buffer </td>
 118  *   </tr>
 119  *   <tr>
 120  *     <td> {@link SctpStandardSocketOptions#SO_LINGER
 121  *                                          SO_LINGER} </td>
 122  *     <td> Linger on close if data is present (when configured in blocking mode
 123  *          only) </td>
 124  *   </tr>

 125  * </table>
 126  * </blockquote>
 127  * Additional (implementation specific) options may also be supported. The list
 128  * of options supported is obtained by invoking the {@link #supportedOptions()
 129  * supportedOptions} method.
 130  *
 131  * <p> SCTP multi channels are safe for use by multiple concurrent threads.
 132  * They support concurrent sending and receiving, though at most one thread may be
 133  * sending and at most one thread may be receiving at any given time.
 134  *
 135  * @since 1.7
 136  */
 137 public abstract class SctpMultiChannel
 138     extends AbstractSelectableChannel
 139 {
 140     /**
 141      * Initializes a new instance of this class.
 142      *
 143      * @param  provider
 144      *         The selector provider for this channel




  46  * to be thrown. An attempt to invoke the {@link #send send} method of an
  47  * unbound channel will cause it to first invoke the {@link #bind bind} method.
  48  * The address(es) that the channel's socket is bound to can be retrieved by
  49  * calling {@link #getAllLocalAddresses getAllLocalAddresses}.
  50  *
  51  * <P> Messages may be sent and received without explicitly setting up an
  52  * association with the remote peer. The channel will implicitly setup
  53  * a new association whenever it sends or receives a message from a remote
  54  * peer if there is not already an association with that peer. Upon successful
  55  * association setup, an {@link AssociationChangeNotification
  56  * association changed} notification will be put to the SCTP stack with its
  57  * {@code event} parameter set to {@link
  58  * AssociationChangeNotification.AssocChangeEvent#COMM_UP
  59  * COMM_UP}. This notification can be received by invoking {@link #receive
  60  * receive}.
  61  *
  62  * <P> Socket options are configured using the
  63  * {@link #setOption(SctpSocketOption,Object,Association) setOption} method. An
  64  * {@code SctpMultiChannel} supports the following options:
  65  * <blockquote>
  66  * <table class="striped">
  67  *   <caption style="display:none">Socket options</caption>
  68  *   <thead>
  69  *   <tr>
  70  *     <th scope="col">Option Name</th>
  71  *     <th scope="col">Description</th>
  72  *   </tr>
  73  *   </thead>
  74  *   <tbody>
  75  *   <tr>
  76  *     <th scope="row"> {@link SctpStandardSocketOptions#SCTP_DISABLE_FRAGMENTS
  77  *                                          SCTP_DISABLE_FRAGMENTS} </th>
  78  *     <td> Enables or disables message fragmentation </td>
  79  *   </tr>
  80  *   <tr>
  81  *     <th scope="row"> {@link SctpStandardSocketOptions#SCTP_EXPLICIT_COMPLETE
  82  *                                          SCTP_EXPLICIT_COMPLETE} </th>
  83  *     <td> Enables or disables explicit message completion </td>
  84  *   </tr>
  85  *    <tr>
  86  *     <th scope="row"> {@link SctpStandardSocketOptions#SCTP_FRAGMENT_INTERLEAVE
  87  *                                          SCTP_FRAGMENT_INTERLEAVE} </th>
  88  *     <td> Controls how the presentation of messages occur for the message
  89  *          receiver </td>
  90  *   </tr>
  91  *   <tr>
  92  *     <th scope="row"> {@link SctpStandardSocketOptions#SCTP_INIT_MAXSTREAMS
  93  *                                          SCTP_INIT_MAXSTREAMS} </th>
  94  *     <td> The maximum number of streams requested by the local endpoint during
  95  *          association initialization </td>
  96  *   </tr>
  97  *   <tr>
  98  *     <th scope="row"> {@link SctpStandardSocketOptions#SCTP_NODELAY SCTP_NODELAY} </th>
  99  *     <td> Enables or disable a Nagle-like algorithm </td>
 100  *   </tr>
 101  *   <tr>
 102  *     <th scope="row"> {@link SctpStandardSocketOptions#SCTP_PRIMARY_ADDR
 103  *                                          SCTP_PRIMARY_ADDR} </th>
 104  *     <td> Requests that the local SCTP stack use the given peer address as the
 105  *          association primary </td>
 106  *   </tr>
 107  *   <tr>
 108  *     <th scope="row"> {@link SctpStandardSocketOptions#SCTP_SET_PEER_PRIMARY_ADDR
 109  *                                          SCTP_SET_PEER_PRIMARY_ADDR} </th>
 110  *     <td> Requests that the peer mark the enclosed address as the association
 111  *          primary </td>
 112  *   </tr>
 113  *   <tr>
 114  *     <th scope="row"> {@link SctpStandardSocketOptions#SO_SNDBUF
 115  *                                          SO_SNDBUF} </th>
 116  *     <td> The size of the socket send buffer </td>
 117  *   </tr>
 118  *   <tr>
 119  *     <th scope="row"> {@link SctpStandardSocketOptions#SO_RCVBUF
 120  *                                          SO_RCVBUF} </th>
 121  *     <td> The size of the socket receive buffer </td>
 122  *   </tr>
 123  *   <tr>
 124  *     <th scope="row"> {@link SctpStandardSocketOptions#SO_LINGER
 125  *                                          SO_LINGER} </th>
 126  *     <td> Linger on close if data is present (when configured in blocking mode
 127  *          only) </td>
 128  *   </tr>
 129  *   </tbody>
 130  * </table>
 131  * </blockquote>
 132  * Additional (implementation specific) options may also be supported. The list
 133  * of options supported is obtained by invoking the {@link #supportedOptions()
 134  * supportedOptions} method.
 135  *
 136  * <p> SCTP multi channels are safe for use by multiple concurrent threads.
 137  * They support concurrent sending and receiving, though at most one thread may be
 138  * sending and at most one thread may be receiving at any given time.
 139  *
 140  * @since 1.7
 141  */
 142 public abstract class SctpMultiChannel
 143     extends AbstractSelectableChannel
 144 {
 145     /**
 146      * Initializes a new instance of this class.
 147      *
 148      * @param  provider
 149      *         The selector provider for this channel


< prev index next >