You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2014/11/19 00:38:21 UTC
[28/52] [abbrv] [partial] activemq-6 git commit: ACTIVEMQ6-4 Rename
HornetQ* classes to ActiveMQ*
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-proton-plug/src/test/java/org/proton/plug/test/minimalserver/SimpleServerThreadFactory.java
----------------------------------------------------------------------
diff --git a/activemq-protocols/activemq-proton-plug/src/test/java/org/proton/plug/test/minimalserver/SimpleServerThreadFactory.java b/activemq-protocols/activemq-proton-plug/src/test/java/org/proton/plug/test/minimalserver/SimpleServerThreadFactory.java
index d33c235..2919a80 100644
--- a/activemq-protocols/activemq-proton-plug/src/test/java/org/proton/plug/test/minimalserver/SimpleServerThreadFactory.java
+++ b/activemq-protocols/activemq-proton-plug/src/test/java/org/proton/plug/test/minimalserver/SimpleServerThreadFactory.java
@@ -18,7 +18,7 @@ import java.util.concurrent.ThreadFactory;
import java.util.concurrent.atomic.AtomicInteger;
/**
- * A HornetQThreadFactory
+ * A ActiveMQThreadFactory
*
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
*/
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/ActiveMQStompException.java
----------------------------------------------------------------------
diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/ActiveMQStompException.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/ActiveMQStompException.java
new file mode 100644
index 0000000..f75356a
--- /dev/null
+++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/ActiveMQStompException.java
@@ -0,0 +1,134 @@
+/*
+ * Copyright 2005-2014 Red Hat, Inc.
+ * Red Hat 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.core.protocol.stomp;
+
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:hgao@redhat.com">Howard Gao</a>
+ */
+public class ActiveMQStompException extends Exception
+{
+ public static final int NONE = 0;
+ public static final int INVALID_EOL_V10 = 1;
+ public static final int INVALID_COMMAND = 2;
+
+ private static final long serialVersionUID = -274452327574950068L;
+
+ private int code = NONE;
+ private final List<Header> headers = new ArrayList<Header>(10);
+ private String body;
+ private VersionedStompFrameHandler handler;
+ private boolean disconnect;
+
+ public ActiveMQStompException(StompConnection connection, String msg)
+ {
+ super(msg);
+ handler = connection.getFrameHandler();
+ }
+
+ public ActiveMQStompException(String msg)
+ {
+ super(msg);
+ handler = null;
+ }
+
+ public ActiveMQStompException(String msg, Throwable t)
+ {
+ super(msg, t);
+ this.body = t.getMessage();
+ handler = null;
+ }
+
+ //used for version control logic
+ public ActiveMQStompException(int code, String details)
+ {
+ super(details);
+ this.code = code;
+ this.body = details;
+ handler = null;
+ }
+
+ void addHeader(String header, String value)
+ {
+ headers.add(new Header(header, value));
+ }
+
+ public void setBody(String body)
+ {
+ this.body = body;
+ }
+
+ public StompFrame getFrame()
+ {
+ StompFrame frame = null;
+ if (handler == null)
+ {
+ frame = new StompFrame("ERROR");
+ }
+ else
+ {
+ frame = handler.createStompFrame("ERROR");
+ }
+ frame.addHeader("message", this.getMessage());
+ for (Header header : headers)
+ {
+ frame.addHeader(header.key, header.val);
+ }
+
+ if (body != null)
+ {
+ frame.setByteBody(body.getBytes(StandardCharsets.UTF_8));
+ }
+ else
+ {
+ frame.setByteBody(new byte[0]);
+ }
+ frame.setNeedsDisconnect(disconnect);
+ return frame;
+ }
+
+ private static final class Header
+ {
+ public final String key;
+ public final String val;
+
+ public Header(String key, String val)
+ {
+ this.key = key;
+ this.val = val;
+ }
+ }
+
+ public void setDisconnect(boolean b)
+ {
+ disconnect = b;
+ }
+
+ public int getCode()
+ {
+ return code;
+ }
+
+ public void setCode(int newCode)
+ {
+ code = newCode;
+ }
+
+ public void setHandler(VersionedStompFrameHandler frameHandler)
+ {
+ this.handler = frameHandler;
+ }
+}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/ActiveMQStompProtocolLogger.java
----------------------------------------------------------------------
diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/ActiveMQStompProtocolLogger.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/ActiveMQStompProtocolLogger.java
new file mode 100644
index 0000000..e5f7406
--- /dev/null
+++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/ActiveMQStompProtocolLogger.java
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2005-2014 Red Hat, Inc.
+ * Red Hat 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.core.protocol.stomp;
+
+import org.jboss.logging.Logger;
+import org.jboss.logging.annotations.Cause;
+import org.jboss.logging.annotations.LogMessage;
+import org.jboss.logging.annotations.Message;
+import org.jboss.logging.annotations.MessageLogger;
+
+/**
+ * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
+ * 3/8/12
+ *
+ * Logger Code 22
+ *
+ * each message id must be 6 digits long starting with 10, the 3rd digit donates the level so
+ *
+ * INF0 1
+ * WARN 2
+ * DEBUG 3
+ * ERROR 4
+ * TRACE 5
+ * FATAL 6
+ *
+ * so an INFO message would be 101000 to 101999
+ */
+
+@MessageLogger(projectCode = "AMQ")
+public interface ActiveMQStompProtocolLogger
+{
+ /**
+ * The default logger.
+ */
+ ActiveMQStompProtocolLogger LOGGER = Logger.getMessageLogger(ActiveMQStompProtocolLogger.class, ActiveMQStompProtocolLogger.class.getPackage().getName());
+
+ @LogMessage(level = Logger.Level.WARN)
+ @Message(id = 222068, value = "connection closed {0}", format = Message.Format.MESSAGE_FORMAT)
+ void connectionClosed(StompConnection connection);
+
+ @LogMessage(level = Logger.Level.ERROR)
+ @Message(id = 224023, value = "Unable to send frame {0}", format = Message.Format.MESSAGE_FORMAT)
+ void errorSendingFrame(@Cause Exception e, StompFrame frame);
+}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/ActiveMQStompProtocolMessageBundle.java
----------------------------------------------------------------------
diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/ActiveMQStompProtocolMessageBundle.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/ActiveMQStompProtocolMessageBundle.java
new file mode 100644
index 0000000..6eb5da0
--- /dev/null
+++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/ActiveMQStompProtocolMessageBundle.java
@@ -0,0 +1,152 @@
+/*
+ * Copyright 2005-2014 Red Hat, Inc.
+ * Red Hat 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.core.protocol.stomp;
+
+import org.apache.activemq.core.server.impl.ServerMessageImpl;
+import org.jboss.logging.annotations.Cause;
+import org.jboss.logging.annotations.Message;
+import org.jboss.logging.annotations.MessageBundle;
+import org.jboss.logging.Messages;
+
+/**
+ * Logger Code 33
+ * <p>
+ * Each message id must be 6 digits long starting with 10, the 3rd digit should be 9. So the range
+ * is from 339000 to 339999.
+ * <p>
+ * Once released, methods should not be deleted as they may be referenced by knowledge base
+ * articles. Unused methods should be marked as deprecated.
+ * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
+ * @author <a href="mailto:hgao@redhat.com">Howard Gao</a>
+ */
+
+@MessageBundle(projectCode = "AMQ")
+public interface ActiveMQStompProtocolMessageBundle
+{
+ ActiveMQStompProtocolMessageBundle BUNDLE = Messages.getBundle(ActiveMQStompProtocolMessageBundle.class);
+
+ @Message(id = 339000, value = "Stomp Connection TTL cannot be negative: {0}", format = Message.Format.MESSAGE_FORMAT)
+ IllegalStateException negativeConnectionTTL(Long ttl);
+
+ @Message(id = 339001, value = "Destination does not exist: {0}", format = Message.Format.MESSAGE_FORMAT)
+ ActiveMQStompException destinationNotExist(String destination);
+
+ @Message(id = 339002, value = "Stomp versions not supported: {0}", format = Message.Format.MESSAGE_FORMAT)
+ ActiveMQStompException versionNotSupported(String acceptVersion);
+
+ @Message(id = 339003, value = "Header host is null", format = Message.Format.MESSAGE_FORMAT)
+ ActiveMQStompException nullHostHeader();
+
+ @Message(id = 339004, value = "Cannot accept null as host", format = Message.Format.MESSAGE_FORMAT)
+ String hostCannotBeNull();
+
+ @Message(id = 339005, value = "Header host does not match server host", format = Message.Format.MESSAGE_FORMAT)
+ ActiveMQStompException hostNotMatch();
+
+ @Message(id = 339006, value = "host {0} does not match server host name", format = Message.Format.MESSAGE_FORMAT)
+ String hostNotMatchDetails(String host);
+
+ @Message(id = 339007, value = "Connection was destroyed.", format = Message.Format.MESSAGE_FORMAT)
+ ActiveMQStompException connectionDestroyed();
+
+ @Message(id = 339008, value = "Connection has not been established.", format = Message.Format.MESSAGE_FORMAT)
+ ActiveMQStompException connectionNotEstablished();
+
+ @Message(id = 339009, value = "Exception getting session", format = Message.Format.MESSAGE_FORMAT)
+ ActiveMQStompException errorGetSession(@Cause Exception e);
+
+ @Message(id = 339010, value = "Connection is not valid.", format = Message.Format.MESSAGE_FORMAT)
+ ActiveMQStompException invalidConnection();
+
+ @Message(id = 339011, value = "Error sending message {0}", format = Message.Format.MESSAGE_FORMAT)
+ ActiveMQStompException errorSendMessage(ServerMessageImpl message, @Cause Exception e);
+
+ @Message(id = 339012, value = "Error beginning a transaction {0}", format = Message.Format.MESSAGE_FORMAT)
+ ActiveMQStompException errorBeginTx(String txID, @Cause Exception e);
+
+ @Message(id = 339013, value = "Error committing {0}", format = Message.Format.MESSAGE_FORMAT)
+ ActiveMQStompException errorCommitTx(String txID, @Cause Exception e);
+
+ @Message(id = 339014, value = "Error aborting {0}", format = Message.Format.MESSAGE_FORMAT)
+ ActiveMQStompException errorAbortTx(String txID, @Cause Exception e);
+
+ @Message(id = 339015, value = "Client must set destination or id header to a SUBSCRIBE command", format = Message.Format.MESSAGE_FORMAT)
+ ActiveMQStompException noDestination();
+
+ @Message(id = 339016, value = "Error creating subscription {0}", format = Message.Format.MESSAGE_FORMAT)
+ ActiveMQStompException errorCreatSubscription(String subscriptionID, @Cause Exception e);
+
+ @Message(id = 339017, value = "Error unsubscribing {0}", format = Message.Format.MESSAGE_FORMAT)
+ ActiveMQStompException errorUnsubscrib(String subscriptionID, @Cause Exception e);
+
+ @Message(id = 339018, value = "Error acknowledging message {0}", format = Message.Format.MESSAGE_FORMAT)
+ ActiveMQStompException errorAck(String messageID, @Cause Exception e);
+
+ @Message(id = 339019, value = "Invalid char sequence: two consecutive CRs.", format = Message.Format.MESSAGE_FORMAT)
+ ActiveMQStompException invalidTwoCRs();
+
+ @Message(id = 339020, value = "Invalid char sequence: There is a CR not followed by an LF", format = Message.Format.MESSAGE_FORMAT)
+ ActiveMQStompException badCRs();
+
+ @Message(id = 339021, value = "Expect new line char but is {0}", format = Message.Format.MESSAGE_FORMAT)
+ ActiveMQStompException notValidNewLine(byte b);
+
+ @Message(id = 339022, value = "Expect new line char but is {0}", format = Message.Format.MESSAGE_FORMAT)
+ String unexpectedNewLine(byte b);
+
+ @Message(id = 339023, value = "Invalid STOMP frame: {0}", format = Message.Format.MESSAGE_FORMAT)
+ ActiveMQStompException invalidCommand(String dumpByteArray);
+
+ @Message(id = 339024, value = "Invalid STOMP frame: {0}", format = Message.Format.MESSAGE_FORMAT)
+ String invalidFrame(String dumpByteArray);
+
+ @Message(id = 339025, value = "failed to ack because no message with id: {0}", format = Message.Format.MESSAGE_FORMAT)
+ ActiveMQStompException failToAckMissingID(long id);
+
+ @Message(id = 339026, value = "subscription id {0} does not match {1}", format = Message.Format.MESSAGE_FORMAT)
+ ActiveMQStompException subscriptionIDMismatch(String subscriptionID, String actualID);
+
+ @Message(id = 339027, value = "Cannot create a subscriber on the durable subscription if the client-id of the connection is not set", format = Message.Format.MESSAGE_FORMAT)
+ IllegalStateException missingClientID();
+
+ @Message(id = 339028, value = "Message header too big, increase minLargeMessageSize please.", format = Message.Format.MESSAGE_FORMAT)
+ Exception headerTooBig();
+
+ @Message(id = 339029, value = "Unsupported command: {0}", format = Message.Format.MESSAGE_FORMAT)
+ ActiveMQStompException unknownCommand(String command);
+
+ @Message(id = 339030, value = "transaction header is mandatory to COMMIT a transaction", format = Message.Format.MESSAGE_FORMAT)
+ ActiveMQStompException needTxIDHeader();
+
+ @Message(id = 339031, value = "Error handling send", format = Message.Format.MESSAGE_FORMAT)
+ ActiveMQStompException errorHandleSend(@Cause Exception e);
+
+ @Message(id = 339032, value = "Need a transaction id to begin", format = Message.Format.MESSAGE_FORMAT)
+ ActiveMQStompException beginTxNoID();
+
+ @Message(id = 339033, value = "transaction header is mandatory to ABORT a transaction", format = Message.Format.MESSAGE_FORMAT)
+ ActiveMQStompException abortTxNoID();
+
+ @Message(id = 339034, value = "This method should not be called", format = Message.Format.MESSAGE_FORMAT)
+ IllegalStateException invalidCall();
+
+ @Message(id = 339035, value = "Must specify the subscription''s id or the destination you are unsubscribing from", format = Message.Format.MESSAGE_FORMAT)
+ ActiveMQStompException needIDorDestination();
+
+ @Message(id = 339037, value = "Must specify the subscription''s id", format = Message.Format.MESSAGE_FORMAT)
+ ActiveMQStompException needSubscriptionID();
+
+ @Message(id = 339039, value = "No id header in ACK/NACK frame.", format = Message.Format.MESSAGE_FORMAT)
+ ActiveMQStompException noIDInAck();
+}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/HornetQStompException.java
----------------------------------------------------------------------
diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/HornetQStompException.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/HornetQStompException.java
deleted file mode 100644
index 82b775d..0000000
--- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/HornetQStompException.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright 2005-2014 Red Hat, Inc.
- * Red Hat 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.core.protocol.stomp;
-
-import java.nio.charset.StandardCharsets;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author <a href="mailto:hgao@redhat.com">Howard Gao</a>
- */
-public class HornetQStompException extends Exception
-{
- public static final int NONE = 0;
- public static final int INVALID_EOL_V10 = 1;
- public static final int INVALID_COMMAND = 2;
-
- private static final long serialVersionUID = -274452327574950068L;
-
- private int code = NONE;
- private final List<Header> headers = new ArrayList<Header>(10);
- private String body;
- private VersionedStompFrameHandler handler;
- private boolean disconnect;
-
- public HornetQStompException(StompConnection connection, String msg)
- {
- super(msg);
- handler = connection.getFrameHandler();
- }
-
- public HornetQStompException(String msg)
- {
- super(msg);
- handler = null;
- }
-
- public HornetQStompException(String msg, Throwable t)
- {
- super(msg, t);
- this.body = t.getMessage();
- handler = null;
- }
-
- //used for version control logic
- public HornetQStompException(int code, String details)
- {
- super(details);
- this.code = code;
- this.body = details;
- handler = null;
- }
-
- void addHeader(String header, String value)
- {
- headers.add(new Header(header, value));
- }
-
- public void setBody(String body)
- {
- this.body = body;
- }
-
- public StompFrame getFrame()
- {
- StompFrame frame = null;
- if (handler == null)
- {
- frame = new StompFrame("ERROR");
- }
- else
- {
- frame = handler.createStompFrame("ERROR");
- }
- frame.addHeader("message", this.getMessage());
- for (Header header : headers)
- {
- frame.addHeader(header.key, header.val);
- }
-
- if (body != null)
- {
- frame.setByteBody(body.getBytes(StandardCharsets.UTF_8));
- }
- else
- {
- frame.setByteBody(new byte[0]);
- }
- frame.setNeedsDisconnect(disconnect);
- return frame;
- }
-
- private static final class Header
- {
- public final String key;
- public final String val;
-
- public Header(String key, String val)
- {
- this.key = key;
- this.val = val;
- }
- }
-
- public void setDisconnect(boolean b)
- {
- disconnect = b;
- }
-
- public int getCode()
- {
- return code;
- }
-
- public void setCode(int newCode)
- {
- code = newCode;
- }
-
- public void setHandler(VersionedStompFrameHandler frameHandler)
- {
- this.handler = frameHandler;
- }
-}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/HornetQStompProtocolLogger.java
----------------------------------------------------------------------
diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/HornetQStompProtocolLogger.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/HornetQStompProtocolLogger.java
deleted file mode 100644
index a30f403..0000000
--- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/HornetQStompProtocolLogger.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright 2005-2014 Red Hat, Inc.
- * Red Hat 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.core.protocol.stomp;
-
-import org.jboss.logging.Logger;
-import org.jboss.logging.annotations.Cause;
-import org.jboss.logging.annotations.LogMessage;
-import org.jboss.logging.annotations.Message;
-import org.jboss.logging.annotations.MessageLogger;
-
-/**
- * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
- * 3/8/12
- *
- * Logger Code 22
- *
- * each message id must be 6 digits long starting with 10, the 3rd digit donates the level so
- *
- * INF0 1
- * WARN 2
- * DEBUG 3
- * ERROR 4
- * TRACE 5
- * FATAL 6
- *
- * so an INFO message would be 101000 to 101999
- */
-
-@MessageLogger(projectCode = "HQ")
-public interface HornetQStompProtocolLogger
-{
- /**
- * The default logger.
- */
- HornetQStompProtocolLogger LOGGER = Logger.getMessageLogger(HornetQStompProtocolLogger.class, HornetQStompProtocolLogger.class.getPackage().getName());
-
- @LogMessage(level = Logger.Level.WARN)
- @Message(id = 222068, value = "connection closed {0}", format = Message.Format.MESSAGE_FORMAT)
- void connectionClosed(StompConnection connection);
-
- @LogMessage(level = Logger.Level.ERROR)
- @Message(id = 224023, value = "Unable to send frame {0}", format = Message.Format.MESSAGE_FORMAT)
- void errorSendingFrame(@Cause Exception e, StompFrame frame);
-}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/HornetQStompProtocolMessageBundle.java
----------------------------------------------------------------------
diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/HornetQStompProtocolMessageBundle.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/HornetQStompProtocolMessageBundle.java
deleted file mode 100644
index d895c47..0000000
--- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/HornetQStompProtocolMessageBundle.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Copyright 2005-2014 Red Hat, Inc.
- * Red Hat 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.core.protocol.stomp;
-
-import org.apache.activemq.core.server.impl.ServerMessageImpl;
-import org.jboss.logging.annotations.Cause;
-import org.jboss.logging.annotations.Message;
-import org.jboss.logging.annotations.MessageBundle;
-import org.jboss.logging.Messages;
-
-/**
- * Logger Code 33
- * <p>
- * Each message id must be 6 digits long starting with 10, the 3rd digit should be 9. So the range
- * is from 339000 to 339999.
- * <p>
- * Once released, methods should not be deleted as they may be referenced by knowledge base
- * articles. Unused methods should be marked as deprecated.
- * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
- * @author <a href="mailto:hgao@redhat.com">Howard Gao</a>
- */
-
-@MessageBundle(projectCode = "HQ")
-public interface HornetQStompProtocolMessageBundle
-{
- HornetQStompProtocolMessageBundle BUNDLE = Messages.getBundle(HornetQStompProtocolMessageBundle.class);
-
- @Message(id = 339000, value = "Stomp Connection TTL cannot be negative: {0}", format = Message.Format.MESSAGE_FORMAT)
- IllegalStateException negativeConnectionTTL(Long ttl);
-
- @Message(id = 339001, value = "Destination does not exist: {0}", format = Message.Format.MESSAGE_FORMAT)
- HornetQStompException destinationNotExist(String destination);
-
- @Message(id = 339002, value = "Stomp versions not supported: {0}", format = Message.Format.MESSAGE_FORMAT)
- HornetQStompException versionNotSupported(String acceptVersion);
-
- @Message(id = 339003, value = "Header host is null", format = Message.Format.MESSAGE_FORMAT)
- HornetQStompException nullHostHeader();
-
- @Message(id = 339004, value = "Cannot accept null as host", format = Message.Format.MESSAGE_FORMAT)
- String hostCannotBeNull();
-
- @Message(id = 339005, value = "Header host does not match server host", format = Message.Format.MESSAGE_FORMAT)
- HornetQStompException hostNotMatch();
-
- @Message(id = 339006, value = "host {0} does not match server host name", format = Message.Format.MESSAGE_FORMAT)
- String hostNotMatchDetails(String host);
-
- @Message(id = 339007, value = "Connection was destroyed.", format = Message.Format.MESSAGE_FORMAT)
- HornetQStompException connectionDestroyed();
-
- @Message(id = 339008, value = "Connection has not been established.", format = Message.Format.MESSAGE_FORMAT)
- HornetQStompException connectionNotEstablished();
-
- @Message(id = 339009, value = "Exception getting session", format = Message.Format.MESSAGE_FORMAT)
- HornetQStompException errorGetSession(@Cause Exception e);
-
- @Message(id = 339010, value = "Connection is not valid.", format = Message.Format.MESSAGE_FORMAT)
- HornetQStompException invalidConnection();
-
- @Message(id = 339011, value = "Error sending message {0}", format = Message.Format.MESSAGE_FORMAT)
- HornetQStompException errorSendMessage(ServerMessageImpl message, @Cause Exception e);
-
- @Message(id = 339012, value = "Error beginning a transaction {0}", format = Message.Format.MESSAGE_FORMAT)
- HornetQStompException errorBeginTx(String txID, @Cause Exception e);
-
- @Message(id = 339013, value = "Error committing {0}", format = Message.Format.MESSAGE_FORMAT)
- HornetQStompException errorCommitTx(String txID, @Cause Exception e);
-
- @Message(id = 339014, value = "Error aborting {0}", format = Message.Format.MESSAGE_FORMAT)
- HornetQStompException errorAbortTx(String txID, @Cause Exception e);
-
- @Message(id = 339015, value = "Client must set destination or id header to a SUBSCRIBE command", format = Message.Format.MESSAGE_FORMAT)
- HornetQStompException noDestination();
-
- @Message(id = 339016, value = "Error creating subscription {0}", format = Message.Format.MESSAGE_FORMAT)
- HornetQStompException errorCreatSubscription(String subscriptionID, @Cause Exception e);
-
- @Message(id = 339017, value = "Error unsubscribing {0}", format = Message.Format.MESSAGE_FORMAT)
- HornetQStompException errorUnsubscrib(String subscriptionID, @Cause Exception e);
-
- @Message(id = 339018, value = "Error acknowledging message {0}", format = Message.Format.MESSAGE_FORMAT)
- HornetQStompException errorAck(String messageID, @Cause Exception e);
-
- @Message(id = 339019, value = "Invalid char sequence: two consecutive CRs.", format = Message.Format.MESSAGE_FORMAT)
- HornetQStompException invalidTwoCRs();
-
- @Message(id = 339020, value = "Invalid char sequence: There is a CR not followed by an LF", format = Message.Format.MESSAGE_FORMAT)
- HornetQStompException badCRs();
-
- @Message(id = 339021, value = "Expect new line char but is {0}", format = Message.Format.MESSAGE_FORMAT)
- HornetQStompException notValidNewLine(byte b);
-
- @Message(id = 339022, value = "Expect new line char but is {0}", format = Message.Format.MESSAGE_FORMAT)
- String unexpectedNewLine(byte b);
-
- @Message(id = 339023, value = "Invalid STOMP frame: {0}", format = Message.Format.MESSAGE_FORMAT)
- HornetQStompException invalidCommand(String dumpByteArray);
-
- @Message(id = 339024, value = "Invalid STOMP frame: {0}", format = Message.Format.MESSAGE_FORMAT)
- String invalidFrame(String dumpByteArray);
-
- @Message(id = 339025, value = "failed to ack because no message with id: {0}", format = Message.Format.MESSAGE_FORMAT)
- HornetQStompException failToAckMissingID(long id);
-
- @Message(id = 339026, value = "subscription id {0} does not match {1}", format = Message.Format.MESSAGE_FORMAT)
- HornetQStompException subscriptionIDMismatch(String subscriptionID, String actualID);
-
- @Message(id = 339027, value = "Cannot create a subscriber on the durable subscription if the client-id of the connection is not set", format = Message.Format.MESSAGE_FORMAT)
- IllegalStateException missingClientID();
-
- @Message(id = 339028, value = "Message header too big, increase minLargeMessageSize please.", format = Message.Format.MESSAGE_FORMAT)
- Exception headerTooBig();
-
- @Message(id = 339029, value = "Unsupported command: {0}", format = Message.Format.MESSAGE_FORMAT)
- HornetQStompException unknownCommand(String command);
-
- @Message(id = 339030, value = "transaction header is mandatory to COMMIT a transaction", format = Message.Format.MESSAGE_FORMAT)
- HornetQStompException needTxIDHeader();
-
- @Message(id = 339031, value = "Error handling send", format = Message.Format.MESSAGE_FORMAT)
- HornetQStompException errorHandleSend(@Cause Exception e);
-
- @Message(id = 339032, value = "Need a transaction id to begin", format = Message.Format.MESSAGE_FORMAT)
- HornetQStompException beginTxNoID();
-
- @Message(id = 339033, value = "transaction header is mandatory to ABORT a transaction", format = Message.Format.MESSAGE_FORMAT)
- HornetQStompException abortTxNoID();
-
- @Message(id = 339034, value = "This method should not be called", format = Message.Format.MESSAGE_FORMAT)
- IllegalStateException invalidCall();
-
- @Message(id = 339035, value = "Must specify the subscription''s id or the destination you are unsubscribing from", format = Message.Format.MESSAGE_FORMAT)
- HornetQStompException needIDorDestination();
-
- @Message(id = 339037, value = "Must specify the subscription''s id", format = Message.Format.MESSAGE_FORMAT)
- HornetQStompException needSubscriptionID();
-
- @Message(id = 339039, value = "No id header in ACK/NACK frame.", format = Message.Format.MESSAGE_FORMAT)
- HornetQStompException noIDInAck();
-}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompConnection.java
----------------------------------------------------------------------
diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompConnection.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompConnection.java
index 733faf6..40c13a3 100644
--- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompConnection.java
+++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompConnection.java
@@ -23,13 +23,13 @@ import java.util.concurrent.CopyOnWriteArrayList;
import org.apache.activemq.api.core.ActiveMQBuffer;
import org.apache.activemq.api.core.ActiveMQBuffers;
import org.apache.activemq.api.core.ActiveMQException;
-import org.apache.activemq.api.core.client.HornetQClient;
+import org.apache.activemq.api.core.client.ActiveMQClient;
import org.apache.activemq.core.protocol.stomp.v10.StompFrameHandlerV10;
import org.apache.activemq.core.protocol.stomp.v12.StompFrameHandlerV12;
import org.apache.activemq.core.remoting.CloseListener;
import org.apache.activemq.core.remoting.FailureListener;
import org.apache.activemq.core.remoting.impl.netty.TransportConstants;
-import org.apache.activemq.core.server.HornetQServerLogger;
+import org.apache.activemq.core.server.ActiveMQServerLogger;
import org.apache.activemq.core.server.ServerMessage;
import org.apache.activemq.core.server.impl.ServerMessageImpl;
import org.apache.activemq.spi.core.protocol.RemotingConnection;
@@ -38,7 +38,7 @@ import org.apache.activemq.spi.core.remoting.Connection;
import org.apache.activemq.utils.ConfigurationHelper;
import org.apache.activemq.utils.VersionLoader;
-import static org.apache.activemq.core.protocol.stomp.HornetQStompProtocolMessageBundle.BUNDLE;
+import static org.apache.activemq.core.protocol.stomp.ActiveMQStompProtocolMessageBundle.BUNDLE;
/**
* A StompConnection
@@ -48,8 +48,8 @@ import static org.apache.activemq.core.protocol.stomp.HornetQStompProtocolMessag
public final class StompConnection implements RemotingConnection
{
protected static final String CONNECTION_ID_PROP = "__HQ_CID";
- private static final String SERVER_NAME = "HornetQ/" + VersionLoader.getVersion().getFullVersion() +
- " HornetQ Messaging Engine";
+ private static final String SERVER_NAME = "ActiveMQ/" + VersionLoader.getVersion().getFullVersion() +
+ " ActiveMQ Messaging Engine";
private final StompProtocolManager manager;
@@ -93,24 +93,24 @@ public final class StompConnection implements RemotingConnection
private int minLargeMessageSize;
- public StompFrame decode(ActiveMQBuffer buffer) throws HornetQStompException
+ public StompFrame decode(ActiveMQBuffer buffer) throws ActiveMQStompException
{
StompFrame frame = null;
try
{
frame = frameHandler.decode(buffer);
}
- catch (HornetQStompException e)
+ catch (ActiveMQStompException e)
{
switch (e.getCode())
{
- case HornetQStompException.INVALID_EOL_V10:
+ case ActiveMQStompException.INVALID_EOL_V10:
if (version != null) throw e;
frameHandler = new StompFrameHandlerV12(this);
buffer.resetReaderIndex();
frame = decode(buffer);
break;
- case HornetQStompException.INVALID_COMMAND:
+ case ActiveMQStompException.INVALID_COMMAND:
frameHandler.onError(e);
break;
default:
@@ -141,7 +141,7 @@ public final class StompConnection implements RemotingConnection
false,
acceptorUsed.getConfiguration());
this.minLargeMessageSize = ConfigurationHelper.getIntProperty(TransportConstants.STOMP_MIN_LARGE_MESSAGE_SIZE,
- HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE,
+ ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE,
acceptorUsed.getConfiguration());
}
@@ -239,7 +239,7 @@ public final class StompConnection implements RemotingConnection
return res;
}
- public void checkDestination(String destination) throws HornetQStompException
+ public void checkDestination(String destination) throws ActiveMQStompException
{
if (!manager.destinationExists(destination))
{
@@ -297,7 +297,7 @@ public final class StompConnection implements RemotingConnection
destroyed = true;
}
- HornetQServerLogger.LOGGER.connectionFailureDetected(me.getMessage(), me.getType());
+ ActiveMQServerLogger.LOGGER.connectionFailureDetected(me.getMessage(), me.getType());
// Then call the listeners
callFailureListeners(me);
@@ -402,7 +402,7 @@ public final class StompConnection implements RemotingConnection
// Failure of one listener to execute shouldn't prevent others
// from
// executing
- HornetQServerLogger.LOGGER.errorCallingFailureListener(t);
+ ActiveMQServerLogger.LOGGER.errorCallingFailureListener(t);
}
}
}
@@ -422,7 +422,7 @@ public final class StompConnection implements RemotingConnection
// Failure of one listener to execute shouldn't prevent others
// from
// executing
- HornetQServerLogger.LOGGER.errorCallingFailureListener(t);
+ ActiveMQServerLogger.LOGGER.errorCallingFailureListener(t);
}
}
}
@@ -431,7 +431,7 @@ public final class StompConnection implements RemotingConnection
* accept-version value takes form of "v1,v2,v3..."
* we need to return the highest supported version
*/
- public void negotiateVersion(StompFrame frame) throws HornetQStompException
+ public void negotiateVersion(StompFrame frame) throws ActiveMQStompException
{
String acceptVersion = frame.getHeader(Stomp.Headers.ACCEPT_VERSION);
@@ -463,7 +463,7 @@ public final class StompConnection implements RemotingConnection
else
{
//not a supported version!
- HornetQStompException error = BUNDLE.versionNotSupported(acceptVersion);
+ ActiveMQStompException error = BUNDLE.versionNotSupported(acceptVersion);
error.addHeader("version", acceptVersion);
error.addHeader("content-type", "text/plain");
error.setBody("Supported protocol version are " + manager.getSupportedVersionsAsString());
@@ -483,11 +483,11 @@ public final class StompConnection implements RemotingConnection
}
//reject if the host doesn't match
- public void setHost(String host) throws HornetQStompException
+ public void setHost(String host) throws ActiveMQStompException
{
if (host == null)
{
- HornetQStompException error = BUNDLE.nullHostHeader();
+ ActiveMQStompException error = BUNDLE.nullHostHeader();
error.setBody(BUNDLE.hostCannotBeNull());
throw error;
}
@@ -495,7 +495,7 @@ public final class StompConnection implements RemotingConnection
String localHost = manager.getVirtualHostName();
if (!host.equals(localHost))
{
- HornetQStompException error = BUNDLE.hostNotMatch();
+ ActiveMQStompException error = BUNDLE.hostNotMatch();
error.setBody(BUNDLE.hostNotMatchDetails(host));
throw error;
}
@@ -529,7 +529,7 @@ public final class StompConnection implements RemotingConnection
reply = frameHandler.handleFrame(request);
}
- catch (HornetQStompException e)
+ catch (ActiveMQStompException e)
{
reply = e.getFrame();
}
@@ -566,7 +566,7 @@ public final class StompConnection implements RemotingConnection
return manager.createServerMessage();
}
- public StompSession getSession(String txID) throws HornetQStompException
+ public StompSession getSession(String txID) throws ActiveMQStompException
{
StompSession session = null;
try
@@ -588,7 +588,7 @@ public final class StompConnection implements RemotingConnection
return session;
}
- protected void validate() throws HornetQStompException
+ protected void validate() throws ActiveMQStompException
{
if (!this.valid)
{
@@ -596,7 +596,7 @@ public final class StompConnection implements RemotingConnection
}
}
- protected void sendServerMessage(ServerMessageImpl message, String txID) throws HornetQStompException
+ protected void sendServerMessage(ServerMessageImpl message, String txID) throws ActiveMQStompException
{
StompSession stompSession = getSession(txID);
@@ -638,13 +638,13 @@ public final class StompConnection implements RemotingConnection
destroy();
}
- protected void beginTransaction(String txID) throws HornetQStompException
+ protected void beginTransaction(String txID) throws ActiveMQStompException
{
try
{
manager.beginTransaction(this, txID);
}
- catch (HornetQStompException e)
+ catch (ActiveMQStompException e)
{
throw e;
}
@@ -654,7 +654,7 @@ public final class StompConnection implements RemotingConnection
}
}
- public void commitTransaction(String txID) throws HornetQStompException
+ public void commitTransaction(String txID) throws ActiveMQStompException
{
try
{
@@ -666,13 +666,13 @@ public final class StompConnection implements RemotingConnection
}
}
- public void abortTransaction(String txID) throws HornetQStompException
+ public void abortTransaction(String txID) throws ActiveMQStompException
{
try
{
manager.abortTransaction(this, txID);
}
- catch (HornetQStompException e)
+ catch (ActiveMQStompException e)
{
throw e;
}
@@ -683,7 +683,7 @@ public final class StompConnection implements RemotingConnection
}
void subscribe(String destination, String selector, String ack,
- String id, String durableSubscriptionName, boolean noLocal) throws HornetQStompException
+ String id, String durableSubscriptionName, boolean noLocal) throws ActiveMQStompException
{
if (noLocal)
{
@@ -721,7 +721,7 @@ public final class StompConnection implements RemotingConnection
{
manager.createSubscription(this, subscriptionID, durableSubscriptionName, destination, selector, ack, noLocal);
}
- catch (HornetQStompException e)
+ catch (ActiveMQStompException e)
{
throw e;
}
@@ -731,13 +731,13 @@ public final class StompConnection implements RemotingConnection
}
}
- public void unsubscribe(String subscriptionID, String durableSubscriberName) throws HornetQStompException
+ public void unsubscribe(String subscriptionID, String durableSubscriberName) throws ActiveMQStompException
{
try
{
manager.unsubscribe(this, subscriptionID, durableSubscriberName);
}
- catch (HornetQStompException e)
+ catch (ActiveMQStompException e)
{
throw e;
}
@@ -747,13 +747,13 @@ public final class StompConnection implements RemotingConnection
}
}
- public void acknowledge(String messageID, String subscriptionID) throws HornetQStompException
+ public void acknowledge(String messageID, String subscriptionID) throws ActiveMQStompException
{
try
{
manager.acknowledge(this, messageID, subscriptionID);
}
- catch (HornetQStompException e)
+ catch (ActiveMQStompException e)
{
throw e;
}
@@ -768,7 +768,7 @@ public final class StompConnection implements RemotingConnection
return String.valueOf(version);
}
- public String getHornetQServerName()
+ public String getActiveMQServerName()
{
return SERVER_NAME;
}
@@ -792,7 +792,7 @@ public final class StompConnection implements RemotingConnection
public void physicalSend(StompFrame frame) throws Exception
{
- ActiveMQBuffer buffer = frame.toHornetQBuffer();
+ ActiveMQBuffer buffer = frame.toActiveMQBuffer();
synchronized (sendLock)
{
getTransportConnection().write(buffer, false, false);
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompDecoder.java
----------------------------------------------------------------------
diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompDecoder.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompDecoder.java
index e7d15c2..f122ccc 100644
--- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompDecoder.java
+++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompDecoder.java
@@ -17,7 +17,7 @@ import java.util.Map;
import org.apache.activemq.api.core.ActiveMQBuffer;
-import static org.apache.activemq.core.protocol.stomp.HornetQStompProtocolMessageBundle.BUNDLE;
+import static org.apache.activemq.core.protocol.stomp.ActiveMQStompProtocolMessageBundle.BUNDLE;
/**
* A StompDecoder
@@ -188,7 +188,7 @@ public class StompDecoder
* unsupported EOLs ("\r\n" valid for 1.2 only). The StompConnection will switch
* to proper version decoders on catching such exceptions.
*/
- public synchronized StompFrame decode(final ActiveMQBuffer buffer) throws HornetQStompException
+ public synchronized StompFrame decode(final ActiveMQBuffer buffer) throws ActiveMQStompException
{
int readable = buffer.readableBytes();
@@ -225,7 +225,7 @@ public class StompDecoder
return ret;
}
- protected StompFrame parseBody() throws HornetQStompException
+ protected StompFrame parseBody() throws ActiveMQStompException
{
byte[] content = null;
@@ -293,7 +293,7 @@ public class StompDecoder
}
}
- protected boolean parseHeaders() throws HornetQStompException
+ protected boolean parseHeaders() throws ActiveMQStompException
{
if (headerBytesCopyStart == -1)
{
@@ -399,7 +399,7 @@ public class StompDecoder
return true;
}
- protected boolean parseCommand() throws HornetQStompException
+ protected boolean parseCommand() throws ActiveMQStompException
{
int offset = 0;
boolean nextChar = false;
@@ -621,8 +621,8 @@ public class StompDecoder
if (workingBuffer[pos - 1] != NEW_LINE)
{
//give a signal to try other versions
- HornetQStompException error = BUNDLE.notValidNewLine(workingBuffer[pos - 1]);
- error.setCode(HornetQStompException.INVALID_EOL_V10);
+ ActiveMQStompException error = BUNDLE.notValidNewLine(workingBuffer[pos - 1]);
+ error.setCode(ActiveMQStompException.INVALID_EOL_V10);
error.setBody(BUNDLE.unexpectedNewLine(workingBuffer[pos - 1]));
throw error;
}
@@ -630,10 +630,10 @@ public class StompDecoder
return true;
}
- public void throwInvalid() throws HornetQStompException
+ public void throwInvalid() throws ActiveMQStompException
{
- HornetQStompException error = BUNDLE.invalidCommand(this.dumpByteArray(workingBuffer));
- error.setCode(HornetQStompException.INVALID_COMMAND);
+ ActiveMQStompException error = BUNDLE.invalidCommand(this.dumpByteArray(workingBuffer));
+ error.setCode(ActiveMQStompException.INVALID_COMMAND);
error.setBody(BUNDLE.invalidFrame(this.dumpByteArray(workingBuffer)));
throw error;
}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompFrame.java
----------------------------------------------------------------------
diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompFrame.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompFrame.java
index 46aa639..525c514 100644
--- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompFrame.java
+++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompFrame.java
@@ -75,7 +75,7 @@ public class StompFrame
{
if (buffer == null)
{
- buffer = toHornetQBuffer();
+ buffer = toActiveMQBuffer();
}
return size;
}
@@ -97,7 +97,7 @@ public class StompFrame
isPing = ping;
}
- public ActiveMQBuffer toHornetQBuffer() throws Exception
+ public ActiveMQBuffer toActiveMQBuffer() throws Exception
{
if (buffer == null)
{
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompProtocolManager.java
----------------------------------------------------------------------
diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompProtocolManager.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompProtocolManager.java
index 9e1a0b4..24ea296 100644
--- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompProtocolManager.java
+++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompProtocolManager.java
@@ -27,15 +27,15 @@ import org.apache.activemq.api.core.ActiveMQBuffer;
import org.apache.activemq.api.core.ActiveMQExceptionType;
import org.apache.activemq.api.core.Interceptor;
import org.apache.activemq.api.core.SimpleString;
-import org.apache.activemq.api.core.client.HornetQClient;
+import org.apache.activemq.api.core.client.ActiveMQClient;
import org.apache.activemq.api.core.management.CoreNotificationType;
import org.apache.activemq.api.core.management.ManagementHelper;
import org.apache.activemq.core.journal.IOAsyncTask;
import org.apache.activemq.core.postoffice.BindingType;
import org.apache.activemq.core.remoting.impl.netty.NettyServerConnection;
-import org.apache.activemq.core.server.HornetQMessageBundle;
-import org.apache.activemq.core.server.HornetQServer;
-import org.apache.activemq.core.server.HornetQServerLogger;
+import org.apache.activemq.core.server.ActiveMQMessageBundle;
+import org.apache.activemq.core.server.ActiveMQServer;
+import org.apache.activemq.core.server.ActiveMQServerLogger;
import org.apache.activemq.core.server.ServerSession;
import org.apache.activemq.core.server.impl.ServerMessageImpl;
import org.apache.activemq.core.server.management.ManagementService;
@@ -47,12 +47,12 @@ import org.apache.activemq.spi.core.protocol.ProtocolManager;
import org.apache.activemq.spi.core.protocol.RemotingConnection;
import org.apache.activemq.spi.core.remoting.Acceptor;
import org.apache.activemq.spi.core.remoting.Connection;
-import org.apache.activemq.spi.core.security.HornetQSecurityManager;
+import org.apache.activemq.spi.core.security.ActiveMQSecurityManager;
import org.apache.activemq.utils.ConcurrentHashSet;
import org.apache.activemq.utils.TypedProperties;
import org.apache.activemq.utils.UUIDGenerator;
-import static org.apache.activemq.core.protocol.stomp.HornetQStompProtocolMessageBundle.BUNDLE;
+import static org.apache.activemq.core.protocol.stomp.ActiveMQStompProtocolMessageBundle.BUNDLE;
/**
* StompProtocolManager
@@ -65,7 +65,7 @@ class StompProtocolManager implements ProtocolManager, NotificationListener
// Attributes ----------------------------------------------------
- private final HornetQServer server;
+ private final ActiveMQServer server;
private final Executor executor;
@@ -80,7 +80,7 @@ class StompProtocolManager implements ProtocolManager, NotificationListener
// Constructors --------------------------------------------------
- public StompProtocolManager(final HornetQServer server, final List<Interceptor> interceptors)
+ public StompProtocolManager(final ActiveMQServer server, final List<Interceptor> interceptors)
{
this.server = server;
this.executor = server.getExecutorFactory().getExecutor();
@@ -152,7 +152,7 @@ class StompProtocolManager implements ProtocolManager, NotificationListener
}
catch (Exception e)
{
- HornetQServerLogger.LOGGER.errorDecodingPacket(e);
+ ActiveMQServerLogger.LOGGER.errorDecodingPacket(e);
return;
}
@@ -194,15 +194,15 @@ class StompProtocolManager implements ProtocolManager, NotificationListener
public boolean send(final StompConnection connection, final StompFrame frame)
{
- if (HornetQServerLogger.LOGGER.isTraceEnabled())
+ if (ActiveMQServerLogger.LOGGER.isTraceEnabled())
{
- HornetQServerLogger.LOGGER.trace("sent " + frame);
+ ActiveMQServerLogger.LOGGER.trace("sent " + frame);
}
synchronized (connection)
{
if (connection.isDestroyed())
{
- HornetQStompProtocolLogger.LOGGER.connectionClosed(connection);
+ ActiveMQStompProtocolLogger.LOGGER.connectionClosed(connection);
return false;
}
@@ -212,7 +212,7 @@ class StompProtocolManager implements ProtocolManager, NotificationListener
}
catch (Exception e)
{
- HornetQStompProtocolLogger.LOGGER.errorSendingFrame(e, frame);
+ ActiveMQStompProtocolLogger.LOGGER.errorSendingFrame(e, frame);
return false;
}
return true;
@@ -236,7 +236,7 @@ class StompProtocolManager implements ProtocolManager, NotificationListener
ServerSession session = server.createSession(name,
connection.getLogin(),
connection.getPasscode(),
- HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE,
+ ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE,
connection,
true,
false,
@@ -261,7 +261,7 @@ class StompProtocolManager implements ProtocolManager, NotificationListener
ServerSession session = server.createSession(name,
connection.getLogin(),
connection.getPasscode(),
- HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE,
+ ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE,
connection,
false,
false,
@@ -296,7 +296,7 @@ class StompProtocolManager implements ProtocolManager, NotificationListener
}
catch (Exception e)
{
- HornetQServerLogger.LOGGER.errorCleaningStompConn(e);
+ ActiveMQServerLogger.LOGGER.errorCleaningStompConn(e);
}
}
@@ -315,7 +315,7 @@ class StompProtocolManager implements ProtocolManager, NotificationListener
}
catch (Exception e)
{
- HornetQServerLogger.LOGGER.errorCleaningStompConn(e);
+ ActiveMQServerLogger.LOGGER.errorCleaningStompConn(e);
}
iterator.remove();
}
@@ -330,9 +330,9 @@ class StompProtocolManager implements ProtocolManager, NotificationListener
{
public void onError(final int errorCode, final String errorMessage)
{
- HornetQServerLogger.LOGGER.errorProcessingIOCallback(errorCode, errorMessage);
+ ActiveMQServerLogger.LOGGER.errorProcessingIOCallback(errorCode, errorMessage);
- HornetQStompException e = new HornetQStompException("Error sending reply",
+ ActiveMQStompException e = new ActiveMQStompException("Error sending reply",
ActiveMQExceptionType.createException(errorCode, errorMessage));
StompFrame error = e.getFrame();
@@ -353,14 +353,14 @@ class StompProtocolManager implements ProtocolManager, NotificationListener
public String getVirtualHostName()
{
- return "hornetq";
+ return "activemq";
}
public boolean validateUser(String login, String passcode)
{
boolean validated = true;
- HornetQSecurityManager sm = server.getSecurityManager();
+ ActiveMQSecurityManager sm = server.getSecurityManager();
if (sm != null && server.getConfiguration().isSecurityEnabled())
{
@@ -380,7 +380,7 @@ class StompProtocolManager implements ProtocolManager, NotificationListener
StompSession session = getTransactedSession(connection, txID);
if (session == null)
{
- throw new HornetQStompException("No transaction started: " + txID);
+ throw new ActiveMQStompException("No transaction started: " + txID);
}
transactedSessions.remove(txID);
session.getSession().commit();
@@ -391,7 +391,7 @@ class StompProtocolManager implements ProtocolManager, NotificationListener
StompSession session = getTransactedSession(connection, txID);
if (session == null)
{
- throw new HornetQStompException("No transaction started: " + txID);
+ throw new ActiveMQStompException("No transaction started: " + txID);
}
transactedSessions.remove(txID);
session.getSession().rollback(false);
@@ -406,7 +406,7 @@ class StompProtocolManager implements ProtocolManager, NotificationListener
stompSession.setNoLocal(noLocal);
if (stompSession.containsSubscription(subscriptionID))
{
- throw new HornetQStompException("There already is a subscription for: " + subscriptionID +
+ throw new ActiveMQStompException("There already is a subscription for: " + subscriptionID +
". Either use unique subscription IDs or do not create multiple subscriptions for the same destination");
}
long consumerID = server.getStorageManager().generateID();
@@ -427,7 +427,7 @@ class StompProtocolManager implements ProtocolManager, NotificationListener
boolean unsubscribed = stompSession.unsubscribe(subscriptionID, durableSubscriberName);
if (!unsubscribed)
{
- throw new HornetQStompException("Cannot unsubscribe as no subscription exists for id: " + subscriptionID);
+ throw new ActiveMQStompException("Cannot unsubscribe as no subscription exists for id: " + subscriptionID);
}
}
@@ -439,11 +439,11 @@ class StompProtocolManager implements ProtocolManager, NotificationListener
public void beginTransaction(StompConnection connection, String txID) throws Exception
{
- HornetQServerLogger.LOGGER.stompBeginTX(txID);
+ ActiveMQServerLogger.LOGGER.stompBeginTX(txID);
if (transactedSessions.containsKey(txID))
{
- HornetQServerLogger.LOGGER.stompErrorTXExists(txID);
- throw new HornetQStompException(connection, "Transaction already started: " + txID);
+ ActiveMQServerLogger.LOGGER.stompErrorTXExists(txID);
+ throw new ActiveMQStompException(connection, "Transaction already started: " + txID);
}
// create the transacted session
getTransactedSession(connection, txID);
@@ -469,7 +469,7 @@ class StompProtocolManager implements ProtocolManager, NotificationListener
{
if (!props.containsProperty(ManagementHelper.HDR_BINDING_TYPE))
{
- throw HornetQMessageBundle.BUNDLE.bindingTypeNotSpecified();
+ throw ActiveMQMessageBundle.BUNDLE.bindingTypeNotSpecified();
}
Integer bindingType = props.getIntProperty(ManagementHelper.HDR_BINDING_TYPE);
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompProtocolManagerFactory.java
----------------------------------------------------------------------
diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompProtocolManagerFactory.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompProtocolManagerFactory.java
index 60f5810..365a23c 100644
--- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompProtocolManagerFactory.java
+++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompProtocolManagerFactory.java
@@ -15,7 +15,7 @@ package org.apache.activemq.core.protocol.stomp;
import java.util.List;
import org.apache.activemq.api.core.Interceptor;
-import org.apache.activemq.core.server.HornetQServer;
+import org.apache.activemq.core.server.ActiveMQServer;
import org.apache.activemq.spi.core.protocol.ProtocolManager;
import org.apache.activemq.spi.core.protocol.ProtocolManagerFactory;
@@ -32,7 +32,7 @@ public class StompProtocolManagerFactory implements ProtocolManagerFactory
private static String[] SUPPORTED_PROTOCOLS = {STOMP_PROTOCOL_NAME};
- public ProtocolManager createProtocolManager(final HornetQServer server, final List<Interceptor> incomingInterceptors, List<Interceptor> outgoingInterceptors)
+ public ProtocolManager createProtocolManager(final ActiveMQServer server, final List<Interceptor> incomingInterceptors, List<Interceptor> outgoingInterceptors)
{
return new StompProtocolManager(server, incomingInterceptors);
}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompSession.java
----------------------------------------------------------------------
diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompSession.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompSession.java
index 30baf56..96fb75c 100644
--- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompSession.java
+++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/StompSession.java
@@ -41,7 +41,7 @@ import org.apache.activemq.spi.core.remoting.ReadyListener;
import org.apache.activemq.utils.ConfigurationHelper;
import org.apache.activemq.utils.UUIDGenerator;
-import static org.apache.activemq.core.protocol.stomp.HornetQStompProtocolMessageBundle.BUNDLE;
+import static org.apache.activemq.core.protocol.stomp.ActiveMQStompProtocolMessageBundle.BUNDLE;
/**
* A StompSession
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/VersionedStompFrameHandler.java
----------------------------------------------------------------------
diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/VersionedStompFrameHandler.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/VersionedStompFrameHandler.java
index 8057a18..1500ab5 100644
--- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/VersionedStompFrameHandler.java
+++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/VersionedStompFrameHandler.java
@@ -26,7 +26,7 @@ import org.apache.activemq.core.server.ServerMessage;
import org.apache.activemq.core.server.impl.ServerMessageImpl;
import org.apache.activemq.utils.DataConstants;
-import static org.apache.activemq.core.protocol.stomp.HornetQStompProtocolMessageBundle.BUNDLE;
+import static org.apache.activemq.core.protocol.stomp.ActiveMQStompProtocolMessageBundle.BUNDLE;
/**
* @author <a href="mailto:hgao@redhat.com">Howard Gao</a>
@@ -58,7 +58,7 @@ public abstract class VersionedStompFrameHandler
this.connection = connection;
}
- public StompFrame decode(ActiveMQBuffer buffer) throws HornetQStompException
+ public StompFrame decode(ActiveMQBuffer buffer) throws ActiveMQStompException
{
return decoder.decode(buffer);
}
@@ -157,7 +157,7 @@ public abstract class VersionedStompFrameHandler
public StompFrame onUnknown(String command)
{
- HornetQStompException error = BUNDLE.unknownCommand(command);
+ ActiveMQStompException error = BUNDLE.unknownCommand(command);
StompFrame response = error.getFrame();
return response;
}
@@ -177,7 +177,7 @@ public abstract class VersionedStompFrameHandler
String txID = request.getHeader(Stomp.Headers.TRANSACTION);
if (txID == null)
{
- HornetQStompException error = BUNDLE.needTxIDHeader();
+ ActiveMQStompException error = BUNDLE.needTxIDHeader();
response = error.getFrame();
return response;
}
@@ -186,7 +186,7 @@ public abstract class VersionedStompFrameHandler
{
connection.commitTransaction(txID);
}
- catch (HornetQStompException e)
+ catch (ActiveMQStompException e)
{
response = e.getFrame();
}
@@ -223,20 +223,20 @@ public abstract class VersionedStompFrameHandler
connection.sendServerMessage(message, txID);
}
- catch (HornetQStompException e)
+ catch (ActiveMQStompException e)
{
response = e.getFrame();
}
catch (Exception e)
{
- HornetQStompException error = BUNDLE.errorHandleSend(e);
+ ActiveMQStompException error = BUNDLE.errorHandleSend(e);
response = error.getFrame();
}
return response;
}
- private void checkDestination(String destination) throws HornetQStompException
+ private void checkDestination(String destination) throws ActiveMQStompException
{
connection.checkDestination(destination);
}
@@ -247,7 +247,7 @@ public abstract class VersionedStompFrameHandler
String txID = frame.getHeader(Stomp.Headers.TRANSACTION);
if (txID == null)
{
- HornetQStompException error = BUNDLE.beginTxNoID();
+ ActiveMQStompException error = BUNDLE.beginTxNoID();
response = error.getFrame();
}
else
@@ -256,7 +256,7 @@ public abstract class VersionedStompFrameHandler
{
connection.beginTransaction(txID);
}
- catch (HornetQStompException e)
+ catch (ActiveMQStompException e)
{
response = e.getFrame();
}
@@ -271,7 +271,7 @@ public abstract class VersionedStompFrameHandler
if (txID == null)
{
- HornetQStompException error = BUNDLE.abortTxNoID();
+ ActiveMQStompException error = BUNDLE.abortTxNoID();
response = error.getFrame();
return response;
}
@@ -280,7 +280,7 @@ public abstract class VersionedStompFrameHandler
{
connection.abortTransaction(txID);
}
- catch (HornetQStompException e)
+ catch (ActiveMQStompException e)
{
response = e.getFrame();
}
@@ -308,7 +308,7 @@ public abstract class VersionedStompFrameHandler
{
connection.subscribe(destination, selector, ack, id, durableSubscriptionName, noLocal);
}
- catch (HornetQStompException e)
+ catch (ActiveMQStompException e)
{
response = e.getFrame();
}
@@ -400,7 +400,7 @@ public abstract class VersionedStompFrameHandler
}
//sends an ERROR frame back to client if possible then close the connection
- public void onError(HornetQStompException e)
+ public void onError(ActiveMQStompException e)
{
this.connection.sendFrame(e.getFrame());
connection.destroy();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v10/StompFrameHandlerV10.java
----------------------------------------------------------------------
diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v10/StompFrameHandlerV10.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v10/StompFrameHandlerV10.java
index 6b20126..94395f7 100644
--- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v10/StompFrameHandlerV10.java
+++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v10/StompFrameHandlerV10.java
@@ -15,15 +15,15 @@ package org.apache.activemq.core.protocol.stomp.v10;
import java.util.Map;
import org.apache.activemq.core.protocol.stomp.FrameEventListener;
-import org.apache.activemq.core.protocol.stomp.HornetQStompException;
+import org.apache.activemq.core.protocol.stomp.ActiveMQStompException;
import org.apache.activemq.core.protocol.stomp.Stomp;
import org.apache.activemq.core.protocol.stomp.StompConnection;
import org.apache.activemq.core.protocol.stomp.StompDecoder;
import org.apache.activemq.core.protocol.stomp.StompFrame;
import org.apache.activemq.core.protocol.stomp.VersionedStompFrameHandler;
-import org.apache.activemq.core.server.HornetQServerLogger;
+import org.apache.activemq.core.server.ActiveMQServerLogger;
-import static org.apache.activemq.core.protocol.stomp.HornetQStompProtocolMessageBundle.BUNDLE;
+import static org.apache.activemq.core.protocol.stomp.ActiveMQStompProtocolMessageBundle.BUNDLE;
/**
*
@@ -101,7 +101,7 @@ public class StompFrameHandlerV10 extends VersionedStompFrameHandler implements
{
if (destination == null)
{
- HornetQStompException error = BUNDLE.needIDorDestination();
+ ActiveMQStompException error = BUNDLE.needIDorDestination();
response = error.getFrame();
return response;
}
@@ -112,7 +112,7 @@ public class StompFrameHandlerV10 extends VersionedStompFrameHandler implements
{
connection.unsubscribe(subscriptionID, durableSubscriberName);
}
- catch (HornetQStompException e)
+ catch (ActiveMQStompException e)
{
return e.getFrame();
}
@@ -129,14 +129,14 @@ public class StompFrameHandlerV10 extends VersionedStompFrameHandler implements
if (txID != null)
{
- HornetQServerLogger.LOGGER.stompTXAckNorSupported();
+ ActiveMQServerLogger.LOGGER.stompTXAckNorSupported();
}
try
{
connection.acknowledge(messageID, null);
}
- catch (HornetQStompException e)
+ catch (ActiveMQStompException e)
{
response = e.getFrame();
}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v11/StompFrameHandlerV11.java
----------------------------------------------------------------------
diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v11/StompFrameHandlerV11.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v11/StompFrameHandlerV11.java
index 9b6b108..bc77cb8 100644
--- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v11/StompFrameHandlerV11.java
+++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v11/StompFrameHandlerV11.java
@@ -15,17 +15,17 @@ package org.apache.activemq.core.protocol.stomp.v11;
import java.util.Map;
import java.util.concurrent.atomic.AtomicLong;
+import org.apache.activemq.core.protocol.stomp.ActiveMQStompException;
import org.apache.activemq.core.protocol.stomp.FrameEventListener;
-import org.apache.activemq.core.protocol.stomp.HornetQStompException;
import org.apache.activemq.core.protocol.stomp.SimpleBytes;
import org.apache.activemq.core.protocol.stomp.Stomp;
import org.apache.activemq.core.protocol.stomp.StompConnection;
import org.apache.activemq.core.protocol.stomp.StompDecoder;
import org.apache.activemq.core.protocol.stomp.StompFrame;
import org.apache.activemq.core.protocol.stomp.VersionedStompFrameHandler;
-import org.apache.activemq.core.server.HornetQServerLogger;
+import org.apache.activemq.core.server.ActiveMQServerLogger;
-import static org.apache.activemq.core.protocol.stomp.HornetQStompProtocolMessageBundle.BUNDLE;
+import static org.apache.activemq.core.protocol.stomp.ActiveMQStompProtocolMessageBundle.BUNDLE;
/**
* @author <a href="mailto:hgao@redhat.com">Howard Gao</a>
@@ -73,7 +73,7 @@ public class StompFrameHandlerV11 extends VersionedStompFrameHandler implements
// server
response.addHeader(Stomp.Headers.Connected.SERVER,
- connection.getHornetQServerName());
+ connection.getActiveMQServerName());
if (requestID != null)
{
@@ -107,7 +107,7 @@ public class StompFrameHandlerV11 extends VersionedStompFrameHandler implements
response.setBody("The login account is not valid.");
}
}
- catch (HornetQStompException e)
+ catch (ActiveMQStompException e)
{
response = e.getFrame();
}
@@ -117,12 +117,12 @@ public class StompFrameHandlerV11 extends VersionedStompFrameHandler implements
//ping parameters, hard-code for now
//the server can support min 20 milliseconds and receive ping at 100 milliseconds (20,100)
- private void handleHeartBeat(String heartBeatHeader) throws HornetQStompException
+ private void handleHeartBeat(String heartBeatHeader) throws ActiveMQStompException
{
String[] params = heartBeatHeader.split(",");
if (params.length != 2)
{
- throw new HornetQStompException("Incorrect heartbeat header " + heartBeatHeader);
+ throw new ActiveMQStompException("Incorrect heartbeat header " + heartBeatHeader);
}
//client ping
@@ -148,7 +148,7 @@ public class StompFrameHandlerV11 extends VersionedStompFrameHandler implements
}
catch (InterruptedException e)
{
- HornetQServerLogger.LOGGER.errorOnStompHeartBeat(e);
+ ActiveMQServerLogger.LOGGER.errorOnStompHeartBeat(e);
}
}
return null;
@@ -177,7 +177,7 @@ public class StompFrameHandlerV11 extends VersionedStompFrameHandler implements
{
connection.unsubscribe(subscriptionID, durableSubscriberName);
}
- catch (HornetQStompException e)
+ catch (ActiveMQStompException e)
{
response = e.getFrame();
}
@@ -195,7 +195,7 @@ public class StompFrameHandlerV11 extends VersionedStompFrameHandler implements
if (txID != null)
{
- HornetQServerLogger.LOGGER.stompTXAckNorSupported();
+ ActiveMQServerLogger.LOGGER.stompTXAckNorSupported();
}
if (subscriptionID == null)
@@ -208,7 +208,7 @@ public class StompFrameHandlerV11 extends VersionedStompFrameHandler implements
{
connection.acknowledge(messageID, subscriptionID);
}
- catch (HornetQStompException e)
+ catch (ActiveMQStompException e)
{
response = e.getFrame();
}
@@ -444,7 +444,7 @@ public class StompFrameHandlerV11 extends VersionedStompFrameHandler implements
}
@Override
- protected boolean parseCommand() throws HornetQStompException
+ protected boolean parseCommand() throws ActiveMQStompException
{
int offset = 0;
boolean nextChar = false;
@@ -692,7 +692,7 @@ public class StompFrameHandlerV11 extends VersionedStompFrameHandler implements
return true;
}
- protected void checkEol() throws HornetQStompException
+ protected void checkEol() throws ActiveMQStompException
{
if (workingBuffer[pos - 1] != NEW_LINE)
{
@@ -701,7 +701,7 @@ public class StompFrameHandlerV11 extends VersionedStompFrameHandler implements
}
@Override
- protected boolean parseHeaders() throws HornetQStompException
+ protected boolean parseHeaders() throws ActiveMQStompException
{
@@ -822,7 +822,7 @@ public class StompFrameHandlerV11 extends VersionedStompFrameHandler implements
return true;
}
- protected StompFrame parseBody() throws HornetQStompException
+ protected StompFrame parseBody() throws ActiveMQStompException
{
byte[] content = null;
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v11/StompFrameV11.java
----------------------------------------------------------------------
diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v11/StompFrameV11.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v11/StompFrameV11.java
index 2fef54e..f8d2654 100644
--- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v11/StompFrameV11.java
+++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v11/StompFrameV11.java
@@ -43,7 +43,7 @@ public class StompFrameV11 extends StompFrame
}
@Override
- public ActiveMQBuffer toHornetQBuffer() throws Exception
+ public ActiveMQBuffer toActiveMQBuffer() throws Exception
{
if (buffer == null)
{
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v12/StompFrameHandlerV12.java
----------------------------------------------------------------------
diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v12/StompFrameHandlerV12.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v12/StompFrameHandlerV12.java
index 5047b3d..79f7620 100644
--- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v12/StompFrameHandlerV12.java
+++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v12/StompFrameHandlerV12.java
@@ -13,7 +13,7 @@
package org.apache.activemq.core.protocol.stomp.v12;
import org.apache.activemq.core.protocol.stomp.FrameEventListener;
-import org.apache.activemq.core.protocol.stomp.HornetQStompException;
+import org.apache.activemq.core.protocol.stomp.ActiveMQStompException;
import org.apache.activemq.core.protocol.stomp.Stomp;
import org.apache.activemq.core.protocol.stomp.StompConnection;
import org.apache.activemq.core.protocol.stomp.StompDecoder;
@@ -21,10 +21,10 @@ import org.apache.activemq.core.protocol.stomp.StompFrame;
import org.apache.activemq.core.protocol.stomp.StompSubscription;
import org.apache.activemq.core.protocol.stomp.v11.StompFrameHandlerV11;
import org.apache.activemq.core.protocol.stomp.v11.StompFrameV11;
-import org.apache.activemq.core.server.HornetQServerLogger;
+import org.apache.activemq.core.server.ActiveMQServerLogger;
import org.apache.activemq.core.server.ServerMessage;
-import static org.apache.activemq.core.protocol.stomp.HornetQStompProtocolMessageBundle.BUNDLE;
+import static org.apache.activemq.core.protocol.stomp.ActiveMQStompProtocolMessageBundle.BUNDLE;
/**
* @author <a href="mailto:hgao@redhat.com">Howard Gao</a>
@@ -72,12 +72,12 @@ public class StompFrameHandlerV12 extends StompFrameHandlerV11 implements FrameE
if (txID != null)
{
- HornetQServerLogger.LOGGER.stompTXAckNorSupported();
+ ActiveMQServerLogger.LOGGER.stompTXAckNorSupported();
}
if (messageID == null)
{
- HornetQStompException error = BUNDLE.noIDInAck();
+ ActiveMQStompException error = BUNDLE.noIDInAck();
error.setHandler(connection.getFrameHandler());
return error.getFrame();
}
@@ -86,7 +86,7 @@ public class StompFrameHandlerV12 extends StompFrameHandlerV11 implements FrameE
{
connection.acknowledge(messageID, null);
}
- catch (HornetQStompException e)
+ catch (ActiveMQStompException e)
{
response = e.getFrame();
}
@@ -112,7 +112,7 @@ public class StompFrameHandlerV12 extends StompFrameHandlerV11 implements FrameE
}
@Override
- protected void checkEol() throws HornetQStompException
+ protected void checkEol() throws ActiveMQStompException
{
//either \n or \r\n
if (workingBuffer[pos - 2] == NEW_LINE)
@@ -139,7 +139,7 @@ public class StompFrameHandlerV12 extends StompFrameHandlerV11 implements FrameE
}
@Override
- protected boolean parseHeaders() throws HornetQStompException
+ protected boolean parseHeaders() throws ActiveMQStompException
{
outer:
while (true)
@@ -283,7 +283,7 @@ public class StompFrameHandlerV12 extends StompFrameHandlerV11 implements FrameE
return true;
}
- protected StompFrame parseBody() throws HornetQStompException
+ protected StompFrame parseBody() throws ActiveMQStompException
{
byte[] content = null;
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v12/StompFrameV12.java
----------------------------------------------------------------------
diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v12/StompFrameV12.java b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v12/StompFrameV12.java
index 6754232..617b2cf 100644
--- a/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v12/StompFrameV12.java
+++ b/activemq-protocols/activemq-stomp-protocol/src/main/java/org/apache/activemq/core/protocol/stomp/v12/StompFrameV12.java
@@ -43,7 +43,7 @@ public class StompFrameV12 extends StompFrame
}
@Override
- public ActiveMQBuffer toHornetQBuffer() throws Exception
+ public ActiveMQBuffer toActiveMQBuffer() throws Exception
{
if (buffer == null)
{
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-stomp-protocol/src/main/resources/META-INF/services/org.apache.activemq.spi.core.protocol.ProtocolManagerFactory
----------------------------------------------------------------------
diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/resources/META-INF/services/org.apache.activemq.spi.core.protocol.ProtocolManagerFactory b/activemq-protocols/activemq-stomp-protocol/src/main/resources/META-INF/services/org.apache.activemq.spi.core.protocol.ProtocolManagerFactory
new file mode 100644
index 0000000..7983da8
--- /dev/null
+++ b/activemq-protocols/activemq-stomp-protocol/src/main/resources/META-INF/services/org.apache.activemq.spi.core.protocol.ProtocolManagerFactory
@@ -0,0 +1 @@
+org.apache.activemq.core.protocol.stomp.StompProtocolManagerFactory
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/034adfbf/activemq-protocols/activemq-stomp-protocol/src/main/resources/META-INF/services/org.hornetq.spi.core.protocol.ProtocolManagerFactory
----------------------------------------------------------------------
diff --git a/activemq-protocols/activemq-stomp-protocol/src/main/resources/META-INF/services/org.hornetq.spi.core.protocol.ProtocolManagerFactory b/activemq-protocols/activemq-stomp-protocol/src/main/resources/META-INF/services/org.hornetq.spi.core.protocol.ProtocolManagerFactory
deleted file mode 100644
index 7983da8..0000000
--- a/activemq-protocols/activemq-stomp-protocol/src/main/resources/META-INF/services/org.hornetq.spi.core.protocol.ProtocolManagerFactory
+++ /dev/null
@@ -1 +0,0 @@
-org.apache.activemq.core.protocol.stomp.StompProtocolManagerFactory
\ No newline at end of file