1 18 package org.apache.activemq.command; 19 20 import org.apache.activemq.util.IntrospectionSupport; 21 22 23 28 abstract public class BaseCommand implements Command { 29 30 protected int commandId; 31 protected boolean responseRequired; 32 33 private transient Endpoint from; 34 private transient Endpoint to; 35 36 public void copy(BaseCommand copy) { 37 copy.commandId = commandId; 38 copy.responseRequired = responseRequired; 39 } 40 41 44 public int getCommandId() { 45 return commandId; 46 } 47 48 public void setCommandId(int commandId) { 49 this.commandId = commandId; 50 } 51 52 55 public boolean isResponseRequired() { 56 return responseRequired; 57 } 58 59 public void setResponseRequired(boolean responseRequired) { 60 this.responseRequired = responseRequired; 61 } 62 63 public String toString() { 64 return IntrospectionSupport.toString(this, BaseCommand.class); 65 } 66 67 public boolean isWireFormatInfo() { 68 return false; 69 } 70 71 public boolean isBrokerInfo() { 72 return false; 73 } 74 75 public boolean isResponse() { 76 return false; 77 } 78 79 public boolean isMessageDispatch() { 80 return false; 81 } 82 83 public boolean isMessage() { 84 return false; 85 } 86 87 public boolean isMarshallAware() { 88 return false; 89 } 90 91 public boolean isMessageAck() { 92 return false; 93 } 94 95 public boolean isMessageDispatchNotification() { 96 return false; 97 } 98 99 public boolean isShutdownInfo() { 100 return false; 101 } 102 103 106 public Endpoint getFrom() { 107 return from; 108 } 109 110 public void setFrom(Endpoint from) { 111 this.from = from; 112 } 113 114 117 public Endpoint getTo() { 118 return to; 119 } 120 121 public void setTo(Endpoint to) { 122 this.to = to; 123 } 124 125 126 } 127 | Popular Tags |