001    /*
002     * KeepAlive.java
003     */
004    package org.activemq.message;
005    
006    
007    /**
008     * Keep-alive packet which holds not information and is only intended to keep connections
009     * from being idle.
010     *
011     */
012    public class KeepAlive extends AbstractPacket {
013    
014            public KeepAlive() {
015                    setReceiptRequired(true);
016            }
017            
018        /**
019         * Return the type of Packet
020         *
021         * @return integer representation of the type of Packet
022         */
023    
024        public int getPacketType() {
025            return KEEP_ALIVE;
026        }
027    
028        /**
029         * @return pretty print
030         */
031        public String toString() {
032            return super.toString() + " KeepAlive{}";
033        }
034        
035        
036    }