Package com.brewtab.irc

Examples of com.brewtab.irc.ConnectionException


        }

        String scheme = uri.getScheme();

        if (scheme == null || !(scheme.equals("irc") || scheme.equals("ircs"))) {
            throw new ConnectionException("URI scheme must be one of irc or ircs");
        }

        return uri;
    }
View Full Code Here


        if (uri.getUserInfo() != null) {
            nick = uri.getUserInfo();
        }

        if (nick == null) {
            throw new ConnectionException("Nick must be provided to connect");
        }

        ClientImpl client = new ClientImpl();
        SocketAddress socketAddress = new InetSocketAddress(host, port);
View Full Code Here

        ChannelFuture handshakeFuture = sslHandler.handshake();

        try {
            handshakeFuture.await();
        } catch (InterruptedException e) {
            throw new ConnectionException("Interrupted while performing SSL handshake");
        }

        if (!handshakeFuture.isSuccess()) {
            throw new ConnectionException("error performing SSL handshake", handshakeFuture.getCause());
        }
    }
View Full Code Here

                }

                connected = true;
            } else {
                log.debug("connection failed");
                throw new ConnectionException(future.getCause());
            }
        } catch (InterruptedException e) {
            throw new ConnectionException("Interrupted while connecting");
        } finally {
            connection.removeConnectionStateListener(connectedListener);
        }
    }
View Full Code Here

                    MessageFilters.message(MessageType.RPL_LUSEROP),
                    MessageFilters.message(MessageType.RPL_LUSERUNKNOWN),
                    MessageFilters.message(MessageType.ERR_NICKNAMEINUSE)),
                nickMessage, userMessage).get(0);
        } catch (InterruptedException e) {
            throw new ConnectionException("Interrupted while awaiting connection registration response");
        }

        switch (response.getType()) {
        case ERR_NICKNAMEINUSE:
            throw new NickNameInUseException();
View Full Code Here

TOP

Related Classes of com.brewtab.irc.ConnectionException

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.