You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2009/06/01 20:37:54 UTC
svn commit: r780773 [5/31] - in /activemq/sandbox/activemq-flow:
activemq-client/ activemq-client/src/main/java/org/
activemq-client/src/main/java/org/apache/
activemq-client/src/main/java/org/apache/activemq/
activemq-client/src/main/java/org/apache/a...
Added: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/CommandTypes.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/CommandTypes.java?rev=780773&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/CommandTypes.java (added)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/CommandTypes.java Mon Jun 1 18:37:41 2009
@@ -0,0 +1,159 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.command;
+
+/**
+ * Holds the command id constants used by the command objects.
+ *
+ * @version $Revision: 1.21 $
+ */
+public interface CommandTypes {
+
+ // What is the latest version of the openwire protocol
+ byte PROTOCOL_VERSION = 5;
+
+ // A marshaling layer can use this type to specify a null object.
+ byte NULL = 0;
+
+ // /////////////////////////////////////////////////
+ //
+ // Info objects sent back and forth client/server when
+ // setting up a client connection.
+ //
+ // /////////////////////////////////////////////////
+ byte WIREFORMAT_INFO = 1;
+ byte BROKER_INFO = 2;
+ byte CONNECTION_INFO = 3;
+ byte SESSION_INFO = 4;
+ byte CONSUMER_INFO = 5;
+ byte PRODUCER_INFO = 6;
+ byte TRANSACTION_INFO = 7;
+ byte DESTINATION_INFO = 8;
+ byte REMOVE_SUBSCRIPTION_INFO = 9;
+ byte KEEP_ALIVE_INFO = 10;
+ byte SHUTDOWN_INFO = 11;
+ byte REMOVE_INFO = 12;
+ byte CONTROL_COMMAND = 14;
+ byte FLUSH_COMMAND = 15;
+ byte CONNECTION_ERROR = 16;
+ byte CONSUMER_CONTROL = 17;
+ byte CONNECTION_CONTROL = 18;
+
+ // /////////////////////////////////////////////////
+ //
+ // Messages that go back and forth between the client
+ // and the server.
+ //
+ // /////////////////////////////////////////////////
+ byte PRODUCER_ACK = 19;
+ byte MESSAGE_PULL = 20;
+ byte MESSAGE_DISPATCH = 21;
+ byte MESSAGE_ACK = 22;
+
+ byte ACTIVEMQ_MESSAGE = 23;
+ byte ACTIVEMQ_BYTES_MESSAGE = 24;
+ byte ACTIVEMQ_MAP_MESSAGE = 25;
+ byte ACTIVEMQ_OBJECT_MESSAGE = 26;
+ byte ACTIVEMQ_STREAM_MESSAGE = 27;
+ byte ACTIVEMQ_TEXT_MESSAGE = 28;
+ byte ACTIVEMQ_BLOB_MESSAGE = 29;
+
+ // /////////////////////////////////////////////////
+ //
+ // Command Response messages
+ //
+ // /////////////////////////////////////////////////
+ byte RESPONSE = 30;
+ byte EXCEPTION_RESPONSE = 31;
+ byte DATA_RESPONSE = 32;
+ byte DATA_ARRAY_RESPONSE = 33;
+ byte INTEGER_RESPONSE = 34;
+
+ // /////////////////////////////////////////////////
+ //
+ // Used by discovery
+ //
+ // /////////////////////////////////////////////////
+ byte DISCOVERY_EVENT = 40;
+
+ // /////////////////////////////////////////////////
+ //
+ // Command object used by the Journal
+ //
+ // /////////////////////////////////////////////////
+ byte JOURNAL_ACK = 50;
+ byte JOURNAL_REMOVE = 52;
+ byte JOURNAL_TRACE = 53;
+ byte JOURNAL_TRANSACTION = 54;
+ byte DURABLE_SUBSCRIPTION_INFO = 55;
+
+ // /////////////////////////////////////////////////
+ //
+ // Reliability and fragmentation
+ //
+ // /////////////////////////////////////////////////
+ byte PARTIAL_COMMAND = 60;
+ byte PARTIAL_LAST_COMMAND = 61;
+
+ byte REPLAY = 65;
+
+ // /////////////////////////////////////////////////
+ //
+ // Types used represent basic Java types.
+ //
+ // /////////////////////////////////////////////////
+ byte BYTE_TYPE = 70;
+ byte CHAR_TYPE = 71;
+ byte SHORT_TYPE = 72;
+ byte INTEGER_TYPE = 73;
+ byte LONG_TYPE = 74;
+ byte DOUBLE_TYPE = 75;
+ byte FLOAT_TYPE = 76;
+ byte STRING_TYPE = 77;
+ byte BOOLEAN_TYPE = 78;
+ byte BYTE_ARRAY_TYPE = 79;
+
+ // /////////////////////////////////////////////////
+ //
+ // Broker to Broker command objects
+ //
+ // /////////////////////////////////////////////////
+
+ byte MESSAGE_DISPATCH_NOTIFICATION = 90;
+ byte NETWORK_BRIDGE_FILTER = 91;
+
+ // /////////////////////////////////////////////////
+ //
+ // Data structures contained in the command objects.
+ //
+ // /////////////////////////////////////////////////
+ byte ACTIVEMQ_QUEUE = 100;
+ byte ACTIVEMQ_TOPIC = 101;
+ byte ACTIVEMQ_TEMP_QUEUE = 102;
+ byte ACTIVEMQ_TEMP_TOPIC = 103;
+
+ byte MESSAGE_ID = 110;
+ byte ACTIVEMQ_LOCAL_TRANSACTION_ID = 111;
+ byte ACTIVEMQ_XA_TRANSACTION_ID = 112;
+
+ byte CONNECTION_ID = 120;
+ byte SESSION_ID = 121;
+ byte CONSUMER_ID = 122;
+ byte PRODUCER_ID = 123;
+ byte BROKER_ID = 124;
+
+}
Propchange: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/CommandTypes.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ConnectionControl.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ConnectionControl.java?rev=780773&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ConnectionControl.java (added)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ConnectionControl.java Mon Jun 1 18:37:41 2009
@@ -0,0 +1,117 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.command;
+
+import org.apache.activemq.state.CommandVisitor;
+
+/**
+ * Used to start and stop transports as well as terminating clients.
+ *
+ * @openwire:marshaller code="18"
+ * @version $Revision: 1.1 $
+ */
+public class ConnectionControl extends BaseCommand {
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.CONNECTION_CONTROL;
+ protected boolean suspend;
+ protected boolean resume;
+ protected boolean close;
+ protected boolean exit;
+ protected boolean faultTolerant;
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ public Response visit(CommandVisitor visitor) throws Exception {
+ return visitor.processConnectionControl(this);
+ }
+
+ /**
+ * @openwire:property version=1
+ * @return Returns the close.
+ */
+ public boolean isClose() {
+ return close;
+ }
+
+ /**
+ * @param close The close to set.
+ */
+ public void setClose(boolean close) {
+ this.close = close;
+ }
+
+ /**
+ * @openwire:property version=1
+ * @return Returns the exit.
+ */
+ public boolean isExit() {
+ return exit;
+ }
+
+ /**
+ * @param exit The exit to set.
+ */
+ public void setExit(boolean exit) {
+ this.exit = exit;
+ }
+
+ /**
+ * @openwire:property version=1
+ * @return Returns the faultTolerant.
+ */
+ public boolean isFaultTolerant() {
+ return faultTolerant;
+ }
+
+ /**
+ * @param faultTolerant The faultTolerant to set.
+ */
+ public void setFaultTolerant(boolean faultTolerant) {
+ this.faultTolerant = faultTolerant;
+ }
+
+ /**
+ * @openwire:property version=1
+ * @return Returns the resume.
+ */
+ public boolean isResume() {
+ return resume;
+ }
+
+ /**
+ * @param resume The resume to set.
+ */
+ public void setResume(boolean resume) {
+ this.resume = resume;
+ }
+
+ /**
+ * @openwire:property version=1
+ * @return Returns the suspend.
+ */
+ public boolean isSuspend() {
+ return suspend;
+ }
+
+ /**
+ * @param suspend The suspend to set.
+ */
+ public void setSuspend(boolean suspend) {
+ this.suspend = suspend;
+ }
+}
Added: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ConnectionError.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ConnectionError.java?rev=780773&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ConnectionError.java (added)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ConnectionError.java Mon Jun 1 18:37:41 2009
@@ -0,0 +1,63 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.command;
+
+import org.apache.activemq.state.CommandVisitor;
+
+/**
+ *
+ * @openwire:marshaller code="16"
+ * @version $Revision$
+ */
+public class ConnectionError extends BaseCommand {
+
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.CONNECTION_ERROR;
+
+ private ConnectionId connectionId;
+ private Throwable exception;
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ public Response visit(CommandVisitor visitor) throws Exception {
+ return visitor.processConnectionError(this);
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public Throwable getException() {
+ return exception;
+ }
+
+ public void setException(Throwable exception) {
+ this.exception = exception;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public ConnectionId getConnectionId() {
+ return connectionId;
+ }
+
+ public void setConnectionId(ConnectionId connectionId) {
+ this.connectionId = connectionId;
+ }
+
+}
Added: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ConnectionId.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ConnectionId.java?rev=780773&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ConnectionId.java (added)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ConnectionId.java Mon Jun 1 18:37:41 2009
@@ -0,0 +1,93 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.command;
+
+/**
+ * @openwire:marshaller code="120"
+ * @version $Revision$
+ */
+public class ConnectionId implements DataStructure, Comparable<ConnectionId> {
+
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.CONNECTION_ID;
+
+ protected String value;
+
+ public ConnectionId() {
+ }
+
+ public ConnectionId(String connectionId) {
+ this.value = connectionId;
+ }
+
+ public ConnectionId(ConnectionId id) {
+ this.value = id.getValue();
+ }
+
+ public ConnectionId(SessionId id) {
+ this.value = id.getConnectionId();
+ }
+
+ public ConnectionId(ProducerId id) {
+ this.value = id.getConnectionId();
+ }
+
+ public ConnectionId(ConsumerId id) {
+ this.value = id.getConnectionId();
+ }
+
+ public int hashCode() {
+ return value.hashCode();
+ }
+
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || o.getClass() != ConnectionId.class) {
+ return false;
+ }
+ ConnectionId id = (ConnectionId)o;
+ return value.equals(id.value);
+ }
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ public String toString() {
+ return value;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String connectionId) {
+ this.value = connectionId;
+ }
+
+ public boolean isMarshallAware() {
+ return false;
+ }
+
+ public int compareTo(ConnectionId o) {
+ return value.compareTo(o.value);
+ }
+}
Propchange: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ConnectionId.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ConnectionInfo.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ConnectionInfo.java?rev=780773&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ConnectionInfo.java (added)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ConnectionInfo.java Mon Jun 1 18:37:41 2009
@@ -0,0 +1,202 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.command;
+
+import org.apache.activemq.state.CommandVisitor;
+
+/**
+ *
+ * @openwire:marshaller code="3"
+ * @version $Revision: 1.11 $
+ */
+public class ConnectionInfo extends BaseCommand {
+
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.CONNECTION_INFO;
+
+ protected ConnectionId connectionId;
+ protected String clientId;
+ protected String userName;
+ protected String password;
+ protected BrokerId[] brokerPath;
+ protected boolean brokerMasterConnector;
+ protected boolean manageable;
+ protected boolean clientMaster = true;
+ protected transient Object transportContext;
+
+ public ConnectionInfo() {
+ }
+
+ public ConnectionInfo(ConnectionId connectionId) {
+ this.connectionId = connectionId;
+ }
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ public ConnectionInfo copy() {
+ ConnectionInfo copy = new ConnectionInfo();
+ copy(copy);
+ return copy;
+ }
+
+ private void copy(ConnectionInfo copy) {
+ super.copy(copy);
+ copy.connectionId = connectionId;
+ copy.clientId = clientId;
+ copy.userName = userName;
+ copy.password = password;
+ copy.brokerPath = brokerPath;
+ copy.brokerMasterConnector = brokerMasterConnector;
+ copy.manageable = manageable;
+ copy.clientMaster = clientMaster;
+ copy.transportContext = transportContext;
+ }
+
+ /**
+ * @openwire:property version=1 cache=true
+ */
+ public ConnectionId getConnectionId() {
+ return connectionId;
+ }
+
+ public void setConnectionId(ConnectionId connectionId) {
+ this.connectionId = connectionId;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public String getClientId() {
+ return clientId;
+ }
+
+ public void setClientId(String clientId) {
+ this.clientId = clientId;
+ }
+
+ public RemoveInfo createRemoveCommand() {
+ RemoveInfo command = new RemoveInfo(getConnectionId());
+ command.setResponseRequired(isResponseRequired());
+ return command;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public String getUserName() {
+ return userName;
+ }
+
+ public void setUserName(String userName) {
+ this.userName = userName;
+ }
+
+ /**
+ * The route of brokers the command has moved through.
+ *
+ * @openwire:property version=1 cache=true
+ */
+ public BrokerId[] getBrokerPath() {
+ return brokerPath;
+ }
+
+ public void setBrokerPath(BrokerId[] brokerPath) {
+ this.brokerPath = brokerPath;
+ }
+
+ public Response visit(CommandVisitor visitor) throws Exception {
+ return visitor.processAddConnection(this);
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public boolean isBrokerMasterConnector() {
+ return brokerMasterConnector;
+ }
+
+ /**
+ * @param slaveBroker The brokerMasterConnector to set.
+ */
+ public void setBrokerMasterConnector(boolean slaveBroker) {
+ this.brokerMasterConnector = slaveBroker;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public boolean isManageable() {
+ return manageable;
+ }
+
+ /**
+ * @param manageable The manageable to set.
+ */
+ public void setManageable(boolean manageable) {
+ this.manageable = manageable;
+ }
+
+ /**
+ * Transports may wish to associate additional data with the connection. For
+ * example, an SSL transport may use this field to attach the client
+ * certificates used when the conection was established.
+ *
+ * @return the transport context.
+ */
+ public Object getTransportContext() {
+ return transportContext;
+ }
+
+ /**
+ * Transports may wish to associate additional data with the connection. For
+ * example, an SSL transport may use this field to attach the client
+ * certificates used when the conection was established.
+ *
+ * @param transportContext value used to set the transport context
+ */
+ public void setTransportContext(Object transportContext) {
+ this.transportContext = transportContext;
+ }
+
+ /**
+ * @openwire:property version=2
+ * @return the clientMaster
+ */
+ public boolean isClientMaster() {
+ return this.clientMaster;
+ }
+
+ /**
+ * @param clientMaster the clientMaster to set
+ */
+ public void setClientMaster(boolean clientMaster) {
+ this.clientMaster = clientMaster;
+ }
+
+}
Propchange: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ConnectionInfo.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ConsumerControl.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ConsumerControl.java?rev=780773&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ConsumerControl.java (added)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ConsumerControl.java Mon Jun 1 18:37:41 2009
@@ -0,0 +1,135 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.command;
+
+import org.apache.activemq.state.CommandVisitor;
+
+/**
+ * Used to start and stop transports as well as terminating clients.
+ *
+ * @openwire:marshaller code="17"
+ * @version $Revision: 1.1 $
+ */
+public class ConsumerControl extends BaseCommand {
+
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.CONSUMER_CONTROL;
+
+ protected ConsumerId consumerId;
+ protected boolean close;
+ protected boolean stop;
+ protected boolean start;
+ protected boolean flush;
+ protected int prefetch;
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ public Response visit(CommandVisitor visitor) throws Exception {
+ return visitor.processConsumerControl(this);
+ }
+
+ /**
+ * @openwire:property version=1
+ * @return Returns the close.
+ */
+ public boolean isClose() {
+ return close;
+ }
+
+ /**
+ * @param close The close to set.
+ */
+ public void setClose(boolean close) {
+ this.close = close;
+ }
+
+ /**
+ * @openwire:property version=1
+ * @return Returns the consumerId.
+ */
+ public ConsumerId getConsumerId() {
+ return consumerId;
+ }
+
+ /**
+ * @param consumerId The consumerId to set.
+ */
+ public void setConsumerId(ConsumerId consumerId) {
+ this.consumerId = consumerId;
+ }
+
+ /**
+ * @openwire:property version=1
+ * @return Returns the prefetch.
+ */
+ public int getPrefetch() {
+ return prefetch;
+ }
+
+ /**
+ * @param prefetch The prefetch to set.
+ */
+ public void setPrefetch(int prefetch) {
+ this.prefetch = prefetch;
+ }
+
+ /**
+ * @openwire:property version=2
+ * @return the flush
+ */
+ public boolean isFlush() {
+ return this.flush;
+ }
+
+ /**
+ * @param flush the flush to set
+ */
+ public void setFlush(boolean flush) {
+ this.flush = flush;
+ }
+
+ /**
+ * @openwire:property version=2
+ * @return the start
+ */
+ public boolean isStart() {
+ return this.start;
+ }
+
+ /**
+ * @param start the start to set
+ */
+ public void setStart(boolean start) {
+ this.start = start;
+ }
+
+ /**
+ * @openwire:property version=2
+ * @return the stop
+ */
+ public boolean isStop() {
+ return this.stop;
+ }
+
+ /**
+ * @param stop the stop to set
+ */
+ public void setStop(boolean stop) {
+ this.stop = stop;
+ }
+}
Added: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ConsumerId.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ConsumerId.java?rev=780773&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ConsumerId.java (added)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ConsumerId.java Mon Jun 1 18:37:41 2009
@@ -0,0 +1,122 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.command;
+
+/**
+ * @openwire:marshaller code="122"
+ * @version $Revision$
+ */
+public class ConsumerId implements DataStructure {
+
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.CONSUMER_ID;
+
+ protected String connectionId;
+ protected long sessionId;
+ protected long value;
+
+ protected transient int hashCode;
+ protected transient String key;
+ protected transient SessionId parentId;
+
+ public ConsumerId() {
+ }
+
+ public ConsumerId(SessionId sessionId, long consumerId) {
+ this.connectionId = sessionId.getConnectionId();
+ this.sessionId = sessionId.getValue();
+ this.value = consumerId;
+ }
+
+ public ConsumerId(ConsumerId id) {
+ this.connectionId = id.getConnectionId();
+ this.sessionId = id.getSessionId();
+ this.value = id.getValue();
+ }
+
+ public SessionId getParentId() {
+ if (parentId == null) {
+ parentId = new SessionId(this);
+ }
+ return parentId;
+ }
+
+ public int hashCode() {
+ if (hashCode == 0) {
+ hashCode = connectionId.hashCode() ^ (int)sessionId ^ (int)value;
+ }
+ return hashCode;
+ }
+
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || o.getClass() != ConsumerId.class) {
+ return false;
+ }
+ ConsumerId id = (ConsumerId)o;
+ return sessionId == id.sessionId && value == id.value && connectionId.equals(id.connectionId);
+ }
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ public String toString() {
+ if (key == null) {
+ key = connectionId + ":" + sessionId + ":" + value;
+ }
+ return key;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public String getConnectionId() {
+ return connectionId;
+ }
+
+ public void setConnectionId(String connectionId) {
+ this.connectionId = connectionId;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public long getSessionId() {
+ return sessionId;
+ }
+
+ public void setSessionId(long sessionId) {
+ this.sessionId = sessionId;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public long getValue() {
+ return value;
+ }
+
+ public void setValue(long consumerId) {
+ this.value = consumerId;
+ }
+
+ public boolean isMarshallAware() {
+ return false;
+ }
+}
Propchange: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ConsumerId.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ConsumerInfo.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ConsumerInfo.java?rev=780773&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ConsumerInfo.java (added)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ConsumerInfo.java Mon Jun 1 18:37:41 2009
@@ -0,0 +1,471 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.command;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.activemq.filter.BooleanExpression;
+import org.apache.activemq.state.CommandVisitor;
+
+/**
+ * @openwire:marshaller code="5"
+ * @version $Revision: 1.20 $
+ */
+public class ConsumerInfo extends BaseCommand {
+
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.CONSUMER_INFO;
+
+ public static final byte HIGH_PRIORITY = 10;
+ public static final byte NORMAL_PRIORITY = 0;
+ public static final byte NETWORK_CONSUMER_PRIORITY = -5;
+ public static final byte LOW_PRIORITY = -10;
+
+ protected ConsumerId consumerId;
+ protected ActiveMQDestination destination;
+ protected int prefetchSize;
+ protected int maximumPendingMessageLimit;
+ protected boolean browser;
+ protected boolean dispatchAsync;
+ protected String selector;
+ protected String subscriptionName;
+ protected boolean noLocal;
+ protected boolean exclusive;
+ protected boolean retroactive;
+ protected byte priority;
+ protected BrokerId[] brokerPath;
+ protected boolean optimizedAcknowledge;
+ // used by the broker
+ protected transient int currentPrefetchSize;
+ // if true, the consumer will not send range
+ protected boolean noRangeAcks;
+ // acks.
+
+ protected BooleanExpression additionalPredicate;
+ protected transient boolean networkSubscription; // this subscription
+ protected transient List<ConsumerId> networkConsumerIds; // the original consumerId
+
+ // not marshalled, populated from RemoveInfo, the last message delivered, used
+ // to suppress redelivery on prefetched messages after close
+ private transient long lastDeliveredSequenceId;
+
+ // originated from a
+ // network connection
+
+ public ConsumerInfo() {
+ }
+
+ public ConsumerInfo(ConsumerId consumerId) {
+ this.consumerId = consumerId;
+ }
+
+ public ConsumerInfo(SessionInfo sessionInfo, long consumerId) {
+ this.consumerId = new ConsumerId(sessionInfo.getSessionId(), consumerId);
+ }
+
+ public ConsumerInfo copy() {
+ ConsumerInfo info = new ConsumerInfo();
+ copy(info);
+ return info;
+ }
+
+ public void copy(ConsumerInfo info) {
+ super.copy(info);
+ info.consumerId = consumerId;
+ info.destination = destination;
+ info.prefetchSize = prefetchSize;
+ info.maximumPendingMessageLimit = maximumPendingMessageLimit;
+ info.browser = browser;
+ info.dispatchAsync = dispatchAsync;
+ info.selector = selector;
+ info.subscriptionName = subscriptionName;
+ info.noLocal = noLocal;
+ info.exclusive = exclusive;
+ info.retroactive = retroactive;
+ info.priority = priority;
+ info.brokerPath = brokerPath;
+ info.networkSubscription = networkSubscription;
+ if (networkConsumerIds != null) {
+ if (info.networkConsumerIds==null){
+ info.networkConsumerIds=new ArrayList<ConsumerId>();
+ }
+ info.networkConsumerIds.addAll(networkConsumerIds);
+ }
+ }
+
+ public boolean isDurable() {
+ return subscriptionName != null;
+ }
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * Is used to uniquely identify the consumer to the broker.
+ *
+ * @openwire:property version=1 cache=true
+ */
+ public ConsumerId getConsumerId() {
+ return consumerId;
+ }
+
+ public void setConsumerId(ConsumerId consumerId) {
+ this.consumerId = consumerId;
+ }
+
+ /**
+ * Is this consumer a queue browser?
+ *
+ * @openwire:property version=1
+ */
+ public boolean isBrowser() {
+ return browser;
+ }
+
+ public void setBrowser(boolean browser) {
+ this.browser = browser;
+ }
+
+ /**
+ * The destination that the consumer is interested in receiving messages
+ * from. This destination could be a composite destination.
+ *
+ * @openwire:property version=1 cache=true
+ */
+ public ActiveMQDestination getDestination() {
+ return destination;
+ }
+
+ public void setDestination(ActiveMQDestination destination) {
+ this.destination = destination;
+ }
+
+ /**
+ * How many messages a broker will send to the client without receiving an
+ * ack before he stops dispatching messages to the client.
+ *
+ * @openwire:property version=1
+ */
+ public int getPrefetchSize() {
+ return prefetchSize;
+ }
+
+ public void setPrefetchSize(int prefetchSize) {
+ this.prefetchSize = prefetchSize;
+ this.currentPrefetchSize = prefetchSize;
+ }
+
+ /**
+ * How many messages a broker will keep around, above the prefetch limit,
+ * for non-durable topics before starting to discard older messages.
+ *
+ * @openwire:property version=1
+ */
+ public int getMaximumPendingMessageLimit() {
+ return maximumPendingMessageLimit;
+ }
+
+ public void setMaximumPendingMessageLimit(int maximumPendingMessageLimit) {
+ this.maximumPendingMessageLimit = maximumPendingMessageLimit;
+ }
+
+ /**
+ * Should the broker dispatch a message to the consumer async? If he does it
+ * async, then he uses a more SEDA style of processing while if it is not
+ * done async, then he broker use a STP style of processing. STP is more
+ * appropriate in high bandwidth situations or when being used by and in vm
+ * transport.
+ *
+ * @openwire:property version=1
+ */
+ public boolean isDispatchAsync() {
+ return dispatchAsync;
+ }
+
+ public void setDispatchAsync(boolean dispatchAsync) {
+ this.dispatchAsync = dispatchAsync;
+ }
+
+ /**
+ * The JMS selector used to filter out messages that this consumer is
+ * interested in.
+ *
+ * @openwire:property version=1
+ */
+ public String getSelector() {
+ return selector;
+ }
+
+ public void setSelector(String selector) {
+ this.selector = selector;
+ }
+
+ /**
+ * Used to identify the name of a durable subscription.
+ *
+ * @openwire:property version=1
+ */
+ public String getSubscriptionName() {
+ return subscriptionName;
+ }
+
+ public void setSubscriptionName(String durableSubscriptionId) {
+ this.subscriptionName = durableSubscriptionId;
+ }
+
+ /**
+ * @deprecated
+ * @return
+ * @see getSubscriptionName
+ */
+ public String getSubcriptionName() {
+ return subscriptionName;
+ }
+
+ /**
+ * @deprecated
+ * @see setSubscriptionName
+ * @param durableSubscriptionId
+ */
+ public void setSubcriptionName(String durableSubscriptionId) {
+ this.subscriptionName = durableSubscriptionId;
+ }
+
+ /**
+ * Set noLocal to true to avoid receiving messages that were published
+ * locally on the same connection.
+ *
+ * @openwire:property version=1
+ */
+ public boolean isNoLocal() {
+ return noLocal;
+ }
+
+ public void setNoLocal(boolean noLocal) {
+ this.noLocal = noLocal;
+ }
+
+ /**
+ * An exclusive consumer locks out other consumers from being able to
+ * receive messages from the destination. If there are multiple exclusive
+ * consumers for a destination, the first one created will be the exclusive
+ * consumer of the destination.
+ *
+ * @openwire:property version=1
+ */
+ public boolean isExclusive() {
+ return exclusive;
+ }
+
+ public void setExclusive(boolean exclusive) {
+ this.exclusive = exclusive;
+ }
+
+ /**
+ * A retroactive consumer only has meaning for Topics. It allows a consumer
+ * to retroactively see messages sent prior to the consumer being created.
+ * If the consumer is not durable, it will be delivered the last message
+ * published to the topic. If the consumer is durable then it will receive
+ * all persistent messages that are still stored in persistent storage for
+ * that topic.
+ *
+ * @openwire:property version=1
+ */
+ public boolean isRetroactive() {
+ return retroactive;
+ }
+
+ public void setRetroactive(boolean retroactive) {
+ this.retroactive = retroactive;
+ }
+
+ public RemoveInfo createRemoveCommand() {
+ RemoveInfo command = new RemoveInfo(getConsumerId());
+ command.setResponseRequired(isResponseRequired());
+ return command;
+ }
+
+ /**
+ * The broker will avoid dispatching to a lower priority consumer if there
+ * are other higher priority consumers available to dispatch to. This allows
+ * letting the broker to have an affinity to higher priority consumers.
+ * Default priority is 0.
+ *
+ * @openwire:property version=1
+ */
+ public byte getPriority() {
+ return priority;
+ }
+
+ public void setPriority(byte priority) {
+ this.priority = priority;
+ }
+
+ /**
+ * The route of brokers the command has moved through.
+ *
+ * @openwire:property version=1 cache=true
+ */
+ public BrokerId[] getBrokerPath() {
+ return brokerPath;
+ }
+
+ public void setBrokerPath(BrokerId[] brokerPath) {
+ this.brokerPath = brokerPath;
+ }
+
+ /**
+ * A transient additional predicate that can be used it inject additional
+ * predicates into the selector on the fly. Handy if if say a Security
+ * Broker interceptor wants to filter out messages based on security level
+ * of the consumer.
+ *
+ * @openwire:property version=1
+ */
+ public BooleanExpression getAdditionalPredicate() {
+ return additionalPredicate;
+ }
+
+ public void setAdditionalPredicate(BooleanExpression additionalPredicate) {
+ this.additionalPredicate = additionalPredicate;
+ }
+
+ public Response visit(CommandVisitor visitor) throws Exception {
+ return visitor.processAddConsumer(this);
+ }
+
+ /**
+ * @openwire:property version=1
+ * @return Returns the networkSubscription.
+ */
+ public boolean isNetworkSubscription() {
+ return networkSubscription;
+ }
+
+ /**
+ * @param networkSubscription The networkSubscription to set.
+ */
+ public void setNetworkSubscription(boolean networkSubscription) {
+ this.networkSubscription = networkSubscription;
+ }
+
+ /**
+ * @openwire:property version=1
+ * @return Returns the optimizedAcknowledge.
+ */
+ public boolean isOptimizedAcknowledge() {
+ return optimizedAcknowledge;
+ }
+
+ /**
+ * @param optimizedAcknowledge The optimizedAcknowledge to set.
+ */
+ public void setOptimizedAcknowledge(boolean optimizedAcknowledge) {
+ this.optimizedAcknowledge = optimizedAcknowledge;
+ }
+
+ /**
+ * @return Returns the currentPrefetchSize.
+ */
+ public int getCurrentPrefetchSize() {
+ return currentPrefetchSize;
+ }
+
+ /**
+ * @param currentPrefetchSize The currentPrefetchSize to set.
+ */
+ public void setCurrentPrefetchSize(int currentPrefetchSize) {
+ this.currentPrefetchSize = currentPrefetchSize;
+ }
+
+ /**
+ * The broker may be able to optimize it's processing or provides better QOS
+ * if it knows the consumer will not be sending ranged acks.
+ *
+ * @return true if the consumer will not send range acks.
+ * @openwire:property version=1
+ */
+ public boolean isNoRangeAcks() {
+ return noRangeAcks;
+ }
+
+ public void setNoRangeAcks(boolean noRangeAcks) {
+ this.noRangeAcks = noRangeAcks;
+ }
+
+ public synchronized void addNetworkConsumerId(ConsumerId networkConsumerId) {
+ if (networkConsumerIds == null) {
+ networkConsumerIds = new ArrayList<ConsumerId>();
+ }
+ networkConsumerIds.add(networkConsumerId);
+ }
+
+ public synchronized void removeNetworkConsumerId(ConsumerId networkConsumerId) {
+ if (networkConsumerIds != null) {
+ networkConsumerIds.remove(networkConsumerId);
+ if (networkConsumerIds.isEmpty()) {
+ networkConsumerIds=null;
+ }
+ }
+ }
+
+ public synchronized boolean isNetworkConsumersEmpty() {
+ return networkConsumerIds == null || networkConsumerIds.isEmpty();
+ }
+
+ public synchronized List<ConsumerId> getNetworkConsumerIds(){
+ List<ConsumerId> result = new ArrayList<ConsumerId>();
+ if (networkConsumerIds != null) {
+ result.addAll(networkConsumerIds);
+ }
+ return result;
+ }
+
+ /**
+ * Tracks the original subscription id that causes a subscription to
+ * percolate through a network when networkTTL > 1. Tracking the original
+ * subscription allows duplicate suppression.
+ *
+ * @return array of the current subscription path
+ * @openwire:property version=4
+ */
+ public ConsumerId[] getNetworkConsumerPath() {
+ ConsumerId[] result = null;
+ if (networkConsumerIds != null) {
+ result = networkConsumerIds.toArray(new ConsumerId[0]);
+ }
+ return result;
+ }
+
+ public void setNetworkConsumerPath(ConsumerId[] consumerPath) {
+ if (consumerPath != null) {
+ for (int i=0; i<consumerPath.length; i++) {
+ addNetworkConsumerId(consumerPath[i]);
+ }
+ }
+ }
+
+ public void setLastDeliveredSequenceId(long lastDeliveredSequenceId) {
+ this.lastDeliveredSequenceId = lastDeliveredSequenceId;
+ }
+
+ public long getLastDeliveredSequenceId() {
+ return lastDeliveredSequenceId;
+ }
+
+}
Propchange: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ConsumerInfo.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ControlCommand.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ControlCommand.java?rev=780773&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ControlCommand.java (added)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ControlCommand.java Mon Jun 1 18:37:41 2009
@@ -0,0 +1,52 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.command;
+
+import org.apache.activemq.state.CommandVisitor;
+
+/**
+ * Used to start and stop transports as well as terminating clients.
+ *
+ * @openwire:marshaller code="14"
+ *
+ * @version $Revision: 1.1 $
+ */
+public class ControlCommand extends BaseCommand {
+
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.CONTROL_COMMAND;
+
+ private String command;
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public String getCommand() {
+ return command;
+ }
+
+ public void setCommand(String command) {
+ this.command = command;
+ }
+
+ public Response visit(CommandVisitor visitor) throws Exception {
+ return visitor.processControlCommand(this);
+ }
+}
Added: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/DataArrayResponse.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/DataArrayResponse.java?rev=780773&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/DataArrayResponse.java (added)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/DataArrayResponse.java Mon Jun 1 18:37:41 2009
@@ -0,0 +1,52 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.command;
+
+/**
+ * @openwire:marshaller code="33"
+ * @version $Revision$
+ */
+public class DataArrayResponse extends Response {
+
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.DATA_ARRAY_RESPONSE;
+
+ DataStructure data[];
+
+
+ public DataArrayResponse() {
+ }
+
+ public DataArrayResponse(DataStructure data[]) {
+ this.data = data;
+ }
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public DataStructure[] getData() {
+ return data;
+ }
+
+ public void setData(DataStructure[] data) {
+ this.data = data;
+ }
+
+}
Propchange: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/DataArrayResponse.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/DataResponse.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/DataResponse.java?rev=780773&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/DataResponse.java (added)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/DataResponse.java Mon Jun 1 18:37:41 2009
@@ -0,0 +1,52 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.command;
+
+/**
+ *
+ * @openwire:marshaller code="32"
+ * @version $Revision$
+ */
+public class DataResponse extends Response {
+
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.DATA_RESPONSE;
+
+ DataStructure data;
+
+ public DataResponse() {
+ }
+
+ public DataResponse(DataStructure data) {
+ this.data = data;
+ }
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public DataStructure getData() {
+ return data;
+ }
+
+ public void setData(DataStructure data) {
+ this.data = data;
+ }
+
+}
Propchange: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/DataResponse.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/DataStructure.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/DataStructure.java?rev=780773&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/DataStructure.java (added)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/DataStructure.java Mon Jun 1 18:37:41 2009
@@ -0,0 +1,30 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.command;
+
+/**
+ * @version $Revision$
+ */
+public interface DataStructure {
+
+ /**
+ * @return The type of the data structure
+ */
+ byte getDataStructureType();
+ boolean isMarshallAware();
+
+}
Propchange: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/DataStructure.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/DestinationInfo.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/DestinationInfo.java?rev=780773&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/DestinationInfo.java (added)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/DestinationInfo.java Mon Jun 1 18:37:41 2009
@@ -0,0 +1,129 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.command;
+
+import java.io.IOException;
+
+import org.apache.activemq.state.CommandVisitor;
+
+/**
+ * Used to create and destroy destinations on the broker.
+ *
+ * @openwire:marshaller code="8"
+ * @version $Revision: 1.9 $
+ */
+public class DestinationInfo extends BaseCommand {
+
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.DESTINATION_INFO;
+
+ public static final byte ADD_OPERATION_TYPE = 0;
+ public static final byte REMOVE_OPERATION_TYPE = 1;
+
+ protected ConnectionId connectionId;
+ protected ActiveMQDestination destination;
+ protected byte operationType;
+ protected long timeout;
+ protected BrokerId[] brokerPath;
+
+ public DestinationInfo() {
+ }
+
+ public DestinationInfo(ConnectionId connectionId, byte operationType, ActiveMQDestination destination) {
+ this.connectionId = connectionId;
+ this.operationType = operationType;
+ this.destination = destination;
+ }
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ public boolean isAddOperation() {
+ return operationType == ADD_OPERATION_TYPE;
+ }
+
+ public boolean isRemoveOperation() {
+ return operationType == REMOVE_OPERATION_TYPE;
+ }
+
+ /**
+ * @openwire:property version=1 cache=true
+ */
+ public ConnectionId getConnectionId() {
+ return connectionId;
+ }
+
+ public void setConnectionId(ConnectionId connectionId) {
+ this.connectionId = connectionId;
+ }
+
+ /**
+ * @openwire:property version=1 cache=true
+ */
+ public ActiveMQDestination getDestination() {
+ return destination;
+ }
+
+ public void setDestination(ActiveMQDestination destination) {
+ this.destination = destination;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public byte getOperationType() {
+ return operationType;
+ }
+
+ public void setOperationType(byte operationType) {
+ this.operationType = operationType;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public long getTimeout() {
+ return timeout;
+ }
+
+ public void setTimeout(long timeout) {
+ this.timeout = timeout;
+ }
+
+ /**
+ * The route of brokers the command has moved through.
+ *
+ * @openwire:property version=1 cache=true
+ */
+ public BrokerId[] getBrokerPath() {
+ return brokerPath;
+ }
+
+ public void setBrokerPath(BrokerId[] brokerPath) {
+ this.brokerPath = brokerPath;
+ }
+
+ public Response visit(CommandVisitor visitor) throws Exception {
+ if (isAddOperation()) {
+ return visitor.processAddDestination(this);
+ } else if (isRemoveOperation()) {
+ return visitor.processRemoveDestination(this);
+ }
+ throw new IOException("Unknown operation type: " + getOperationType());
+ }
+
+}
Propchange: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/DestinationInfo.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/DiscoveryEvent.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/DiscoveryEvent.java?rev=780773&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/DiscoveryEvent.java (added)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/DiscoveryEvent.java Mon Jun 1 18:37:41 2009
@@ -0,0 +1,68 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.command;
+
+/**
+ * Represents a discovery event containing the details of the service
+ *
+ * @openwire:marshaller code="40"
+ * @version $Revision:$
+ */
+public class DiscoveryEvent implements DataStructure {
+
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.DISCOVERY_EVENT;
+
+ protected String serviceName;
+ protected String brokerName;
+
+ public DiscoveryEvent() {
+ }
+
+ public DiscoveryEvent(String serviceName) {
+ this.serviceName = serviceName;
+ }
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public String getServiceName() {
+ return serviceName;
+ }
+
+ public void setServiceName(String serviceName) {
+ this.serviceName = serviceName;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public String getBrokerName() {
+ return brokerName;
+ }
+
+ public void setBrokerName(String name) {
+ this.brokerName = name;
+ }
+
+ public boolean isMarshallAware() {
+ return false;
+ }
+}
Propchange: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/DiscoveryEvent.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/Endpoint.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/Endpoint.java?rev=780773&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/Endpoint.java (added)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/Endpoint.java Mon Jun 1 18:37:41 2009
@@ -0,0 +1,49 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.command;
+
+/**
+ * Represents the logical endpoint where commands come from or are sent to.
+ *
+ * For connection based transports like TCP / VM then there is a single endpoint
+ * for all commands. For transports like multicast there could be different
+ * endpoints being used on the same transport.
+ *
+ * @version $Revision: 564271 $
+ */
+public interface Endpoint {
+
+ /**
+ * Returns the name of the endpoint.
+ */
+ String getName();
+
+ /**
+ * Returns the broker ID for this endpoint, if the endpoint is a broker or
+ * null
+ */
+ BrokerId getBrokerId();
+
+ /**
+ * Returns the broker information for this endpoint, if the endpoint is a
+ * broker or null
+ */
+ BrokerInfo getBrokerInfo();
+
+ void setBrokerInfo(BrokerInfo brokerInfo);
+
+}
Added: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ExceptionResponse.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ExceptionResponse.java?rev=780773&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ExceptionResponse.java (added)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ExceptionResponse.java Mon Jun 1 18:37:41 2009
@@ -0,0 +1,54 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.command;
+
+/**
+ * @openwire:marshaller code="31"
+ * @version $Revision: 1.4 $
+ */
+public class ExceptionResponse extends Response {
+
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.EXCEPTION_RESPONSE;
+
+ Throwable exception;
+
+ public ExceptionResponse() {
+ }
+
+ public ExceptionResponse(Throwable e) {
+ setException(e);
+ }
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public Throwable getException() {
+ return exception;
+ }
+
+ public void setException(Throwable exception) {
+ this.exception = exception;
+ }
+
+ public boolean isException() {
+ return true;
+ }
+}
Propchange: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/ExceptionResponse.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/FlushCommand.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/FlushCommand.java?rev=780773&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/FlushCommand.java (added)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/FlushCommand.java Mon Jun 1 18:37:41 2009
@@ -0,0 +1,40 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.command;
+
+import org.apache.activemq.state.CommandVisitor;
+
+/**
+ * An indication to the transport layer that a flush is required.
+ *
+ * @openwire:marshaller code="15"
+ * @version $Revision$
+ */
+public class FlushCommand extends BaseCommand {
+
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.FLUSH_COMMAND;
+ public static final Command COMMAND = new FlushCommand();
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ public Response visit(CommandVisitor visitor) throws Exception {
+ return visitor.processFlush(this);
+ }
+
+}
Added: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/IntegerResponse.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/IntegerResponse.java?rev=780773&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/IntegerResponse.java (added)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/IntegerResponse.java Mon Jun 1 18:37:41 2009
@@ -0,0 +1,51 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.command;
+
+/**
+ * @openwire:marshaller code="34"
+ * @version $Revision$
+ */
+public class IntegerResponse extends Response {
+
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.INTEGER_RESPONSE;
+
+ int result;
+
+ public IntegerResponse() {
+ }
+
+ public IntegerResponse(int result) {
+ this.result = result;
+ }
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public int getResult() {
+ return result;
+ }
+
+ public void setResult(int result) {
+ this.result = result;
+ }
+
+}
Propchange: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/IntegerResponse.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/JournalQueueAck.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/JournalQueueAck.java?rev=780773&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/JournalQueueAck.java (added)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/JournalQueueAck.java Mon Jun 1 18:37:41 2009
@@ -0,0 +1,66 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.command;
+
+import org.apache.activemq.util.IntrospectionSupport;
+
+/**
+ * @openwire:marshaller code="52"
+ * @version $Revision$
+ */
+public class JournalQueueAck implements DataStructure {
+
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.JOURNAL_REMOVE;
+
+ ActiveMQDestination destination;
+ MessageAck messageAck;
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public ActiveMQDestination getDestination() {
+ return destination;
+ }
+
+ public void setDestination(ActiveMQDestination destination) {
+ this.destination = destination;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public MessageAck getMessageAck() {
+ return messageAck;
+ }
+
+ public void setMessageAck(MessageAck messageAck) {
+ this.messageAck = messageAck;
+ }
+
+ public boolean isMarshallAware() {
+ return false;
+ }
+
+ public String toString() {
+ return IntrospectionSupport.toString(this, JournalQueueAck.class);
+ }
+
+}
Propchange: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/JournalQueueAck.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/JournalTopicAck.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/JournalTopicAck.java?rev=780773&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/JournalTopicAck.java (added)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/JournalTopicAck.java Mon Jun 1 18:37:41 2009
@@ -0,0 +1,113 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.command;
+
+import org.apache.activemq.util.IntrospectionSupport;
+
+/**
+ * @openwire:marshaller code="50"
+ * @version $Revision$
+ */
+public class JournalTopicAck implements DataStructure {
+
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.JOURNAL_ACK;
+
+ ActiveMQDestination destination;
+ String clientId;
+ String subscritionName;
+ MessageId messageId;
+ long messageSequenceId;
+ TransactionId transactionId;
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public ActiveMQDestination getDestination() {
+ return destination;
+ }
+
+ public void setDestination(ActiveMQDestination destination) {
+ this.destination = destination;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public MessageId getMessageId() {
+ return messageId;
+ }
+
+ public void setMessageId(MessageId messageId) {
+ this.messageId = messageId;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public long getMessageSequenceId() {
+ return messageSequenceId;
+ }
+
+ public void setMessageSequenceId(long messageSequenceId) {
+ this.messageSequenceId = messageSequenceId;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public String getSubscritionName() {
+ return subscritionName;
+ }
+
+ public void setSubscritionName(String subscritionName) {
+ this.subscritionName = subscritionName;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public String getClientId() {
+ return clientId;
+ }
+
+ public void setClientId(String clientId) {
+ this.clientId = clientId;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public TransactionId getTransactionId() {
+ return transactionId;
+ }
+
+ public void setTransactionId(TransactionId transaction) {
+ this.transactionId = transaction;
+ }
+
+ public boolean isMarshallAware() {
+ return false;
+ }
+
+ public String toString() {
+ return IntrospectionSupport.toString(this, JournalTopicAck.class);
+ }
+}
Propchange: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/JournalTopicAck.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/JournalTrace.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/JournalTrace.java?rev=780773&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/JournalTrace.java (added)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/JournalTrace.java Mon Jun 1 18:37:41 2009
@@ -0,0 +1,64 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.command;
+
+import org.apache.activemq.util.IntrospectionSupport;
+
+/**
+ * @openwire:marshaller code="53"
+ * @version $Revision: 1.6 $
+ */
+public class JournalTrace implements DataStructure {
+
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.JOURNAL_TRACE;
+
+ private String message;
+
+ public JournalTrace() {
+
+ }
+
+ public JournalTrace(String message) {
+ this.message = message;
+ }
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public String getMessage() {
+ return message;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ public boolean isMarshallAware() {
+ return false;
+ }
+
+ public String toString() {
+ return IntrospectionSupport.toString(this, JournalTrace.class);
+ }
+}
Propchange: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/JournalTrace.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/JournalTransaction.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/JournalTransaction.java?rev=780773&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/JournalTransaction.java (added)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/JournalTransaction.java Mon Jun 1 18:37:41 2009
@@ -0,0 +1,91 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.command;
+
+import org.apache.activemq.util.IntrospectionSupport;
+
+/**
+ * @openwire:marshaller code="54"
+ */
+public class JournalTransaction implements DataStructure {
+
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.JOURNAL_TRANSACTION;
+
+ public static final byte XA_PREPARE = 1;
+ public static final byte XA_COMMIT = 2;
+ public static final byte XA_ROLLBACK = 3;
+ public static final byte LOCAL_COMMIT = 4;
+ public static final byte LOCAL_ROLLBACK = 5;
+
+ public byte type;
+ public boolean wasPrepared;
+ public TransactionId transactionId;
+
+ public JournalTransaction(byte type, TransactionId transactionId, boolean wasPrepared) {
+ this.type = type;
+ this.transactionId = transactionId;
+ this.wasPrepared = wasPrepared;
+ }
+
+ public JournalTransaction() {
+ }
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public TransactionId getTransactionId() {
+ return transactionId;
+ }
+
+ public void setTransactionId(TransactionId transactionId) {
+ this.transactionId = transactionId;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public byte getType() {
+ return type;
+ }
+
+ public void setType(byte type) {
+ this.type = type;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public boolean getWasPrepared() {
+ return wasPrepared;
+ }
+
+ public void setWasPrepared(boolean wasPrepared) {
+ this.wasPrepared = wasPrepared;
+ }
+
+ public boolean isMarshallAware() {
+ return false;
+ }
+
+ public String toString() {
+ return IntrospectionSupport.toString(this, JournalTransaction.class);
+ }
+}
Propchange: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/JournalTransaction.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/KeepAliveInfo.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/KeepAliveInfo.java?rev=780773&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/KeepAliveInfo.java (added)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/KeepAliveInfo.java Mon Jun 1 18:37:41 2009
@@ -0,0 +1,103 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.command;
+
+import org.apache.activemq.state.CommandVisitor;
+import org.apache.activemq.util.IntrospectionSupport;
+
+/**
+ * @openwire:marshaller code="10"
+ * @version $Revision$
+ */
+public class KeepAliveInfo extends BaseCommand {
+
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.KEEP_ALIVE_INFO;
+
+ private transient Endpoint from;
+ private transient Endpoint to;
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ public boolean isResponse() {
+ return false;
+ }
+
+ public boolean isMessageDispatch() {
+ return false;
+ }
+
+ public boolean isMessage() {
+ return false;
+ }
+
+ public boolean isMessageAck() {
+ return false;
+ }
+
+ public boolean isBrokerInfo() {
+ return false;
+ }
+
+ public boolean isWireFormatInfo() {
+ return false;
+ }
+
+ /**
+ * The endpoint within the transport where this message came from.
+ */
+ public Endpoint getFrom() {
+ return from;
+ }
+
+ public void setFrom(Endpoint from) {
+ this.from = from;
+ }
+
+ /**
+ * The endpoint within the transport where this message is going to - null
+ * means all endpoints.
+ */
+ public Endpoint getTo() {
+ return to;
+ }
+
+ public void setTo(Endpoint to) {
+ this.to = to;
+ }
+
+ public Response visit(CommandVisitor visitor) throws Exception {
+ return visitor.processKeepAlive(this);
+ }
+
+ public boolean isMarshallAware() {
+ return false;
+ }
+
+ public boolean isMessageDispatchNotification() {
+ return false;
+ }
+
+ public boolean isShutdownInfo() {
+ return false;
+ }
+
+ public String toString() {
+ return IntrospectionSupport.toString(this, KeepAliveInfo.class);
+ }
+}
Propchange: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/command/KeepAliveInfo.java
------------------------------------------------------------------------------
svn:executable = *