Package java.nio.channels

Examples of java.nio.channels.UnresolvedAddressException


            throw new UnsupportedAddressTypeException();
        }

        InetSocketAddress inetLocal = (InetSocketAddress) local;
        if ((inetLocal != null) && inetLocal.isUnresolved()) {
            throw new UnresolvedAddressException();
        }

        final DatagramSocket socket = channel.socket();
        try {
            socket.bind(inetLocal);
View Full Code Here


            throw new UnsupportedAddressTypeException();
        }

        InetSocketAddress inetRemote = (InetSocketAddress) remote;
        if ((inetRemote != null) && inetRemote.isUnresolved()) {
            throw new UnresolvedAddressException();
        }

        FutureTask<Void> task = new FutureTask<Void>(
            new Callable<Void>() {
                public Void call() throws IOException {
View Full Code Here

        if (!(address instanceof InetSocketAddress)) {
            throw new IOException("InetSocketAddress expected");
        }
        final InetSocketAddress sa = (InetSocketAddress) address;
        if (sa.isUnresolved()) {
            throw new UnresolvedAddressException();
        }
        if (controlBlock == null) {
            bind(InetAddress.getLocalHost(), 0);
        }
        controlBlock.appConnect(new IPv4Address(sa.getAddress()), sa.getPort());
View Full Code Here

        if (!(socketAddress instanceof InetSocketAddress)) {
            throw new UnsupportedAddressTypeException();
        }
        InetSocketAddress inetSocketAddress = (InetSocketAddress) socketAddress;
        if (inetSocketAddress.isUnresolved()) {
            throw new UnresolvedAddressException();
        }
        return inetSocketAddress;
    }
View Full Code Here

            throw new UnsupportedAddressTypeException();
        }

        InetSocketAddress inetLocal = (InetSocketAddress) local;
        if ((inetLocal != null) && inetLocal.isUnresolved()) {
            throw new UnresolvedAddressException();
        }

        final Socket socket = channel.socket();
        try {
            socket.bind(inetLocal);
View Full Code Here

            throw new UnsupportedAddressTypeException();
        }

        InetSocketAddress inetLocal = (InetSocketAddress) local;
        if ((inetLocal != null) && inetLocal.isUnresolved()) {
            throw new UnresolvedAddressException();
        }

        final ServerSocket socket = channel.socket();

        try {
View Full Code Here

    InetSocketAddress remoteSocket = (InetSocketAddress) remote;
    if (remoteSocket.isUnresolved()) {
      log.error("can not use unresolved address: remote={}", remote);
      close();
      throw new UnresolvedAddressException();
    }

    if (isBlocking()) {
      if (isConnectionPending) {
        close();
View Full Code Here

        if (!(socketAddress instanceof InetSocketAddress)) {
            throw new UnsupportedAddressTypeException();
        }
        InetSocketAddress inetSocketAddress = (InetSocketAddress) socketAddress;
        if (inetSocketAddress.isUnresolved()) {
            throw new UnresolvedAddressException();
        }
        return inetSocketAddress;
    }
View Full Code Here

    /**
     * @tests serialization/deserialization compatibility.
     */
    public void testSerializationSelf() throws Exception {

        SerializationTest.verifySelf(new UnresolvedAddressException());
    }
View Full Code Here

    /**
     * @tests serialization/deserialization compatibility with RI.
     */
    public void testSerializationCompatibility() throws Exception {

        SerializationTest.verifyGolden(this, new UnresolvedAddressException());
    }
View Full Code Here

TOP

Related Classes of java.nio.channels.UnresolvedAddressException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.