Package com.art.anette.exceptions

Examples of com.art.anette.exceptions.NetworkException


            if (NetworkControl.wasCausedByClosedSocket(ex)) {
                logger.info("Client closed the connection");
                return false;
            } else {
                logger.severe(null, ex);
                throw new NetworkException("Sending failed!", ex);
            }
        }
    }
View Full Code Here


            logger.info("Connected to " + hostname + ':' + port);
            fireEvent(NetworkEvent.NEType.connected);
        } catch (IOException ex) {
            fireEvent(NetworkEvent.NEType.connectingError);
            disconnect(false, quiet, true);
            throw new NetworkException("Could not connect to server " + hostname + ':' + port + "! Error=" + ex.getMessage(), ex);
        } catch (ClassNotFoundException ex) {
            fireEvent(NetworkEvent.NEType.connectingError);
            disconnect(false, false, true);
            throw new NetworkException("Could not connect to server " + hostname + ':' + port + "! Error=" + ex.getMessage(), ex);
        }
    }
View Full Code Here

    private Response synchroneousRequest(final Request r) throws NetworkException {
        try {
            send(r);
            return receive();
        } catch (ClassNotFoundException ex) {
            throw new NetworkException("Can't send a request to the server.", ex);
        } catch (IOException ex) {
            throw new NetworkException("Can't send a request to the server.", ex);
        }
    }
View Full Code Here

            SSLServerSocketFactory socketfactory = context.getServerSocketFactory();
            srvSocket = (SSLServerSocket) socketfactory.createServerSocket(port);
            logger.info("Server is online on port " + port);
        } catch (Exception ex) {
            logger.severe(null, ex);
            throw new NetworkException("Failed! Can't setup socket on port " + port + '!', ex);
        }
    }
View Full Code Here

TOP

Related Classes of com.art.anette.exceptions.NetworkException

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.