KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > activemq > command > KeepAliveInfo


1 /**
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one or more
4  * contributor license agreements. See the NOTICE file distributed with
5  * this work for additional information regarding copyright ownership.
6  * The ASF licenses this file to You under the Apache License, Version 2.0
7  * (the "License"); you may not use this file except in compliance with
8  * the License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18 package org.apache.activemq.command;
19
20 import org.apache.activemq.state.CommandVisitor;
21 import org.apache.activemq.util.IntrospectionSupport;
22
23 /**
24  * @openwire:marshaller code="10"
25  * @version $Revision$
26  */

27 public class KeepAliveInfo extends BaseCommand {
28
29     public static final byte DATA_STRUCTURE_TYPE=CommandTypes.KEEP_ALIVE_INFO;
30
31     private transient Endpoint from;
32     private transient Endpoint to;
33
34     public byte getDataStructureType() {
35         return DATA_STRUCTURE_TYPE;
36     }
37
38     public boolean isResponse() {
39         return false;
40     }
41
42     public boolean isMessageDispatch() {
43         return false;
44     }
45     
46     public boolean isMessage() {
47         return false;
48     }
49
50     public boolean isMessageAck() {
51         return false;
52     }
53
54     public boolean isBrokerInfo() {
55         return false;
56     }
57
58     public boolean isWireFormatInfo() {
59         return false;
60     }
61
62     /**
63      * The endpoint within the transport where this message came from.
64      */

65     public Endpoint getFrom() {
66         return from;
67     }
68
69     public void setFrom(Endpoint from) {
70         this.from = from;
71     }
72
73     /**
74      * The endpoint within the transport where this message is going to - null means all endpoints.
75      */

76     public Endpoint getTo() {
77         return to;
78     }
79
80     public void setTo(Endpoint to) {
81         this.to = to;
82     }
83     
84     
85     public Response visit(CommandVisitor visitor) throws Exception JavaDoc {
86         return visitor.processKeepAlive( this );
87     }
88
89     public boolean isMarshallAware() {
90         return false;
91     }
92
93     public boolean isMessageDispatchNotification(){
94         return false;
95     }
96     
97     public boolean isShutdownInfo(){
98         return false;
99     }
100
101     public String JavaDoc toString() {
102         return IntrospectionSupport.toString(this, KeepAliveInfo.class);
103     }
104 }
105
Popular Tags