/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// Make a server-socket channel look like a server socket.
//
// The methods in this class are defined in exactly the same order as in
// java.net.ServerSocket so as to simplify tracking future changes to that
// class.
//
extends ServerSocket
{
// The channel being adapted
// Timeout "option" value for accepts
try {
return new ServerSocketAdaptor(ssc);
} catch (IOException x) {
throw new Error(x);
}
}
// ## super will create a useless impl
throws IOException
{
}
}
try {
} catch (Exception x) {
}
}
return null;
}
public int getLocalPort() {
return -1;
}
synchronized (ssc.blockingLock()) {
throw new IllegalBlockingModeException();
try {
if (timeout == 0) {
throw new IllegalBlockingModeException();
}
// Implement timeout with a selector
ssc.configureBlocking(false);
try {
for (;;) {
throw new ClosedChannelException();
if (ns > 0 &&
if (to <= 0)
throw new SocketTimeoutException();
}
} finally {
ssc.configureBlocking(true);
}
} catch (Exception x) {
assert false;
return null; // Never happens
}
}
}
}
return ssc;
}
public boolean isBound() {
}
public boolean isClosed() {
}
}
return timeout;
}
try {
} catch (IOException x) {
}
}
try {
} catch (IOException x) {
return false; // Never happens
}
}
if (!isBound())
return "ServerSocket[unbound]";
return "ServerSocket[addr=" + getInetAddress() +
// ",port=" + getPort() +
}
// size 0 valid for ServerSocketChannel, invalid for ServerSocket
if (size <= 0)
throw new IllegalArgumentException("size cannot be 0 or negative");
try {
} catch (IOException x) {
}
}
try {
} catch (IOException x) {
return -1; // Never happens
}
}
}