Examples of KeepAliveInfo


Examples of org.apache.activemq.command.KeepAliveInfo

    public void onCommand(Object command) {
        commandReceived.set(true);
        inReceive.set(true);
        try {
            if (command.getClass() == KeepAliveInfo.class) {
                KeepAliveInfo info = (KeepAliveInfo) command;
                if (info.isResponseRequired()) {
                    try {
                        info.setResponseRequired(false);
                        oneway(info);
                    } catch (IOException e) {
                        onException(e);
                    }
                }
View Full Code Here

Examples of org.apache.activemq.command.KeepAliveInfo

            ASYNC_TASKS.execute(new Runnable() {
                public void run() {
                    if (monitorStarted.get()) {
                        try {

                            KeepAliveInfo info = new KeepAliveInfo();
                            info.setResponseRequired(keepAliveResponseRequired);
                            oneway(info);
                        } catch (IOException e) {
                            onException(e);
                        }
                    }
View Full Code Here

Examples of org.apache.activemq.command.KeepAliveInfo

                    if (monitorStarted.get()) {
                        try {
                            // If we can't get the lock it means another write beat us into the
                            // send and we don't need to heart beat now.
                            if (sendLock.writeLock().tryLock()) {
                                KeepAliveInfo info = new KeepAliveInfo();
                                info.setResponseRequired(keepAliveResponseRequired);
                                doOnewaySend(info);
                            }
                        } catch (IOException e) {
                            onException(e);
                        } finally {
View Full Code Here

Examples of org.apache.activemq.command.KeepAliveInfo

    public void onCommand(Object command) {
        commandReceived.set(true);
        inReceive.set(true);
        try {
            if (command.getClass() == KeepAliveInfo.class) {
                KeepAliveInfo info = (KeepAliveInfo) command;
                if (info.isResponseRequired()) {
                    sendLock.readLock().lock();
                    try {
                        info.setResponseRequired(false);
                        oneway(info);
                    } catch (IOException e) {
                        onException(e);
                    } finally {
                        sendLock.readLock().unlock();
View Full Code Here

Examples of org.apache.activemq.command.KeepAliveInfo

    public void onCommand(Object command) {
        commandReceived.set(true);
        inReceive.set(true);
        try {
            if (command.getClass() == KeepAliveInfo.class) {
                KeepAliveInfo info = (KeepAliveInfo) command;
                if (info.isResponseRequired()) {
                    sendLock.readLock().lock();
                    try {
                        info.setResponseRequired(false);
                        oneway(info);
                    } catch (IOException e) {
                        onException(e);
                    } finally {
                        sendLock.readLock().unlock();
View Full Code Here

Examples of org.apache.activemq.command.KeepAliveInfo

        }
       
        if( !commandSent.get() ) {
            log.trace("No message sent since last write check, sending a KeepAliveInfo");
            try {
                next.oneway(new KeepAliveInfo());               
            } catch (IOException e) {
                onException(e);
            }
        } else {
            log.trace("Message sent since last write check, resetting flag");
View Full Code Here

Examples of org.apache.activemq.command.KeepAliveInfo

                            try {
                                // If we can't get the lock it means another
                                // write beat us into the
                                // send and we don't need to heart beat now.
                                if (sendLock.writeLock().tryLock()) {
                                    KeepAliveInfo info = new KeepAliveInfo();
                                    info.setResponseRequired(keepAliveResponseRequired);
                                    doOnewaySend(info);
                                }
                            } catch (IOException e) {
                                onException(e);
                            } finally {
View Full Code Here

Examples of org.apache.activemq.command.KeepAliveInfo

    public void onCommand(Object command) {
        commandReceived.set(true);
        inReceive.set(true);
        try {
            if (command.getClass() == KeepAliveInfo.class) {
                KeepAliveInfo info = (KeepAliveInfo) command;
                if (info.isResponseRequired()) {
                    sendLock.readLock().lock();
                    try {
                        info.setResponseRequired(false);
                        oneway(info);
                    } catch (IOException e) {
                        onException(e);
                    } finally {
                        sendLock.readLock().unlock();
View Full Code Here

Examples of org.apache.activemq.command.KeepAliveInfo

   
    /**
     * @return a new object instance
     */
    public DataStructure createObject() {
        return new KeepAliveInfo();
    }
View Full Code Here

Examples of org.apache.activemq.command.KeepAliveInfo

   
    /**
     * @return a new object instance
     */
    public DataStructure createObject() {
        return new KeepAliveInfo();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.