http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ServerLocatorImpl.java ---------------------------------------------------------------------- diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ServerLocatorImpl.java b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ServerLocatorImpl.java index bd02f4d..e47ac01 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ServerLocatorImpl.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ServerLocatorImpl.java @@ -35,11 +35,11 @@ import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ThreadFactory; import java.util.concurrent.TimeUnit; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQExceptionType; +import org.apache.activemq.api.core.ActiveMQIllegalStateException; +import org.apache.activemq.api.core.ActiveMQInterruptedException; import org.apache.activemq.api.core.DiscoveryGroupConfiguration; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; -import org.apache.activemq.api.core.HornetQIllegalStateException; -import org.apache.activemq.api.core.HornetQInterruptedException; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.TransportConfiguration; @@ -234,7 +234,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } finally { @@ -254,7 +254,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } finally { @@ -357,14 +357,14 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery }); } - private synchronized void initialise() throws HornetQException + private synchronized void initialise() throws ActiveMQException { if (state == STATE.INITIALIZED) return; synchronized (stateGuard) { if (state == STATE.CLOSING) - throw new HornetQIllegalStateException(); + throw new ActiveMQIllegalStateException(); try { state = STATE.INITIALIZED; @@ -669,12 +669,12 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery } @Override - public ClientSessionFactoryInternal connect() throws HornetQException + public ClientSessionFactoryInternal connect() throws ActiveMQException { return connect(false); } - private ClientSessionFactoryInternal connect(final boolean skipWarnings) throws HornetQException + private ClientSessionFactoryInternal connect(final boolean skipWarnings) throws ActiveMQException { synchronized (this) { @@ -691,7 +691,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery } @Override - public ClientSessionFactoryInternal connectNoWarnings() throws HornetQException + public ClientSessionFactoryInternal connectNoWarnings() throws ActiveMQException { return connect(true); } @@ -767,7 +767,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery { factory.connect(reconnectAttempts, failoverOnInitialConnection); } - catch (HornetQException e1) + catch (ActiveMQException e1) { //we need to make sure is closed just for garbage collection factory.close(); @@ -810,7 +810,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery { factory.connect(reconnectAttempts, failoverOnInitialConnection); } - catch (HornetQException e1) + catch (ActiveMQException e1) { //we need to make sure is closed just for garbage collection factory.close(); @@ -842,7 +842,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery } } - public ClientSessionFactory createSessionFactory() throws HornetQException + public ClientSessionFactory createSessionFactory() throws ActiveMQException { assertOpen(); @@ -904,11 +904,11 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery removeFromConnecting(factory); } } - catch (HornetQException e) + catch (ActiveMQException e) { factory.close(); factory = null; - if (e.getType() == HornetQExceptionType.NOT_CONNECTED) + if (e.getType() == ActiveMQExceptionType.NOT_CONNECTED) { attempts++; @@ -947,7 +947,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } } @@ -1556,7 +1556,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } } @@ -1573,7 +1573,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } } } @@ -1755,7 +1755,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery { connect(); } - catch (HornetQException e) + catch (ActiveMQException e) { HornetQClientLogger.LOGGER.errorConnectingToNodes(e); } @@ -1860,7 +1860,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery private List<Connector> connectors; - public ClientSessionFactory connect(boolean skipWarnings) throws HornetQException + public ClientSessionFactory connect(boolean skipWarnings) throws ActiveMQException { assertOpen(); @@ -1893,9 +1893,9 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery // Case the node where the cluster connection was connected is gone, we need to restart the // connection @Override - public void connectionFailed(HornetQException exception, boolean failedOver) + public void connectionFailed(ActiveMQException exception, boolean failedOver) { - if (clusterConnection && exception.getType() == HornetQExceptionType.DISCONNECTED) + if (clusterConnection && exception.getType() == ActiveMQExceptionType.DISCONNECTED) { try { @@ -1910,7 +1910,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery } @Override - public void connectionFailed(final HornetQException me, boolean failedOver, String scaleDownTargetNodeID) + public void connectionFailed(final ActiveMQException me, boolean failedOver, String scaleDownTargetNodeID) { connectionFailed(me, failedOver); } @@ -2049,7 +2049,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery this.factory = factory; } - public ClientSessionFactory tryConnect() throws HornetQException + public ClientSessionFactory tryConnect() throws ActiveMQException { if (HornetQClientLogger.LOGGER.isDebugEnabled()) { @@ -2073,7 +2073,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery } return factoryToUse; } - catch (HornetQException e) + catch (ActiveMQException e) { HornetQClientLogger.LOGGER.debug(this + "::Exception on establish connector initial connection", e); return null;
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ServerLocatorInternal.java ---------------------------------------------------------------------- diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ServerLocatorInternal.java b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ServerLocatorInternal.java index dcdca02..7395e59 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ServerLocatorInternal.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/client/impl/ServerLocatorInternal.java @@ -14,7 +14,7 @@ package org.apache.activemq.core.client.impl; import java.util.concurrent.Executor; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.client.ClientSessionFactory; import org.apache.activemq.api.core.client.ServerLocator; @@ -52,13 +52,13 @@ public interface ServerLocatorInternal extends ServerLocator // Reset this Locator back as if it never received any topology void resetToInitialConnectors(); - ClientSessionFactoryInternal connect() throws HornetQException; + ClientSessionFactoryInternal connect() throws ActiveMQException; /** * Like {@link #connect()} but it does not log warnings if it fails to connect. - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ - ClientSessionFactoryInternal connectNoWarnings() throws HornetQException; + ClientSessionFactoryInternal connectNoWarnings() throws ActiveMQException; void notifyNodeUp(long uniqueEventID, String nodeID, String backupGroupName, String scaleDownGroupName, Pair<TransportConfiguration, TransportConfiguration> connectorPair, boolean last); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-core-client/src/main/java/org/apache/activemq/core/cluster/DiscoveryGroup.java ---------------------------------------------------------------------- diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/cluster/DiscoveryGroup.java b/activemq-core-client/src/main/java/org/apache/activemq/core/cluster/DiscoveryGroup.java index 30bed33..ce4dbd2 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/cluster/DiscoveryGroup.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/cluster/DiscoveryGroup.java @@ -19,11 +19,11 @@ import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffers; +import org.apache.activemq.api.core.ActiveMQInterruptedException; import org.apache.activemq.api.core.BroadcastEndpoint; import org.apache.activemq.api.core.BroadcastEndpointFactory; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; -import org.apache.activemq.api.core.HornetQInterruptedException; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.api.core.management.CoreNotificationType; @@ -161,7 +161,7 @@ public final class DiscoveryGroup implements HornetQComponent } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } thread = null; @@ -215,7 +215,7 @@ public final class DiscoveryGroup implements HornetQComponent } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } if (timeout != 0) @@ -295,7 +295,7 @@ public final class DiscoveryGroup implements HornetQComponent } } - HornetQBuffer buffer = HornetQBuffers.wrappedBuffer(data); + ActiveMQBuffer buffer = ActiveMQBuffers.wrappedBuffer(data); String originatingNodeID = buffer.readString(); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-core-client/src/main/java/org/apache/activemq/core/message/BodyEncoder.java ---------------------------------------------------------------------- diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/message/BodyEncoder.java b/activemq-core-client/src/main/java/org/apache/activemq/core/message/BodyEncoder.java index c3f4402..609386e 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/message/BodyEncoder.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/message/BodyEncoder.java @@ -14,8 +14,8 @@ package org.apache.activemq.core.message; import java.nio.ByteBuffer; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQException; /** * Class used to encode message body into buffers. @@ -30,22 +30,22 @@ public interface BodyEncoder /** * This method must not be called directly by HornetQ clients. */ - void open() throws HornetQException; + void open() throws ActiveMQException; /** * This method must not be called directly by HornetQ clients. */ - void close() throws HornetQException; + void close() throws ActiveMQException; /** * This method must not be called directly by HornetQ clients. */ - int encode(ByteBuffer bufferRead) throws HornetQException; + int encode(ByteBuffer bufferRead) throws ActiveMQException; /** * This method must not be called directly by HornetQ clients. */ - int encode(HornetQBuffer bufferOut, int size) throws HornetQException; + int encode(ActiveMQBuffer bufferOut, int size) throws ActiveMQException; /** * This method must not be called directly by HornetQ clients. http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-core-client/src/main/java/org/apache/activemq/core/message/impl/MessageImpl.java ---------------------------------------------------------------------- diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/message/impl/MessageImpl.java b/activemq-core-client/src/main/java/org/apache/activemq/core/message/impl/MessageImpl.java index 1c76af9..8d4f3d7 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/message/impl/MessageImpl.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/message/impl/MessageImpl.java @@ -17,10 +17,10 @@ import java.util.HashMap; import java.util.Map; import java.util.Set; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQBuffers; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQPropertyConversionException; +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.ActiveMQPropertyConversionException; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.buffers.impl.ResetLimitWrappedHornetQBuffer; @@ -76,7 +76,7 @@ public abstract class MessageImpl implements MessageInternal protected byte priority; - protected HornetQBuffer buffer; + protected ActiveMQBuffer buffer; protected ResetLimitWrappedHornetQBuffer bodyBuffer; @@ -205,7 +205,7 @@ public abstract class MessageImpl implements MessageInternal } - public void encodeHeadersAndProperties(final HornetQBuffer buffer) + public void encodeHeadersAndProperties(final ActiveMQBuffer buffer) { buffer.writeLong(messageID); buffer.writeNullableSimpleString(address); @@ -226,7 +226,7 @@ public abstract class MessageImpl implements MessageInternal properties.encode(buffer); } - public void decodeHeadersAndProperties(final HornetQBuffer buffer) + public void decodeHeadersAndProperties(final ActiveMQBuffer buffer) { messageID = buffer.readLong(); address = buffer.readNullableSimpleString(); @@ -261,7 +261,7 @@ public abstract class MessageImpl implements MessageInternal properties = msg.getTypedProperties(); } - public HornetQBuffer getBodyBuffer() + public ActiveMQBuffer getBodyBuffer() { if (bodyBuffer == null) { @@ -285,17 +285,17 @@ public abstract class MessageImpl implements MessageInternal return this; } - public void checkCompletion() throws HornetQException + public void checkCompletion() throws ActiveMQException { // no op on regular messages } - public synchronized HornetQBuffer getBodyBufferCopy() + public synchronized ActiveMQBuffer getBodyBufferCopy() { // Must copy buffer before sending it - HornetQBuffer newBuffer = buffer.copy(0, buffer.capacity()); + ActiveMQBuffer newBuffer = buffer.copy(0, buffer.capacity()); newBuffer.setIndex(0, getEndOfBodyPosition()); @@ -454,7 +454,7 @@ public abstract class MessageImpl implements MessageInternal return map; } - public void decodeFromBuffer(final HornetQBuffer buffer) + public void decodeFromBuffer(final ActiveMQBuffer buffer) { this.buffer = buffer; @@ -502,7 +502,7 @@ public abstract class MessageImpl implements MessageInternal } // Encode to journal or paging - public void encode(final HornetQBuffer buff) + public void encode(final ActiveMQBuffer buff) { encodeToBuffer(); @@ -510,7 +510,7 @@ public abstract class MessageImpl implements MessageInternal } // Decode from journal or paging - public void decode(final HornetQBuffer buff) + public void decode(final ActiveMQBuffer buff) { int start = buff.readerIndex(); @@ -529,13 +529,13 @@ public abstract class MessageImpl implements MessageInternal buff.readerIndex(start + length); } - public synchronized HornetQBuffer getEncodedBuffer() + public synchronized ActiveMQBuffer getEncodedBuffer() { - HornetQBuffer buff = encodeToBuffer(); + ActiveMQBuffer buff = encodeToBuffer(); if (bufferUsed) { - HornetQBuffer copied = buff.copy(0, buff.capacity()); + ActiveMQBuffer copied = buff.copy(0, buff.capacity()); copied.setIndex(0, endOfMessagePosition); @@ -656,7 +656,7 @@ public abstract class MessageImpl implements MessageInternal return this; } - public Message putObjectProperty(final SimpleString key, final Object value) throws HornetQPropertyConversionException + public Message putObjectProperty(final SimpleString key, final Object value) throws ActiveMQPropertyConversionException { TypedProperties.setObjectProperty(key, value, properties); bufferValid = false; @@ -664,7 +664,7 @@ public abstract class MessageImpl implements MessageInternal return this; } - public Message putObjectProperty(final String key, final Object value) throws HornetQPropertyConversionException + public Message putObjectProperty(final String key, final Object value) throws ActiveMQPropertyConversionException { putObjectProperty(new SimpleString(key), value); @@ -768,87 +768,87 @@ public abstract class MessageImpl implements MessageInternal return properties.getProperty(key); } - public Boolean getBooleanProperty(final SimpleString key) throws HornetQPropertyConversionException + public Boolean getBooleanProperty(final SimpleString key) throws ActiveMQPropertyConversionException { return properties.getBooleanProperty(key); } - public Boolean getBooleanProperty(final String key) throws HornetQPropertyConversionException + public Boolean getBooleanProperty(final String key) throws ActiveMQPropertyConversionException { return properties.getBooleanProperty(new SimpleString(key)); } - public Byte getByteProperty(final SimpleString key) throws HornetQPropertyConversionException + public Byte getByteProperty(final SimpleString key) throws ActiveMQPropertyConversionException { return properties.getByteProperty(key); } - public Byte getByteProperty(final String key) throws HornetQPropertyConversionException + public Byte getByteProperty(final String key) throws ActiveMQPropertyConversionException { return properties.getByteProperty(new SimpleString(key)); } - public byte[] getBytesProperty(final SimpleString key) throws HornetQPropertyConversionException + public byte[] getBytesProperty(final SimpleString key) throws ActiveMQPropertyConversionException { return properties.getBytesProperty(key); } - public byte[] getBytesProperty(final String key) throws HornetQPropertyConversionException + public byte[] getBytesProperty(final String key) throws ActiveMQPropertyConversionException { return getBytesProperty(new SimpleString(key)); } - public Double getDoubleProperty(final SimpleString key) throws HornetQPropertyConversionException + public Double getDoubleProperty(final SimpleString key) throws ActiveMQPropertyConversionException { return properties.getDoubleProperty(key); } - public Double getDoubleProperty(final String key) throws HornetQPropertyConversionException + public Double getDoubleProperty(final String key) throws ActiveMQPropertyConversionException { return properties.getDoubleProperty(new SimpleString(key)); } - public Integer getIntProperty(final SimpleString key) throws HornetQPropertyConversionException + public Integer getIntProperty(final SimpleString key) throws ActiveMQPropertyConversionException { return properties.getIntProperty(key); } - public Integer getIntProperty(final String key) throws HornetQPropertyConversionException + public Integer getIntProperty(final String key) throws ActiveMQPropertyConversionException { return properties.getIntProperty(new SimpleString(key)); } - public Long getLongProperty(final SimpleString key) throws HornetQPropertyConversionException + public Long getLongProperty(final SimpleString key) throws ActiveMQPropertyConversionException { return properties.getLongProperty(key); } - public Long getLongProperty(final String key) throws HornetQPropertyConversionException + public Long getLongProperty(final String key) throws ActiveMQPropertyConversionException { return properties.getLongProperty(new SimpleString(key)); } - public Short getShortProperty(final SimpleString key) throws HornetQPropertyConversionException + public Short getShortProperty(final SimpleString key) throws ActiveMQPropertyConversionException { return properties.getShortProperty(key); } - public Short getShortProperty(final String key) throws HornetQPropertyConversionException + public Short getShortProperty(final String key) throws ActiveMQPropertyConversionException { return properties.getShortProperty(new SimpleString(key)); } - public Float getFloatProperty(final SimpleString key) throws HornetQPropertyConversionException + public Float getFloatProperty(final SimpleString key) throws ActiveMQPropertyConversionException { return properties.getFloatProperty(key); } - public Float getFloatProperty(final String key) throws HornetQPropertyConversionException + public Float getFloatProperty(final String key) throws ActiveMQPropertyConversionException { return properties.getFloatProperty(new SimpleString(key)); } - public String getStringProperty(final SimpleString key) throws HornetQPropertyConversionException + public String getStringProperty(final SimpleString key) throws ActiveMQPropertyConversionException { SimpleString str = getSimpleStringProperty(key); @@ -862,17 +862,17 @@ public abstract class MessageImpl implements MessageInternal } } - public String getStringProperty(final String key) throws HornetQPropertyConversionException + public String getStringProperty(final String key) throws ActiveMQPropertyConversionException { return getStringProperty(new SimpleString(key)); } - public SimpleString getSimpleStringProperty(final SimpleString key) throws HornetQPropertyConversionException + public SimpleString getSimpleStringProperty(final SimpleString key) throws ActiveMQPropertyConversionException { return properties.getSimpleStringProperty(key); } - public SimpleString getSimpleStringProperty(final String key) throws HornetQPropertyConversionException + public SimpleString getSimpleStringProperty(final String key) throws ActiveMQPropertyConversionException { return properties.getSimpleStringProperty(new SimpleString(key)); } @@ -911,12 +911,12 @@ public abstract class MessageImpl implements MessageInternal return properties.getPropertyNames(); } - public HornetQBuffer getWholeBuffer() + public ActiveMQBuffer getWholeBuffer() { return buffer; } - public BodyEncoder getBodyEncoder() throws HornetQException + public BodyEncoder getBodyEncoder() throws ActiveMQException { return new DecodingContext(); } @@ -1001,7 +1001,7 @@ public abstract class MessageImpl implements MessageInternal // This must be synchronized as it can be called concurrently id the message is being delivered // concurrently to // many queues - the first caller in this case will actually encode it - private synchronized HornetQBuffer encodeToBuffer() + private synchronized ActiveMQBuffer encodeToBuffer() { if (!bufferValid) { @@ -1062,7 +1062,7 @@ public abstract class MessageImpl implements MessageInternal public void createBody(final int initialMessageBufferSize) { - buffer = HornetQBuffers.dynamicBuffer(initialMessageBufferSize); + buffer = ActiveMQBuffers.dynamicBuffer(initialMessageBufferSize); // There's a bug in netty which means a dynamic buffer won't resize until you write a byte buffer.writeByte((byte) 0); @@ -1109,13 +1109,13 @@ public abstract class MessageImpl implements MessageInternal return buffer.writerIndex(); } - public int encode(final ByteBuffer bufferRead) throws HornetQException + public int encode(final ByteBuffer bufferRead) throws ActiveMQException { - HornetQBuffer buffer = HornetQBuffers.wrappedBuffer(bufferRead); + ActiveMQBuffer buffer = ActiveMQBuffers.wrappedBuffer(bufferRead); return encode(buffer, bufferRead.capacity()); } - public int encode(final HornetQBuffer bufferOut, final int size) + public int encode(final ActiveMQBuffer bufferOut, final int size) { bufferOut.writeBytes(getWholeBuffer(), lastPos, size); lastPos += size; http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-core-client/src/main/java/org/apache/activemq/core/message/impl/MessageInternal.java ---------------------------------------------------------------------- diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/message/impl/MessageInternal.java b/activemq-core-client/src/main/java/org/apache/activemq/core/message/impl/MessageInternal.java index 9210173..78fad27 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/message/impl/MessageInternal.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/message/impl/MessageInternal.java @@ -14,8 +14,8 @@ package org.apache.activemq.core.message.impl; import java.io.InputStream; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.message.BodyEncoder; @@ -30,7 +30,7 @@ import org.apache.activemq.utils.TypedProperties; */ public interface MessageInternal extends Message { - void decodeFromBuffer(HornetQBuffer buffer); + void decodeFromBuffer(ActiveMQBuffer buffer); int getEndOfMessagePosition(); @@ -44,17 +44,17 @@ public interface MessageInternal extends Message boolean isServerMessage(); - HornetQBuffer getEncodedBuffer(); + ActiveMQBuffer getEncodedBuffer(); int getHeadersAndPropertiesEncodeSize(); - HornetQBuffer getWholeBuffer(); + ActiveMQBuffer getWholeBuffer(); - void encodeHeadersAndProperties(HornetQBuffer buffer); + void encodeHeadersAndProperties(ActiveMQBuffer buffer); - void decodeHeadersAndProperties(HornetQBuffer buffer); + void decodeHeadersAndProperties(ActiveMQBuffer buffer); - BodyEncoder getBodyEncoder() throws HornetQException; + BodyEncoder getBodyEncoder() throws ActiveMQException; InputStream getBodyInputStream(); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/ClientPacketDecoder.java ---------------------------------------------------------------------- diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/ClientPacketDecoder.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/ClientPacketDecoder.java index 2029246..4cd45d1 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/ClientPacketDecoder.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/ClientPacketDecoder.java @@ -16,7 +16,7 @@ package org.apache.activemq.core.protocol; import static org.apache.activemq.core.protocol.core.impl.PacketImpl.SESS_RECEIVE_LARGE_MSG; import static org.apache.activemq.core.protocol.core.impl.PacketImpl.SESS_RECEIVE_MSG; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.client.impl.ClientLargeMessageImpl; import org.apache.activemq.core.client.impl.ClientMessageImpl; import org.apache.activemq.core.protocol.core.Packet; @@ -33,7 +33,7 @@ public class ClientPacketDecoder extends PacketDecoder public static final ClientPacketDecoder INSTANCE = new ClientPacketDecoder(); @Override - public Packet decode(final HornetQBuffer in) + public Packet decode(final ActiveMQBuffer in) { final byte packetType = in.readByte(); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/Channel.java ---------------------------------------------------------------------- diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/Channel.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/Channel.java index b5a310f..9f87203 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/Channel.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/Channel.java @@ -14,7 +14,7 @@ package org.apache.activemq.core.protocol.core; import java.util.concurrent.locks.Lock; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQException; /** * A channel is a way of interleaving data meant for different endpoints over the same {@link org.apache.activemq.core.protocol.core.CoreRemotingConnection}. @@ -69,9 +69,9 @@ public interface Channel * @param packet the packet to send * @param expectedPacket the packet being expected. * @return the response - * @throws HornetQException if an error occurs during the send + * @throws org.apache.activemq.api.core.ActiveMQException if an error occurs during the send */ - Packet sendBlocking(Packet packet, byte expectedPacket) throws HornetQException; + Packet sendBlocking(Packet packet, byte expectedPacket) throws ActiveMQException; /** * Sets the {@link org.apache.activemq.core.protocol.core.ChannelHandler} that this channel should http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/Packet.java ---------------------------------------------------------------------- diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/Packet.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/Packet.java index e4cb414..3143c62 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/Packet.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/Packet.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.spi.core.protocol.RemotingConnection; /** @@ -54,19 +54,19 @@ public interface Packet byte getType(); /** - * Encodes the packet and returns a {@link org.apache.activemq.api.core.HornetQBuffer} containing the data + * Encodes the packet and returns a {@link org.apache.activemq.api.core.ActiveMQBuffer} containing the data * * @param connection the connection * @return the buffer to encode to */ - HornetQBuffer encode(RemotingConnection connection); + ActiveMQBuffer encode(RemotingConnection connection); /** * decodes the buffer into this packet * * @param buffer the buffer to decode from */ - void decode(HornetQBuffer buffer); + void decode(ActiveMQBuffer buffer); /** * returns the size needed to encode this packet. http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/ChannelImpl.java ---------------------------------------------------------------------- diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/ChannelImpl.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/ChannelImpl.java index 7021acd..c5709b4 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/ChannelImpl.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/ChannelImpl.java @@ -21,9 +21,9 @@ import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQInterruptedException; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQInterruptedException; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.core.client.HornetQClientLogger; import org.apache.activemq.core.client.HornetQClientMessageBundle; @@ -240,7 +240,7 @@ public final class ChannelImpl implements Channel HornetQClientLogger.LOGGER.trace("Sending packet nonblocking " + packet + " on channeID=" + id); } - HornetQBuffer buffer = packet.encode(connection); + ActiveMQBuffer buffer = packet.encode(connection); lock.lock(); @@ -255,7 +255,7 @@ public final class ChannelImpl implements Channel } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } } @@ -294,7 +294,7 @@ public final class ChannelImpl implements Channel * and the client could eventually retry another call, but the server could then answer a previous command issuing a class-cast-exception. * The expectedPacket will be used to filter out undesirable packets that would belong to previous calls. */ - public Packet sendBlocking(final Packet packet, byte expectedPacket) throws HornetQException + public Packet sendBlocking(final Packet packet, byte expectedPacket) throws ActiveMQException { String interceptionResult = invokeInterceptors(packet, interceptors, connection); @@ -320,7 +320,7 @@ public final class ChannelImpl implements Channel { packet.setChannelID(id); - final HornetQBuffer buffer = packet.encode(connection); + final ActiveMQBuffer buffer = packet.encode(connection); lock.lock(); @@ -347,7 +347,7 @@ public final class ChannelImpl implements Channel } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } } @@ -373,7 +373,7 @@ public final class ChannelImpl implements Channel } catch (InterruptedException e) { - throw new HornetQInterruptedException(e); + throw new ActiveMQInterruptedException(e); } if (response != null && response.getType() != PacketImpl.EXCEPTION && response.getType() != expectedPacket) @@ -402,7 +402,7 @@ public final class ChannelImpl implements Channel { final HornetQExceptionMessage mem = (HornetQExceptionMessage) response; - HornetQException e = mem.getException(); + ActiveMQException e = mem.getException(); e.fillInStackTrace(); @@ -653,7 +653,7 @@ public final class ChannelImpl implements Channel private void doWrite(final Packet packet) { - final HornetQBuffer buffer = packet.encode(connection); + final ActiveMQBuffer buffer = packet.encode(connection); connection.getTransportConnection().write(buffer, false, false); } http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/HornetQClientProtocolManager.java ---------------------------------------------------------------------- diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/HornetQClientProtocolManager.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/HornetQClientProtocolManager.java index f47078c..c98db97 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/HornetQClientProtocolManager.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/HornetQClientProtocolManager.java @@ -19,10 +19,10 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.Lock; import io.netty.channel.ChannelPipeline; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; -import org.apache.activemq.api.core.HornetQInterruptedException; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQExceptionType; +import org.apache.activemq.api.core.ActiveMQInterruptedException; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.SimpleString; @@ -250,7 +250,7 @@ public class HornetQClientProtocolManager implements ClientProtocolManager @Override public SessionContext createSessionContext(String name, String username, String password, boolean xa, boolean autoCommitSends, boolean autoCommitAcks, - boolean preAcknowledge, int minLargeMessageSize, int confirmationWindowSize) throws HornetQException + boolean preAcknowledge, int minLargeMessageSize, int confirmationWindowSize) throws ActiveMQException { for (Version clientVersion : VersionLoader.getClientVersions()) { @@ -267,21 +267,21 @@ public class HornetQClientProtocolManager implements ClientProtocolManager minLargeMessageSize, confirmationWindowSize); } - catch (HornetQException e) + catch (ActiveMQException e) { - if (e.getType() != HornetQExceptionType.INCOMPATIBLE_CLIENT_SERVER_VERSIONS) + if (e.getType() != ActiveMQExceptionType.INCOMPATIBLE_CLIENT_SERVER_VERSIONS) { throw e; } } } connection.destroy(); - throw new HornetQException(HornetQExceptionType.INCOMPATIBLE_CLIENT_SERVER_VERSIONS); + throw new ActiveMQException(ActiveMQExceptionType.INCOMPATIBLE_CLIENT_SERVER_VERSIONS); } public SessionContext createSessionContext(Version clientVersion, String name, String username, String password, boolean xa, boolean autoCommitSends, boolean autoCommitAcks, - boolean preAcknowledge, int minLargeMessageSize, int confirmationWindowSize) throws HornetQException + boolean preAcknowledge, int minLargeMessageSize, int confirmationWindowSize) throws ActiveMQException { if (!isAlive()) throw HornetQClientMessageBundle.BUNDLE.clientSessionClosed(); @@ -331,12 +331,12 @@ public class HornetQClientProtocolManager implements ClientProtocolManager // channel1 reference here has to go away response = (CreateSessionResponseMessage) getChannel1().sendBlocking(request, PacketImpl.CREATESESSION_RESP); } - catch (HornetQException cause) + catch (ActiveMQException cause) { if (!isAlive()) throw cause; - if (cause.getType() == HornetQExceptionType.UNBLOCKED) + if (cause.getType() == ActiveMQExceptionType.UNBLOCKED) { // This means the thread was blocked on create session and failover unblocked it // so failover could occur @@ -363,9 +363,9 @@ public class HornetQClientProtocolManager implements ClientProtocolManager lock = null; } - if (t instanceof HornetQException) + if (t instanceof ActiveMQException) { - throw (HornetQException) t; + throw (ActiveMQException) t; } else { @@ -392,7 +392,7 @@ public class HornetQClientProtocolManager implements ClientProtocolManager } - public boolean cleanupBeforeFailover(HornetQException cause) + public boolean cleanupBeforeFailover(ActiveMQException cause) { boolean needToInterrupt; @@ -437,7 +437,7 @@ public class HornetQClientProtocolManager implements ClientProtocolManager } catch (InterruptedException e1) { - throw new HornetQInterruptedException(e1); + throw new ActiveMQInterruptedException(e1); } } } @@ -446,7 +446,7 @@ public class HornetQClientProtocolManager implements ClientProtocolManager } @Override - public boolean checkForFailover(String liveNodeID) throws HornetQException + public boolean checkForFailover(String liveNodeID) throws ActiveMQException { CheckFailoverMessage packet = new CheckFailoverMessage(liveNodeID); CheckFailoverReplyMessage message = (CheckFailoverReplyMessage) getChannel1().sendBlocking(packet, @@ -479,7 +479,7 @@ public class HornetQClientProtocolManager implements ClientProtocolManager { // no need to send handshake on inVM as inVM is not using the NettyProtocolHandling String handshake = "HORNETQ"; - HornetQBuffer hqbuffer = connection.createBuffer(handshake.length()); + ActiveMQBuffer hqbuffer = connection.createBuffer(handshake.length()); hqbuffer.writeBytes(handshake.getBytes()); transportConnection.write(hqbuffer); } @@ -598,7 +598,7 @@ public class HornetQClientProtocolManager implements ClientProtocolManager return ClientPacketDecoder.INSTANCE; } - private void forceReturnChannel1(HornetQException cause) + private void forceReturnChannel1(ActiveMQException cause) { if (connection != null) { http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/HornetQSessionContext.java ---------------------------------------------------------------------- diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/HornetQSessionContext.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/HornetQSessionContext.java index 2cc14ee..5589402 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/HornetQSessionContext.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/HornetQSessionContext.java @@ -23,9 +23,9 @@ import java.util.List; import java.util.Map; import java.util.concurrent.Executor; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; -import org.apache.activemq.api.core.HornetQExceptionType; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQException; +import org.apache.activemq.api.core.ActiveMQExceptionType; import org.apache.activemq.api.core.Message; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.api.core.client.ClientConsumer; @@ -172,7 +172,7 @@ public class HornetQSessionContext extends SessionContext // Failover utility methods @Override - public void returnBlocking(HornetQException cause) + public void returnBlocking(ActiveMQException cause) { sessionChannel.returnBlocking(cause); } @@ -215,17 +215,17 @@ public class HornetQSessionContext extends SessionContext public void createSharedQueue(SimpleString address, SimpleString queueName, SimpleString filterString, - boolean durable) throws HornetQException + boolean durable) throws ActiveMQException { sessionChannel.sendBlocking(new CreateSharedQueueMessage(address, queueName, filterString, durable, true), PacketImpl.NULL_RESPONSE); } - public void deleteQueue(final SimpleString queueName) throws HornetQException + public void deleteQueue(final SimpleString queueName) throws ActiveMQException { sessionChannel.sendBlocking(new SessionDeleteQueueMessage(queueName), PacketImpl.NULL_RESPONSE); } - public ClientSession.QueueQuery queueQuery(final SimpleString queueName) throws HornetQException + public ClientSession.QueueQuery queueQuery(final SimpleString queueName) throws ActiveMQException { SessionQueueQueryMessage request = new SessionQueueQueryMessage(queueName); SessionQueueQueryResponseMessage response = (SessionQueueQueryResponseMessage) sessionChannel.sendBlocking(request, PacketImpl.SESS_QUEUEQUERY_RESP); @@ -237,7 +237,7 @@ public class HornetQSessionContext extends SessionContext public ClientConsumerInternal createConsumer(SimpleString queueName, SimpleString filterString, int windowSize, int maxRate, int ackBatchSize, boolean browseOnly, - Executor executor, Executor flowControlExecutor) throws HornetQException + Executor executor, Executor flowControlExecutor) throws ActiveMQException { long consumerID = idGenerator.generateID(); @@ -278,7 +278,7 @@ public class HornetQSessionContext extends SessionContext return serverVersion; } - public ClientSession.AddressQuery addressQuery(final SimpleString address) throws HornetQException + public ClientSession.AddressQuery addressQuery(final SimpleString address) throws ActiveMQException { SessionBindingQueryResponseMessage response = (SessionBindingQueryResponseMessage) sessionChannel.sendBlocking(new SessionBindingQueryMessage(address), PacketImpl.SESS_BINDINGQUERY_RESP); @@ -288,7 +288,7 @@ public class HornetQSessionContext extends SessionContext @Override - public void closeConsumer(final ClientConsumer consumer) throws HornetQException + public void closeConsumer(final ClientConsumer consumer) throws ActiveMQException { sessionChannel.sendBlocking(new SessionConsumerCloseMessage(getConsumerID(consumer)), PacketImpl.NULL_RESPONSE); } @@ -298,44 +298,44 @@ public class HornetQSessionContext extends SessionContext sessionChannel.send(new SessionConsumerFlowCreditMessage(getConsumerID(consumer), credits)); } - public void forceDelivery(final ClientConsumer consumer, final long sequence) throws HornetQException + public void forceDelivery(final ClientConsumer consumer, final long sequence) throws ActiveMQException { SessionForceConsumerDelivery request = new SessionForceConsumerDelivery(getConsumerID(consumer), sequence); sessionChannel.send(request); } - public void simpleCommit() throws HornetQException + public void simpleCommit() throws ActiveMQException { sessionChannel.sendBlocking(new PacketImpl(PacketImpl.SESS_COMMIT), PacketImpl.NULL_RESPONSE); } - public void simpleRollback(boolean lastMessageAsDelivered) throws HornetQException + public void simpleRollback(boolean lastMessageAsDelivered) throws ActiveMQException { sessionChannel.sendBlocking(new RollbackMessage(lastMessageAsDelivered), PacketImpl.NULL_RESPONSE); } - public void sessionStart() throws HornetQException + public void sessionStart() throws ActiveMQException { sessionChannel.send(new PacketImpl(PacketImpl.SESS_START)); } - public void sessionStop() throws HornetQException + public void sessionStop() throws ActiveMQException { sessionChannel.sendBlocking(new PacketImpl(PacketImpl.SESS_STOP), PacketImpl.NULL_RESPONSE); } - public void addSessionMetadata(String key, String data) throws HornetQException + public void addSessionMetadata(String key, String data) throws ActiveMQException { sessionChannel.sendBlocking(new SessionAddMetaDataMessageV2(key, data), PacketImpl.NULL_RESPONSE); } - public void addUniqueMetaData(String key, String data) throws HornetQException + public void addUniqueMetaData(String key, String data) throws ActiveMQException { sessionChannel.sendBlocking(new SessionUniqueAddMetaDataMessage(key, data), PacketImpl.NULL_RESPONSE); } - public void xaCommit(Xid xid, boolean onePhase) throws XAException, HornetQException + public void xaCommit(Xid xid, boolean onePhase) throws XAException, ActiveMQException { SessionXACommitMessage packet = new SessionXACommitMessage(xid, onePhase); SessionXAResponseMessage response = (SessionXAResponseMessage) sessionChannel.sendBlocking(packet, PacketImpl.SESS_XA_RESP); @@ -351,7 +351,7 @@ public class HornetQSessionContext extends SessionContext } } - public void xaEnd(Xid xid, int flags) throws XAException, HornetQException + public void xaEnd(Xid xid, int flags) throws XAException, ActiveMQException { Packet packet; if (flags == XAResource.TMSUSPEND) @@ -401,7 +401,7 @@ public class HornetQSessionContext extends SessionContext return msgI.getEncodeSize(); } - public void sendFullMessage(MessageInternal msgI, boolean sendBlocking, SendAcknowledgementHandler handler, SimpleString defaultAddress) throws HornetQException + public void sendFullMessage(MessageInternal msgI, boolean sendBlocking, SendAcknowledgementHandler handler, SimpleString defaultAddress) throws ActiveMQException { SessionSendMessage packet = new SessionSendMessage(msgI, sendBlocking, handler); @@ -416,7 +416,7 @@ public class HornetQSessionContext extends SessionContext } @Override - public int sendInitialChunkOnLargeMessage(MessageInternal msgI) throws HornetQException + public int sendInitialChunkOnLargeMessage(MessageInternal msgI) throws ActiveMQException { SessionSendLargeMessage initialChunk = new SessionSendLargeMessage(msgI); @@ -426,7 +426,7 @@ public class HornetQSessionContext extends SessionContext } @Override - public int sendLargeMessageChunk(MessageInternal msgI, long messageBodySize, boolean sendBlocking, boolean lastChunk, byte[] chunk, SendAcknowledgementHandler messageHandler) throws HornetQException + public int sendLargeMessageChunk(MessageInternal msgI, long messageBodySize, boolean sendBlocking, boolean lastChunk, byte[] chunk, SendAcknowledgementHandler messageHandler) throws ActiveMQException { final boolean requiresResponse = lastChunk && sendBlocking; final SessionSendContinuationMessage chunkPacket = @@ -446,7 +446,7 @@ public class HornetQSessionContext extends SessionContext return chunkPacket.getPacketSize(); } - public void sendACK(boolean individual, boolean block, final ClientConsumer consumer, final Message message) throws HornetQException + public void sendACK(boolean individual, boolean block, final ClientConsumer consumer, final Message message) throws ActiveMQException { PacketImpl messagePacket; if (individual) @@ -468,7 +468,7 @@ public class HornetQSessionContext extends SessionContext } } - public void expireMessage(final ClientConsumer consumer, Message message) throws HornetQException + public void expireMessage(final ClientConsumer consumer, Message message) throws ActiveMQException { SessionExpireMessage messagePacket = new SessionExpireMessage(getConsumerID(consumer), message.getMessageID()); @@ -476,12 +476,12 @@ public class HornetQSessionContext extends SessionContext } - public void sessionClose() throws HornetQException + public void sessionClose() throws ActiveMQException { sessionChannel.sendBlocking(new SessionCloseMessage(), PacketImpl.NULL_RESPONSE); } - public void xaForget(Xid xid) throws XAException, HornetQException + public void xaForget(Xid xid) throws XAException, ActiveMQException { SessionXAResponseMessage response = (SessionXAResponseMessage) sessionChannel.sendBlocking(new SessionXAForgetMessage(xid), PacketImpl.SESS_XA_RESP); @@ -491,7 +491,7 @@ public class HornetQSessionContext extends SessionContext } } - public int xaPrepare(Xid xid) throws XAException, HornetQException + public int xaPrepare(Xid xid) throws XAException, ActiveMQException { SessionXAPrepareMessage packet = new SessionXAPrepareMessage(xid); @@ -507,7 +507,7 @@ public class HornetQSessionContext extends SessionContext } } - public Xid[] xaScan() throws HornetQException + public Xid[] xaScan() throws ActiveMQException { SessionXAGetInDoubtXidsResponseMessage response = (SessionXAGetInDoubtXidsResponseMessage) sessionChannel.sendBlocking(new PacketImpl(PacketImpl.SESS_XA_INDOUBT_XIDS), PacketImpl.SESS_XA_INDOUBT_XIDS_RESP); @@ -518,7 +518,7 @@ public class HornetQSessionContext extends SessionContext return xidArray; } - public void xaRollback(Xid xid, boolean wasStarted) throws HornetQException, XAException + public void xaRollback(Xid xid, boolean wasStarted) throws ActiveMQException, XAException { SessionXARollbackMessage packet = new SessionXARollbackMessage(xid); @@ -530,7 +530,7 @@ public class HornetQSessionContext extends SessionContext } } - public void xaStart(Xid xid, int flags) throws XAException, HornetQException + public void xaStart(Xid xid, int flags) throws XAException, ActiveMQException { Packet packet; if (flags == XAResource.TMJOIN) @@ -560,28 +560,28 @@ public class HornetQSessionContext extends SessionContext } } - public boolean configureTransactionTimeout(int seconds) throws HornetQException + public boolean configureTransactionTimeout(int seconds) throws ActiveMQException { SessionXASetTimeoutResponseMessage response = (SessionXASetTimeoutResponseMessage) sessionChannel.sendBlocking(new SessionXASetTimeoutMessage(seconds), PacketImpl.SESS_XA_SET_TIMEOUT_RESP); return response.isOK(); } - public int recoverSessionTimeout() throws HornetQException + public int recoverSessionTimeout() throws ActiveMQException { SessionXAGetTimeoutResponseMessage response = (SessionXAGetTimeoutResponseMessage) sessionChannel.sendBlocking(new PacketImpl(PacketImpl.SESS_XA_GET_TIMEOUT), PacketImpl.SESS_XA_GET_TIMEOUT_RESP); return response.getTimeoutSeconds(); } - public void createQueue(SimpleString address, SimpleString queueName, SimpleString filterString, boolean durable, boolean temp) throws HornetQException + public void createQueue(SimpleString address, SimpleString queueName, SimpleString filterString, boolean durable, boolean temp) throws ActiveMQException { CreateQueueMessage request = new CreateQueueMessage(address, queueName, filterString, durable, temp, true); sessionChannel.sendBlocking(request, PacketImpl.NULL_RESPONSE); } @Override - public boolean reattachOnNewConnection(RemotingConnection newConnection) throws HornetQException + public boolean reattachOnNewConnection(RemotingConnection newConnection) throws ActiveMQException { this.remotingConnection = newConnection; @@ -623,7 +623,7 @@ public class HornetQSessionContext extends SessionContext final boolean autoCommitSends, final boolean autoCommitAcks, final boolean preAcknowledge, - final SimpleString defaultAddress) throws HornetQException + final SimpleString defaultAddress) throws ActiveMQException { Packet createRequest = new CreateSessionMessage(name, sessionChannel.getID(), @@ -646,10 +646,10 @@ public class HornetQSessionContext extends SessionContext getCreateChannel().sendBlocking(createRequest, PacketImpl.CREATESESSION_RESP); retry = false; } - catch (HornetQException e) + catch (ActiveMQException e) { // the session was created while its server was starting, retry it: - if (e.getType() == HornetQExceptionType.SESSION_CREATION_REJECTED) + if (e.getType() == ActiveMQExceptionType.SESSION_CREATION_REJECTED) { HornetQClientLogger.LOGGER.retryCreateSessionSeverStarting(name); retry = true; @@ -674,7 +674,7 @@ public class HornetQSessionContext extends SessionContext } @Override - public void recreateConsumerOnServer(ClientConsumerInternal consumerInternal) throws HornetQException + public void recreateConsumerOnServer(ClientConsumerInternal consumerInternal) throws ActiveMQException { ClientSession.QueueQuery queueInfo = consumerInternal.getQueueInfo(); @@ -719,12 +719,12 @@ public class HornetQSessionContext extends SessionContext } } - public void xaFailed(Xid xid) throws HornetQException + public void xaFailed(Xid xid) throws ActiveMQException { sendPacketWithoutLock(sessionChannel, new SessionXAAfterFailedMessage(xid)); } - public void restartSession() throws HornetQException + public void restartSession() throws ActiveMQException { sendPacketWithoutLock(sessionChannel, new PacketImpl(PacketImpl.SESS_START)); } @@ -754,9 +754,9 @@ public class HornetQSessionContext extends SessionContext /** * This doesn't apply to other protocols probably, so it will be a hornetq exclusive feature * - * @throws HornetQException + * @throws org.apache.activemq.api.core.ActiveMQException */ - private void handleConsumerDisconnected(DisconnectConsumerMessage packet) throws HornetQException + private void handleConsumerDisconnected(DisconnectConsumerMessage packet) throws ActiveMQException { DisconnectConsumerMessage message = packet; @@ -931,7 +931,7 @@ public class HornetQSessionContext extends SessionContext Connection conn = parameterChannel.getConnection().getTransportConnection(); - HornetQBuffer buffer = packet.encode(this.getCoreConnection()); + ActiveMQBuffer buffer = packet.encode(this.getCoreConnection()); conn.write(buffer, false, false); } http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/PacketDecoder.java ---------------------------------------------------------------------- diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/PacketDecoder.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/PacketDecoder.java index 908f483..764f8ec 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/PacketDecoder.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/PacketDecoder.java @@ -76,7 +76,7 @@ import static org.apache.activemq.core.protocol.core.impl.PacketImpl.SUBSCRIBE_T import java.io.Serializable; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.client.HornetQClientMessageBundle; import org.apache.activemq.core.protocol.core.Packet; import org.apache.activemq.core.protocol.core.impl.wireformat.CheckFailoverMessage; @@ -144,7 +144,7 @@ import org.apache.activemq.core.protocol.core.impl.wireformat.SubscribeClusterTo */ public abstract class PacketDecoder implements Serializable { - public abstract Packet decode(final HornetQBuffer in); + public abstract Packet decode(final ActiveMQBuffer in); public Packet decode(byte packetType) { http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/PacketImpl.java ---------------------------------------------------------------------- diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/PacketImpl.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/PacketImpl.java index 0a94621..1ff25f6 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/PacketImpl.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/PacketImpl.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.Packet; import org.apache.activemq.spi.core.protocol.RemotingConnection; import org.apache.activemq.utils.DataConstants; @@ -266,9 +266,9 @@ public class PacketImpl implements Packet this.channelID = channelID; } - public HornetQBuffer encode(final RemotingConnection connection) + public ActiveMQBuffer encode(final RemotingConnection connection) { - HornetQBuffer buffer = connection.createBuffer(PacketImpl.INITIAL_PACKET_SIZE); + ActiveMQBuffer buffer = connection.createBuffer(PacketImpl.INITIAL_PACKET_SIZE); // The standard header fields @@ -288,7 +288,7 @@ public class PacketImpl implements Packet return buffer; } - public void decode(final HornetQBuffer buffer) + public void decode(final ActiveMQBuffer buffer) { channelID = buffer.readLong(); @@ -312,11 +312,11 @@ public class PacketImpl implements Packet return false; } - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { } - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { } http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/RemotingConnectionImpl.java ---------------------------------------------------------------------- diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/RemotingConnectionImpl.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/RemotingConnectionImpl.java index 03a17d3..7e5b4f0 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/RemotingConnectionImpl.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/RemotingConnectionImpl.java @@ -19,8 +19,8 @@ import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.Executor; -import org.apache.activemq.api.core.HornetQBuffer; -import org.apache.activemq.api.core.HornetQException; +import org.apache.activemq.api.core.ActiveMQBuffer; +import org.apache.activemq.api.core.ActiveMQException; import org.apache.activemq.api.core.Interceptor; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.client.HornetQClientLogger; @@ -198,7 +198,7 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement channels.put(channelID, channel); } - public void fail(final HornetQException me, String scaleDownTargetNodeID) + public void fail(final ActiveMQException me, String scaleDownTargetNodeID) { synchronized (failLock) { @@ -366,7 +366,7 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement // Buffer Handler implementation // ---------------------------------------------------- - public void bufferReceived(final Object connectionID, final HornetQBuffer buffer) + public void bufferReceived(final Object connectionID, final ActiveMQBuffer buffer) { try { http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CheckFailoverMessage.java ---------------------------------------------------------------------- diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CheckFailoverMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CheckFailoverMessage.java index 16fb2db..45b985e 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CheckFailoverMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CheckFailoverMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; public class CheckFailoverMessage extends PacketImpl @@ -31,13 +31,13 @@ public class CheckFailoverMessage extends PacketImpl } @Override - public void encodeRest(HornetQBuffer buffer) + public void encodeRest(ActiveMQBuffer buffer) { buffer.writeNullableString(nodeID); } @Override - public void decodeRest(HornetQBuffer buffer) + public void decodeRest(ActiveMQBuffer buffer) { nodeID = buffer.readNullableString(); } http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CheckFailoverReplyMessage.java ---------------------------------------------------------------------- diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CheckFailoverReplyMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CheckFailoverReplyMessage.java index 351766d..001e751 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CheckFailoverReplyMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CheckFailoverReplyMessage.java @@ -13,7 +13,7 @@ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; public class CheckFailoverReplyMessage extends PacketImpl @@ -38,13 +38,13 @@ public class CheckFailoverReplyMessage extends PacketImpl } @Override - public void encodeRest(HornetQBuffer buffer) + public void encodeRest(ActiveMQBuffer buffer) { buffer.writeBoolean(okToFailover); } @Override - public void decodeRest(HornetQBuffer buffer) + public void decodeRest(ActiveMQBuffer buffer) { okToFailover = buffer.readBoolean(); } http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage.java ---------------------------------------------------------------------- diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage.java index 52c9d44..b6dc010 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.TransportConfiguration; import org.apache.activemq.core.protocol.core.impl.PacketImpl; @@ -92,7 +92,7 @@ public class ClusterTopologyChangeMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeBoolean(exit); buffer.writeString(nodeID); @@ -121,7 +121,7 @@ public class ClusterTopologyChangeMessage extends PacketImpl } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { exit = buffer.readBoolean(); nodeID = buffer.readString(); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage_V2.java ---------------------------------------------------------------------- diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage_V2.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage_V2.java index 8f8d97b..c374977 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage_V2.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage_V2.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.TransportConfiguration; @@ -77,7 +77,7 @@ public class ClusterTopologyChangeMessage_V2 extends ClusterTopologyChangeMessag } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeBoolean(exit); buffer.writeString(nodeID); @@ -108,7 +108,7 @@ public class ClusterTopologyChangeMessage_V2 extends ClusterTopologyChangeMessag } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { exit = buffer.readBoolean(); nodeID = buffer.readString(); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage_V3.java ---------------------------------------------------------------------- diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage_V3.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage_V3.java index e3c2b3f..6fa8751 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage_V3.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage_V3.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.Pair; import org.apache.activemq.api.core.TransportConfiguration; @@ -54,14 +54,14 @@ public class ClusterTopologyChangeMessage_V3 extends ClusterTopologyChangeMessag } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { super.encodeRest(buffer); buffer.writeNullableString(scaleDownGroupName); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { super.decodeRest(buffer); scaleDownGroupName = buffer.readNullableString(); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CreateQueueMessage.java ---------------------------------------------------------------------- diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CreateQueueMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CreateQueueMessage.java index 9c07c72..b79c10d 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CreateQueueMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CreateQueueMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.protocol.core.impl.PacketImpl; @@ -128,7 +128,7 @@ public class CreateQueueMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeSimpleString(address); buffer.writeSimpleString(queueName); @@ -139,7 +139,7 @@ public class CreateQueueMessage extends PacketImpl } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { address = buffer.readSimpleString(); queueName = buffer.readSimpleString(); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CreateSessionMessage.java ---------------------------------------------------------------------- diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CreateSessionMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CreateSessionMessage.java index f3abf68..f7a4134 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CreateSessionMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CreateSessionMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; /** @@ -149,7 +149,7 @@ public class CreateSessionMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeString(name); buffer.writeLong(sessionChannelID); @@ -166,7 +166,7 @@ public class CreateSessionMessage extends PacketImpl } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { name = buffer.readString(); sessionChannelID = buffer.readLong(); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CreateSessionResponseMessage.java ---------------------------------------------------------------------- diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CreateSessionResponseMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CreateSessionResponseMessage.java index e1540a2..97c4d72 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CreateSessionResponseMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CreateSessionResponseMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; /** @@ -48,13 +48,13 @@ public class CreateSessionResponseMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeInt(serverVersion); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { serverVersion = buffer.readInt(); } http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CreateSharedQueueMessage.java ---------------------------------------------------------------------- diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CreateSharedQueueMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CreateSharedQueueMessage.java index 4479218..d84df89 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CreateSharedQueueMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/CreateSharedQueueMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.protocol.core.impl.PacketImpl; @@ -108,7 +108,7 @@ public class CreateSharedQueueMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeSimpleString(address); buffer.writeSimpleString(queueName); @@ -118,7 +118,7 @@ public class CreateSharedQueueMessage extends PacketImpl } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { address = buffer.readSimpleString(); queueName = buffer.readSimpleString(); http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/DisconnectConsumerMessage.java ---------------------------------------------------------------------- diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/DisconnectConsumerMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/DisconnectConsumerMessage.java index 6eb4bf4..db0e32d 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/DisconnectConsumerMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/DisconnectConsumerMessage.java @@ -13,7 +13,7 @@ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.core.protocol.core.impl.PacketImpl; public class DisconnectConsumerMessage extends PacketImpl @@ -32,13 +32,13 @@ public class DisconnectConsumerMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeLong(consumerId); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { consumerId = buffer.readLong(); } http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/DisconnectMessage.java ---------------------------------------------------------------------- diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/DisconnectMessage.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/DisconnectMessage.java index 22391a2..b6aed8a 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/DisconnectMessage.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/DisconnectMessage.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; import org.apache.activemq.core.protocol.core.impl.PacketImpl; @@ -53,13 +53,13 @@ public class DisconnectMessage extends PacketImpl } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { buffer.writeNullableSimpleString(nodeID); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { nodeID = buffer.readNullableSimpleString(); } http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/DisconnectMessage_V2.java ---------------------------------------------------------------------- diff --git a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/DisconnectMessage_V2.java b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/DisconnectMessage_V2.java index e7297a0..92d1f87 100644 --- a/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/DisconnectMessage_V2.java +++ b/activemq-core-client/src/main/java/org/apache/activemq/core/protocol/core/impl/wireformat/DisconnectMessage_V2.java @@ -12,7 +12,7 @@ */ package org.apache.activemq.core.protocol.core.impl.wireformat; -import org.apache.activemq.api.core.HornetQBuffer; +import org.apache.activemq.api.core.ActiveMQBuffer; import org.apache.activemq.api.core.SimpleString; public class DisconnectMessage_V2 extends DisconnectMessage @@ -41,14 +41,14 @@ public class DisconnectMessage_V2 extends DisconnectMessage } @Override - public void encodeRest(final HornetQBuffer buffer) + public void encodeRest(final ActiveMQBuffer buffer) { super.encodeRest(buffer); buffer.writeNullableSimpleString(scaleDownNodeID); } @Override - public void decodeRest(final HornetQBuffer buffer) + public void decodeRest(final ActiveMQBuffer buffer) { super.decodeRest(buffer); scaleDownNodeID = buffer.readNullableSimpleString();