equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright 2007-2008 Sun Microsystems, Inc. All Rights Reserved. |
2 * Copyright 2007-2009 Sun Microsystems, Inc. All Rights Reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Sun designates this |
7 * published by the Free Software Foundation. Sun designates this |
93 * <p> Where the channel is {@link #bind bound} to an Internet Protocol |
93 * <p> Where the channel is {@link #bind bound} to an Internet Protocol |
94 * socket address then the return value from this method is of type {@link |
94 * socket address then the return value from this method is of type {@link |
95 * java.net.InetSocketAddress}. |
95 * java.net.InetSocketAddress}. |
96 * |
96 * |
97 * @return The socket address that the socket is bound to, or {@code null} |
97 * @return The socket address that the socket is bound to, or {@code null} |
98 * if the channel is not {@link #isOpen open} or the channel's socket |
98 * if the channel's socket is not bound |
99 * is not bound |
|
100 * |
99 * |
|
100 * @throws ClosedChannelException |
|
101 * If the channel is closed |
101 * @throws IOException |
102 * @throws IOException |
102 * If an I/O error occurs |
103 * If an I/O error occurs |
103 */ |
104 */ |
104 SocketAddress getLocalAddress() throws IOException; |
105 SocketAddress getLocalAddress() throws IOException; |
105 |
106 |
112 * The value of the socket option. A value of {@code null} may be |
113 * The value of the socket option. A value of {@code null} may be |
113 * a valid value for some socket options. |
114 * a valid value for some socket options. |
114 * |
115 * |
115 * @return This channel |
116 * @return This channel |
116 * |
117 * |
|
118 * @throws UnsupportedOperationException |
|
119 * If the socket option is not supported by this channel |
117 * @throws IllegalArgumentException |
120 * @throws IllegalArgumentException |
118 * If the socket option is not supported by this channel, or |
121 * If the value is not a valid value for this socket option |
119 * the value is not a valid value for this socket option |
|
120 * @throws ClosedChannelException |
122 * @throws ClosedChannelException |
121 * If this channel is closed |
123 * If this channel is closed |
122 * @throws IOException |
124 * @throws IOException |
123 * If an I/O error occurs |
125 * If an I/O error occurs |
124 * |
126 * |
133 * The socket option |
135 * The socket option |
134 * |
136 * |
135 * @return The value of the socket option. A value of {@code null} may be |
137 * @return The value of the socket option. A value of {@code null} may be |
136 * a valid value for some socket options. |
138 * a valid value for some socket options. |
137 * |
139 * |
138 * @throws IllegalArgumentException |
140 * @throws UnsupportedOperationException |
139 * If the socket option is not supported by this channel |
141 * If the socket option is not supported by this channel |
140 * @throws ClosedChannelException |
142 * @throws ClosedChannelException |
141 * If this channel is closed |
143 * If this channel is closed |
142 * @throws IOException |
144 * @throws IOException |
143 * If an I/O error occurs |
145 * If an I/O error occurs |
152 * <p> This method will continue to return the set of options even after the |
154 * <p> This method will continue to return the set of options even after the |
153 * channel has been closed. |
155 * channel has been closed. |
154 * |
156 * |
155 * @return A set of the socket options supported by this channel |
157 * @return A set of the socket options supported by this channel |
156 */ |
158 */ |
157 Set<SocketOption<?>> options(); |
159 Set<SocketOption<?>> supportedOptions(); |
158 } |
160 } |