Package com.brewtab.irc

Examples of com.brewtab.irc.NotConnectedException


     * @param reason The reason for quitting as given in the QUIT message
     */
    @Override
    public void quit(String reason) {
        if (!connected) {
            throw new NotConnectedException();
        }

        Message quit = new Message(MessageType.QUIT, reason);
        ChannelFuture future = connection.send(quit);

View Full Code Here


     *         joined
     */
    @Override
    public Channel join(String channelName) {
        if (!connected) {
            throw new NotConnectedException();
        }

        ChannelImpl channel = new ChannelImpl(this, channelName);

        /* Attempt to join */
 
View Full Code Here

    }

    @Override
    public void sendMessage(User user, String message) {
        if (!connected) {
            throw new NotConnectedException();
        }

        connection.send(new Message(MessageType.PRIVMSG, user.getNick(), message));
    }
View Full Code Here

    /**
     * Send a message through this connection
     */
    public ChannelFuture send(Message message) throws NotConnectedException {
        if (!connected) {
            throw new NotConnectedException();
        }

        if (log.isDebugEnabled()) {
            log.debug(">>> {}", message.toString().trim());
        }
View Full Code Here

    /**
     * Send multiple messages through this connection
     */
    public ChannelFuture send(Message... messages) throws NotConnectedException {
        if (!connected) {
            throw new NotConnectedException();
        }

        if (log.isDebugEnabled()) {
            for (Message message : messages) {
                log.debug(">>> {}", message.toString().trim());
View Full Code Here

    }

    @Override
    public ChannelFuture close() {
        if (!connected) {
            throw new NotConnectedException();
        }

        return channel.close();
    }
View Full Code Here

TOP

Related Classes of com.brewtab.irc.NotConnectedException

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.