This commit is contained in:
Clebert Suconic 2021-11-02 21:45:34 -04:00
commit f31122a722
422 changed files with 76 additions and 3556 deletions

View File

@ -456,8 +456,6 @@ public final class XmlDataExporter extends DBOption {
return queues; return queues;
} }
// Inner classes -------------------------------------------------
/** /**
* Proxy to handle indenting the XML since <code>javax.xml.stream.XMLStreamWriter</code> doesn't support that. * Proxy to handle indenting the XML since <code>javax.xml.stream.XMLStreamWriter</code> doesn't support that.
*/ */

View File

@ -38,8 +38,6 @@ public final class SimpleString implements CharSequence, Serializable, Comparabl
private static final SimpleString EMPTY = new SimpleString(""); private static final SimpleString EMPTY = new SimpleString("");
private static final long serialVersionUID = 4204223851422244307L; private static final long serialVersionUID = 4204223851422244307L;
// Attributes
// ------------------------------------------------------------------------
private final byte[] data; private final byte[] data;
private transient int hash; private transient int hash;
@ -49,8 +47,6 @@ public final class SimpleString implements CharSequence, Serializable, Comparabl
private transient String[] paths; private transient String[] paths;
// Static
// ----------------------------------------------------------------------
/** /**
* Returns a SimpleString constructed from the {@code string} parameter. * Returns a SimpleString constructed from the {@code string} parameter.
@ -74,8 +70,6 @@ public final class SimpleString implements CharSequence, Serializable, Comparabl
return pool.getOrCreate(string); return pool.getOrCreate(string);
} }
// Constructors
// ----------------------------------------------------------------------
/** /**
* creates a SimpleString from a conventional String * creates a SimpleString from a conventional String
@ -226,9 +220,6 @@ public final class SimpleString implements CharSequence, Serializable, Comparabl
return toString().compareTo(o.toString()); return toString().compareTo(o.toString());
} }
// Public
// ---------------------------------------------------------------------------
/** /**
* returns the underlying byte array of this SimpleString * returns the underlying byte array of this SimpleString
* *

View File

@ -24,7 +24,7 @@ import org.apache.activemq.artemis.api.core.ActiveMQBuffers;
import org.apache.activemq.artemis.api.core.SimpleString; import org.apache.activemq.artemis.api.core.SimpleString;
public class RandomUtil { public class RandomUtil {
// Constants -----------------------------------------------------
protected static final Random random = new Random(); protected static final Random random = new Random();
@ -32,9 +32,6 @@ public class RandomUtil {
return random; return random;
} }
// Attributes ----------------------------------------------------
// Static --------------------------------------------------------
public static String randomString() { public static String randomString() {
return java.util.UUID.randomUUID().toString(); return java.util.UUID.randomUUID().toString();
@ -131,15 +128,4 @@ public class RandomUtil {
return RandomUtil.random.nextFloat(); return RandomUtil.random.nextFloat();
} }
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
// Inner classes -------------------------------------------------
} }

View File

@ -206,7 +206,6 @@ public final class UUIDGenerator {
return null; return null;
} }
// Private -------------------------------------------------------
private static boolean isBlackList(final byte[] address) { private static boolean isBlackList(final byte[] address) {
for (byte[] blackList : UUIDGenerator.BLACK_LIST) { for (byte[] blackList : UUIDGenerator.BLACK_LIST) {

View File

@ -66,8 +66,6 @@ import java.util.Random;
* lock), and so has no method synchronization. * lock), and so has no method synchronization.
*/ */
public class UUIDTimer { public class UUIDTimer {
// // // Constants
/** /**
* Since System.longTimeMillis() returns time from january 1st 1970, and * Since System.longTimeMillis() returns time from january 1st 1970, and
* UUIDs need time from the beginning of gregorian calendar (15-oct-1582), * UUIDs need time from the beginning of gregorian calendar (15-oct-1582),
@ -245,11 +243,6 @@ public class UUIDTimer {
uuidData[UUID.INDEX_CLOCK_LO + 3] = (byte) clockLo; uuidData[UUID.INDEX_CLOCK_LO + 3] = (byte) clockLo;
} }
/*
* /////////////////////////////////////////////////////////// // Private
* methods ///////////////////////////////////////////////////////////
*/
private static final int MAX_WAIT_COUNT = 50; private static final int MAX_WAIT_COUNT = 50;
/** /**

View File

@ -630,8 +630,6 @@ public class TypedProperties {
return sb.append("]").toString(); return sb.append("]").toString();
} }
// Private ------------------------------------------------------------------------------------
private synchronized void doPutValue(final SimpleString key, final PropertyValue value) { private synchronized void doPutValue(final SimpleString key, final PropertyValue value) {
if (!internalProperties && internalPropertyPredicate != null && internalPropertyPredicate.test(key)) { if (!internalProperties && internalPropertyPredicate != null && internalPropertyPredicate.test(key)) {
internalProperties = true; internalProperties = true;
@ -676,8 +674,6 @@ public class TypedProperties {
} }
} }
// Inner classes ------------------------------------------------------------------------------
private abstract static class PropertyValue { private abstract static class PropertyValue {
abstract Object getValue(); abstract Object getValue();

View File

@ -25,19 +25,12 @@ import org.junit.Before;
import org.junit.Test; import org.junit.Test;
public class ConcurrentHashSetTest extends Assert { public class ConcurrentHashSetTest extends Assert {
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
private ConcurrentSet<String> set; private ConcurrentSet<String> set;
private String element; private String element;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
@Test @Test
public void testAdd() throws Exception { public void testAdd() throws Exception {
@ -119,12 +112,4 @@ public class ConcurrentHashSetTest extends Assert {
set = new ConcurrentHashSet<>(); set = new ConcurrentHashSet<>();
element = RandomUtil.randomString(); element = RandomUtil.randomString();
} }
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
// Inner classes -------------------------------------------------
} }

View File

@ -25,9 +25,6 @@ import org.junit.Test;
public class TypedPropertiesConversionTest { public class TypedPropertiesConversionTest {
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
private TypedProperties props; private TypedProperties props;
@ -35,12 +32,6 @@ public class TypedPropertiesConversionTest {
private final SimpleString unknownKey = new SimpleString("this.key.is.never.used"); private final SimpleString unknownKey = new SimpleString("this.key.is.never.used");
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
@Before @Before
public void setUp() throws Exception { public void setUp() throws Exception {
key = RandomUtil.randomSimpleString(); key = RandomUtil.randomSimpleString();
@ -298,12 +289,4 @@ public class TypedPropertiesConversionTest {
Assert.assertNull(props.getBytesProperty(unknownKey)); Assert.assertNull(props.getBytesProperty(unknownKey));
} }
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
// Inner classes -------------------------------------------------
} }

View File

@ -56,9 +56,7 @@ public class TypedPropertiesTest {
} }
} }
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
private TypedProperties props; private TypedProperties props;

View File

@ -137,7 +137,6 @@ public final class AddressSettingsInfo {
private final boolean enableMetrics; private final boolean enableMetrics;
// Static --------------------------------------------------------
public static AddressSettingsInfo from(final String jsonString) { public static AddressSettingsInfo from(final String jsonString) {
JsonObject object = JsonUtil.readJsonObject(jsonString); JsonObject object = JsonUtil.readJsonObject(jsonString);
@ -200,7 +199,6 @@ public final class AddressSettingsInfo {
object.getBoolean("enableMetrics")); object.getBoolean("enableMetrics"));
} }
// Constructors --------------------------------------------------
public AddressSettingsInfo(String addressFullMessagePolicy, public AddressSettingsInfo(String addressFullMessagePolicy,
long maxSizeBytes, long maxSizeBytes,
@ -318,8 +316,6 @@ public final class AddressSettingsInfo {
this.enableMetrics = enableMetrics; this.enableMetrics = enableMetrics;
} }
// Public --------------------------------------------------------
public int getPageCacheMaxSize() { public int getPageCacheMaxSize() {
return pageCacheMaxSize; return pageCacheMaxSize;
} }

View File

@ -34,7 +34,6 @@ public final class DayCounterInfo {
private final long[] counters; private final long[] counters;
// Static --------------------------------------------------------
public static String toJSON(final DayCounterInfo[] infos) { public static String toJSON(final DayCounterInfo[] infos) {
JsonObjectBuilder json = JsonLoader.createObjectBuilder(); JsonObjectBuilder json = JsonLoader.createObjectBuilder();
@ -73,15 +72,12 @@ public final class DayCounterInfo {
return infos; return infos;
} }
// Constructors --------------------------------------------------
public DayCounterInfo(final String date, final long[] counters) { public DayCounterInfo(final String date, final long[] counters) {
this.date = date; this.date = date;
this.counters = counters; this.counters = counters;
} }
// Public --------------------------------------------------------
/** /**
* Returns the date of the counter. * Returns the date of the counter.
*/ */

View File

@ -28,7 +28,6 @@ import org.apache.activemq.artemis.core.message.impl.CoreMessage;
* Helper class to use ActiveMQ Artemis Core messages to manage server resources. * Helper class to use ActiveMQ Artemis Core messages to manage server resources.
*/ */
public final class ManagementHelper { public final class ManagementHelper {
// Constants -----------------------------------------------------
public static final SimpleString HDR_RESOURCE_NAME = new SimpleString("_AMQ_ResourceName"); public static final SimpleString HDR_RESOURCE_NAME = new SimpleString("_AMQ_ResourceName");
@ -88,9 +87,6 @@ public final class ManagementHelper {
public static final SimpleString HDR_CLIENT_ID = new SimpleString("_AMQ_Client_ID"); public static final SimpleString HDR_CLIENT_ID = new SimpleString("_AMQ_Client_ID");
// Attributes ----------------------------------------------------
// Static --------------------------------------------------------
/** /**
* Stores a resource attribute in a message to retrieve the value from the server resource. * Stores a resource attribute in a message to retrieve the value from the server resource.

View File

@ -66,7 +66,6 @@ public final class MessageCounterInfo {
return new MessageCounterInfo(name, subscription, durable, count, countDelta, depth, depthDelta, lastAddTimestamp, lastAckTimestamp, updateTimestamp); return new MessageCounterInfo(name, subscription, durable, count, countDelta, depth, depthDelta, lastAddTimestamp, lastAckTimestamp, updateTimestamp);
} }
// Constructors --------------------------------------------------
public MessageCounterInfo(final String name, public MessageCounterInfo(final String name,
final String subscription, final String subscription,
@ -90,8 +89,6 @@ public final class MessageCounterInfo {
this.updateTimestamp = updateTimestamp; this.updateTimestamp = updateTimestamp;
} }
// Public --------------------------------------------------------
/** /**
* Returns the name of the queue. * Returns the name of the queue.
*/ */

View File

@ -27,14 +27,12 @@ import org.apache.activemq.artemis.api.core.RoutingType;
*/ */
public final class ObjectNameBuilder { public final class ObjectNameBuilder {
// Constants -----------------------------------------------------
/** /**
* Default JMX domain for ActiveMQ Artemis resources. * Default JMX domain for ActiveMQ Artemis resources.
*/ */
public static final ObjectNameBuilder DEFAULT = new ObjectNameBuilder(ActiveMQDefaultConfiguration.getDefaultJmxDomain(), "localhost", true); public static final ObjectNameBuilder DEFAULT = new ObjectNameBuilder(ActiveMQDefaultConfiguration.getDefaultJmxDomain(), "localhost", true);
// Attributes ----------------------------------------------------
private final String domain; private final String domain;
@ -42,7 +40,6 @@ public final class ObjectNameBuilder {
private final boolean jmxUseBrokerName; private final boolean jmxUseBrokerName;
// Static --------------------------------------------------------
public static ObjectNameBuilder create(final String domain) { public static ObjectNameBuilder create(final String domain) {
if (domain == null) { if (domain == null) {
@ -68,7 +65,7 @@ public final class ObjectNameBuilder {
} }
} }
// Constructors --------------------------------------------------
private ObjectNameBuilder(final String domain, final String brokerName, boolean jmxUseBrokerName) { private ObjectNameBuilder(final String domain, final String brokerName, boolean jmxUseBrokerName) {
this.domain = domain; this.domain = domain;
@ -76,8 +73,6 @@ public final class ObjectNameBuilder {
this.jmxUseBrokerName = jmxUseBrokerName; this.jmxUseBrokerName = jmxUseBrokerName;
} }
// Public --------------------------------------------------------
/** /**
* Returns the ObjectName used by the single {@link ActiveMQServerControl}. * Returns the ObjectName used by the single {@link ActiveMQServerControl}.
*/ */

View File

@ -47,8 +47,7 @@ import org.apache.activemq.artemis.utils.collections.PriorityLinkedListImpl;
import org.jboss.logging.Logger; import org.jboss.logging.Logger;
public final class ClientConsumerImpl implements ClientConsumerInternal { public final class ClientConsumerImpl implements ClientConsumerInternal {
// Constants
// ------------------------------------------------------------------------------------
private static final Logger logger = Logger.getLogger(ClientConsumerImpl.class); private static final Logger logger = Logger.getLogger(ClientConsumerImpl.class);
@ -58,9 +57,6 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
public static final SimpleString FORCED_DELIVERY_MESSAGE = new SimpleString("_hornetq.forced.delivery.seq"); public static final SimpleString FORCED_DELIVERY_MESSAGE = new SimpleString("_hornetq.forced.delivery.seq");
// Attributes
// -----------------------------------------------------------------------------------
private final ClientSessionInternal session; private final ClientSessionInternal session;
private final SessionContext sessionContext; private final SessionContext sessionContext;
@ -135,8 +131,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
private final ClassLoader contextClassLoader; private final ClassLoader contextClassLoader;
// Constructors
// ---------------------------------------------------------------------------------
public ClientConsumerImpl(final ClientSessionInternal session, public ClientConsumerImpl(final ClientSessionInternal session,
final ConsumerContext consumerContext, final ConsumerContext consumerContext,
@ -862,18 +857,6 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
} }
} }
// Public
// ---------------------------------------------------------------------------------------
// Package protected
// ---------------------------------------------------------------------------------------
// Protected
// ---------------------------------------------------------------------------------------
// Private
// ---------------------------------------------------------------------------------------
/** /**
* Sending an initial credit for slow consumers * Sending an initial credit for slow consumers
*/ */
@ -1142,9 +1125,6 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
'}'; '}';
} }
// Inner classes
// --------------------------------------------------------------------------------
private class Runner implements Runnable { private class Runner implements Runnable {
@Override @Override

View File

@ -55,8 +55,6 @@ public final class ClientLargeMessageImpl extends ClientMessageImpl implements C
super(); super();
} }
// Public --------------------------------------------------------
@Override @Override
public int getEncodeSize() { public int getEncodeSize() {
if (writableBuffer != null) { if (writableBuffer != null) {
@ -160,8 +158,6 @@ public final class ClientLargeMessageImpl extends ClientMessageImpl implements C
} }
} }
// Inner classes -------------------------------------------------
private static class ActiveMQOutputStream extends OutputStream { private static class ActiveMQOutputStream extends OutputStream {
private final ActiveMQBuffer bufferOut; private final ActiveMQBuffer bufferOut;

View File

@ -64,9 +64,6 @@ public class ClientProducerImpl implements ClientProducerInternal {
private final ClientProducerCredits producerCredits; private final ClientProducerCredits producerCredits;
// Static ---------------------------------------------------------------------------------------
// Constructors ---------------------------------------------------------------------------------
public ClientProducerImpl(final ClientSessionInternal session, public ClientProducerImpl(final ClientSessionInternal session,
final SimpleString address, final SimpleString address,
@ -195,8 +192,6 @@ public class ClientProducerImpl implements ClientProducerInternal {
return rateLimiter == null ? -1 : rateLimiter.getRate(); return rateLimiter == null ? -1 : rateLimiter.getRate();
} }
// Public ---------------------------------------------------------------------------------------
@Override @Override
public ClientProducerCredits getProducerCredits() { public ClientProducerCredits getProducerCredits() {
return producerCredits; return producerCredits;

View File

@ -1959,9 +1959,6 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
connectionFailed(me, failedOver); connectionFailed(me, failedOver);
} }
// Public
// ----------------------------------------------------------------------------
@Override @Override
public void setForceNotSameRM(final boolean force) { public void setForceNotSameRM(final boolean force) {
forceNotSameRM = force; forceNotSameRM = force;

View File

@ -718,8 +718,6 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
// Inner classes -------------------------------------------------
@Override @Override
public ByteBuf byteBuf() { public ByteBuf byteBuf() {
return null; return null;

View File

@ -50,11 +50,9 @@ import org.apache.activemq.artemis.utils.UTF8Util;
* saveStream are called. * saveStream are called.
*/ */
public class LargeMessageControllerImpl implements LargeMessageController { public class LargeMessageControllerImpl implements LargeMessageController {
// Constants -----------------------------------------------------
private static final String READ_ONLY_ERROR_MESSAGE = "This is a read-only buffer, setOperations are not supported"; private static final String READ_ONLY_ERROR_MESSAGE = "This is a read-only buffer, setOperations are not supported";
// Attributes ----------------------------------------------------
private final ClientConsumerInternal consumerInternal; private final ClientConsumerInternal consumerInternal;
@ -94,9 +92,6 @@ public class LargeMessageControllerImpl implements LargeMessageController {
private final FileCache fileCache; private final FileCache fileCache;
private boolean local = false; private boolean local = false;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public LargeMessageControllerImpl(final ClientConsumerInternal consumerInternal, public LargeMessageControllerImpl(final ClientConsumerInternal consumerInternal,
final long totalSize, final long totalSize,
@ -127,8 +122,6 @@ public class LargeMessageControllerImpl implements LargeMessageController {
this.bufferSize = bufferSize; this.bufferSize = bufferSize;
} }
// Public --------------------------------------------------------
public void setLocal(boolean local) { public void setLocal(boolean local) {
this.local = local; this.local = local;
} }

View File

@ -26,7 +26,7 @@ import org.apache.activemq.artemis.core.protocol.core.Packet;
import org.apache.activemq.artemis.utils.DataConstants; import org.apache.activemq.artemis.utils.DataConstants;
public class PacketImpl implements Packet { public class PacketImpl implements Packet {
// Constants -------------------------------------------------------------------------
// 2.0.0 // 2.0.0
@ -287,14 +287,12 @@ public class PacketImpl implements Packet {
public static final byte DISCONNECT_V3 = -19; public static final byte DISCONNECT_V3 = -19;
// Static --------------------------------------------------------
public PacketImpl(final byte type) { public PacketImpl(final byte type) {
this.type = type; this.type = type;
} }
// Public --------------------------------------------------------
public SimpleString convertName(SimpleString name) { public SimpleString convertName(SimpleString name) {
if (name == null) { if (name == null) {
return null; return null;

View File

@ -85,8 +85,6 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement
flush(); flush();
} }
// Constructors
// ---------------------------------------------------------------------------------
/* /*
* Create a client side connection * Create a client side connection

View File

@ -25,9 +25,6 @@ public class ActiveMQExceptionMessage extends PacketImpl {
protected ActiveMQException exception; protected ActiveMQException exception;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public ActiveMQExceptionMessage(final ActiveMQException exception) { public ActiveMQExceptionMessage(final ActiveMQException exception) {
super(EXCEPTION); super(EXCEPTION);
@ -39,8 +36,6 @@ public class ActiveMQExceptionMessage extends PacketImpl {
super(EXCEPTION); super(EXCEPTION);
} }
// Public --------------------------------------------------------
@Override @Override
public boolean isResponse() { public boolean isResponse() {
return true; return true;

View File

@ -24,9 +24,7 @@ public class ActiveMQExceptionMessage_V2 extends ActiveMQExceptionMessage {
private long correlationID; private long correlationID;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public ActiveMQExceptionMessage_V2(final long correlationID, final ActiveMQException exception) { public ActiveMQExceptionMessage_V2(final long correlationID, final ActiveMQException exception) {
super(exception); super(exception);
@ -37,8 +35,6 @@ public class ActiveMQExceptionMessage_V2 extends ActiveMQExceptionMessage {
super(); super();
} }
// Public --------------------------------------------------------
@Override @Override
public boolean isResponse() { public boolean isResponse() {
return true; return true;

View File

@ -31,9 +31,6 @@ public class ClusterTopologyChangeMessage extends PacketImpl {
protected boolean last; protected boolean last;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public ClusterTopologyChangeMessage(final String nodeID, public ClusterTopologyChangeMessage(final String nodeID,
final Pair<TransportConfiguration, TransportConfiguration> pair, final Pair<TransportConfiguration, TransportConfiguration> pair,
@ -61,8 +58,6 @@ public class ClusterTopologyChangeMessage extends PacketImpl {
super(CLUSTER_TOPOLOGY); super(CLUSTER_TOPOLOGY);
} }
// Public --------------------------------------------------------
/** /**
* @param clusterTopologyV2 * @param clusterTopologyV2
*/ */

View File

@ -49,8 +49,6 @@ public class CreateAddressMessage extends PacketImpl {
super(CREATE_ADDRESS); super(CREATE_ADDRESS);
} }
// Public --------------------------------------------------------
@Override @Override
protected String getPacketString() { protected String getPacketString() {
StringBuffer buff = new StringBuffer(super.getPacketString()); StringBuffer buff = new StringBuffer(super.getPacketString());

View File

@ -59,7 +59,6 @@ public class CreateQueueMessage extends PacketImpl {
super(CREATE_QUEUE); super(CREATE_QUEUE);
} }
// Public --------------------------------------------------------
/** /**
* @param createQueueMessageV2 * @param createQueueMessageV2
*/ */

View File

@ -188,8 +188,6 @@ public class CreateQueueMessage_V2 extends CreateQueueMessage {
super(CREATE_QUEUE_V2); super(CREATE_QUEUE_V2);
} }
// Public --------------------------------------------------------
public QueueConfiguration toQueueConfiguration() { public QueueConfiguration toQueueConfiguration() {
return new QueueConfiguration(queueName) return new QueueConfiguration(queueName)
.setAddress(address) .setAddress(address)

View File

@ -108,8 +108,6 @@ public class CreateSessionMessage extends PacketImpl {
super(type); super(type);
} }
// Public --------------------------------------------------------
public String getName() { public String getName() {
return name; return name;
} }

View File

@ -44,8 +44,6 @@ public class CreateSessionMessage_V2 extends CreateSessionMessage {
super(CREATESESSION_V2); super(CREATESESSION_V2);
} }
// Public --------------------------------------------------------
public String getClientID() { public String getClientID() {
return clientID; return clientID;

View File

@ -54,8 +54,6 @@ public class CreateSharedQueueMessage extends PacketImpl {
super(packetType); super(packetType);
} }
// Public --------------------------------------------------------
@Override @Override
protected String getPacketString() { protected String getPacketString() {
StringBuffer buff = new StringBuffer(super.getPacketString()); StringBuffer buff = new StringBuffer(super.getPacketString());

View File

@ -21,15 +21,10 @@ import org.apache.activemq.artemis.api.core.SimpleString;
import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl; import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl;
public class DisconnectMessage extends PacketImpl { public class DisconnectMessage extends PacketImpl {
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
protected SimpleString nodeID; protected SimpleString nodeID;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public DisconnectMessage(final SimpleString nodeID) { public DisconnectMessage(final SimpleString nodeID) {
super(DISCONNECT); super(DISCONNECT);
@ -45,8 +40,6 @@ public class DisconnectMessage extends PacketImpl {
super(disconnectV2); super(disconnectV2);
} }
// Public --------------------------------------------------------
public SimpleString getNodeID() { public SimpleString getNodeID() {
return nodeID; return nodeID;
} }

View File

@ -35,8 +35,6 @@ public class DisconnectMessage_V2 extends DisconnectMessage {
super(DISCONNECT_V2); super(DISCONNECT_V2);
} }
// Public --------------------------------------------------------
public SimpleString getScaleDownNodeID() { public SimpleString getScaleDownNodeID() {
return scaleDownNodeID; return scaleDownNodeID;
} }

View File

@ -46,8 +46,6 @@ public class DisconnectMessage_V3 extends DisconnectMessage {
super(DISCONNECT_V3); super(DISCONNECT_V3);
} }
// Public --------------------------------------------------------
public DisconnectReason getReason() { public DisconnectReason getReason() {
return reason; return reason;
} }

View File

@ -32,8 +32,6 @@ public class NullResponseMessage_V2 extends NullResponseMessage {
super(); super();
} }
// Public --------------------------------------------------------
@Override @Override
public long getCorrelationID() { public long getCorrelationID() {
return correlationID; return correlationID;

View File

@ -33,8 +33,6 @@ public class PacketsConfirmedMessage extends PacketImpl {
super(PACKETS_CONFIRMED); super(PACKETS_CONFIRMED);
} }
// Public --------------------------------------------------------
public int getCommandID() { public int getCommandID() {
return commandID; return commandID;
} }

View File

@ -37,8 +37,6 @@ public class ReattachSessionResponseMessage extends PacketImpl {
super(REATTACH_SESSION_RESP); super(REATTACH_SESSION_RESP);
} }
// Public --------------------------------------------------------
public int getLastConfirmedCommandID() { public int getLastConfirmedCommandID() {
return lastConfirmedCommandID; return lastConfirmedCommandID;
} }

View File

@ -41,8 +41,6 @@ public class SessionAcknowledgeMessage extends PacketImpl {
super(SESS_ACKNOWLEDGE); super(SESS_ACKNOWLEDGE);
} }
// Public --------------------------------------------------------
public long getConsumerID() { public long getConsumerID() {
return consumerID; return consumerID;
} }

View File

@ -24,8 +24,6 @@ public class SessionCloseMessage extends PacketImpl {
super(SESS_CLOSE); super(SESS_CLOSE);
} }
// Public --------------------------------------------------------
@Override @Override
public boolean equals(final Object other) { public boolean equals(final Object other) {
if (other instanceof SessionCloseMessage == false) { if (other instanceof SessionCloseMessage == false) {

View File

@ -33,8 +33,6 @@ public class SessionConsumerCloseMessage extends PacketImpl {
super(SESS_CONSUMER_CLOSE); super(SESS_CONSUMER_CLOSE);
} }
// Public --------------------------------------------------------
public long getConsumerID() { public long getConsumerID() {
return consumerID; return consumerID;
} }

View File

@ -34,8 +34,6 @@ public class SessionConsumerFlowCreditMessage extends PacketImpl {
super(SESS_FLOWTOKEN); super(SESS_FLOWTOKEN);
} }
// Public --------------------------------------------------------
public long getConsumerID() { public long getConsumerID() {
return consumerID; return consumerID;
} }

View File

@ -41,8 +41,6 @@ public abstract class SessionContinuationMessage extends PacketImpl {
super(type); super(type);
} }
// Public --------------------------------------------------------
/** /**
* @return the body * @return the body
*/ */

View File

@ -20,17 +20,12 @@ import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl; import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl;
public class SessionExpireMessage extends PacketImpl { public class SessionExpireMessage extends PacketImpl {
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
private long consumerID; private long consumerID;
private long messageID; private long messageID;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public SessionExpireMessage(final long consumerID, final long messageID) { public SessionExpireMessage(final long consumerID, final long messageID) {
super(SESS_EXPIRED); super(SESS_EXPIRED);
@ -44,8 +39,6 @@ public class SessionExpireMessage extends PacketImpl {
super(SESS_EXPIRED); super(SESS_EXPIRED);
} }
// Public --------------------------------------------------------
public long getConsumerID() { public long getConsumerID() {
return consumerID; return consumerID;
} }

View File

@ -20,9 +20,7 @@ import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl; import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl;
public class SessionIndividualAcknowledgeMessage extends PacketImpl { public class SessionIndividualAcknowledgeMessage extends PacketImpl {
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
private long consumerID; private long consumerID;
@ -30,9 +28,6 @@ public class SessionIndividualAcknowledgeMessage extends PacketImpl {
private boolean requiresResponse; private boolean requiresResponse;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public SessionIndividualAcknowledgeMessage(final long consumerID, public SessionIndividualAcknowledgeMessage(final long consumerID,
final long messageID, final long messageID,
@ -50,8 +45,6 @@ public class SessionIndividualAcknowledgeMessage extends PacketImpl {
super(SESS_INDIVIDUAL_ACKNOWLEDGE); super(SESS_INDIVIDUAL_ACKNOWLEDGE);
} }
// Public --------------------------------------------------------
public long getConsumerID() { public long getConsumerID() {
return consumerID; return consumerID;
} }

View File

@ -21,17 +21,12 @@ import org.apache.activemq.artemis.utils.DataConstants;
public class SessionReceiveContinuationMessage extends SessionContinuationMessage { public class SessionReceiveContinuationMessage extends SessionContinuationMessage {
// Constants -----------------------------------------------------
public static final int SESSION_RECEIVE_CONTINUATION_BASE_SIZE = SESSION_CONTINUATION_BASE_SIZE + DataConstants.SIZE_LONG; public static final int SESSION_RECEIVE_CONTINUATION_BASE_SIZE = SESSION_CONTINUATION_BASE_SIZE + DataConstants.SIZE_LONG;
// Attributes ----------------------------------------------------
private long consumerID; private long consumerID;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public SessionReceiveContinuationMessage() { public SessionReceiveContinuationMessage() {
super(SESS_RECEIVE_CONTINUATION); super(SESS_RECEIVE_CONTINUATION);
@ -67,15 +62,11 @@ public class SessionReceiveContinuationMessage extends SessionContinuationMessag
return consumerID; return consumerID;
} }
// Protected -----------------------------------------------------
@Override @Override
public int expectedEncodeSize() { public int expectedEncodeSize() {
return super.expectedEncodeSize() + DataConstants.SIZE_LONG; return super.expectedEncodeSize() + DataConstants.SIZE_LONG;
} }
// Public --------------------------------------------------------
@Override @Override
public void encodeRest(final ActiveMQBuffer buffer) { public void encodeRest(final ActiveMQBuffer buffer) {
super.encodeRest(buffer); super.encodeRest(buffer);

View File

@ -23,9 +23,6 @@ import org.apache.activemq.artemis.core.message.impl.CoreMessage;
import org.apache.activemq.artemis.utils.DataConstants; import org.apache.activemq.artemis.utils.DataConstants;
public class SessionReceiveMessage extends MessagePacket { public class SessionReceiveMessage extends MessagePacket {
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
protected long consumerID; protected long consumerID;
@ -43,8 +40,6 @@ public class SessionReceiveMessage extends MessagePacket {
super(SESS_RECEIVE_MSG, message); super(SESS_RECEIVE_MSG, message);
} }
// Public --------------------------------------------------------
public long getConsumerID() { public long getConsumerID() {
return consumerID; return consumerID;
} }

View File

@ -38,8 +38,6 @@ public class SessionRequestProducerCreditsMessage extends PacketImpl {
super(SESS_PRODUCER_REQUEST_CREDITS); super(SESS_PRODUCER_REQUEST_CREDITS);
} }
// Public --------------------------------------------------------
public int getCredits() { public int getCredits() {
return credits; return credits;
} }

View File

@ -45,9 +45,7 @@ public class SessionSendContinuationMessage extends SessionContinuationMessage {
*/ */
protected long messageBodySize = -1; protected long messageBodySize = -1;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public SessionSendContinuationMessage() { public SessionSendContinuationMessage() {
super(SESS_SEND_CONTINUATION); super(SESS_SEND_CONTINUATION);
@ -96,8 +94,6 @@ public class SessionSendContinuationMessage extends SessionContinuationMessage {
this.messageBodySize = messageBodySize; this.messageBodySize = messageBodySize;
} }
// Public --------------------------------------------------------
/** /**
* @return the requiresResponse * @return the requiresResponse
*/ */

View File

@ -28,9 +28,7 @@ public class SessionSendContinuationMessage_V2 extends SessionSendContinuationMe
private long correlationID; private long correlationID;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public SessionSendContinuationMessage_V2() { public SessionSendContinuationMessage_V2() {
super(); super();
@ -50,8 +48,6 @@ public class SessionSendContinuationMessage_V2 extends SessionSendContinuationMe
super(message, body, continues, requiresResponse, messageBodySize, handler); super(message, body, continues, requiresResponse, messageBodySize, handler);
} }
// Public --------------------------------------------------------
@Override @Override
public int expectedEncodeSize() { public int expectedEncodeSize() {
return super.expectedEncodeSize() + DataConstants.SIZE_LONG; return super.expectedEncodeSize() + DataConstants.SIZE_LONG;

View File

@ -28,9 +28,6 @@ public class SessionSendLargeMessage extends PacketImpl implements MessagePacket
*/ */
private Message largeMessage; private Message largeMessage;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public SessionSendLargeMessage(final Message largeMessage) { public SessionSendLargeMessage(final Message largeMessage) {
super(SESS_SEND_LARGE); super(SESS_SEND_LARGE);
@ -38,8 +35,6 @@ public class SessionSendLargeMessage extends PacketImpl implements MessagePacket
this.largeMessage = largeMessage; this.largeMessage = largeMessage;
} }
// Public --------------------------------------------------------
public Message getLargeMessage() { public Message getLargeMessage() {
return largeMessage; return largeMessage;
} }

View File

@ -67,8 +67,6 @@ public class SessionSendMessage extends MessagePacket {
this.handler = null; this.handler = null;
} }
// Public --------------------------------------------------------
@Override @Override
public boolean isRequiresResponse() { public boolean isRequiresResponse() {
return requiresResponse; return requiresResponse;

View File

@ -18,13 +18,6 @@ package org.apache.activemq.artemis.core.protocol.core.impl.wireformat;
public class SessionUniqueAddMetaDataMessage extends SessionAddMetaDataMessageV2 { public class SessionUniqueAddMetaDataMessage extends SessionAddMetaDataMessageV2 {
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public SessionUniqueAddMetaDataMessage() { public SessionUniqueAddMetaDataMessage() {
super(SESS_UNIQUE_ADD_METADATA); super(SESS_UNIQUE_ADD_METADATA);
@ -34,14 +27,4 @@ public class SessionUniqueAddMetaDataMessage extends SessionAddMetaDataMessageV2
super(SESS_UNIQUE_ADD_METADATA, key, data); super(SESS_UNIQUE_ADD_METADATA, key, data);
} }
// Public --------------------------------------------------------
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
// Inner classes -------------------------------------------------
} }

View File

@ -26,15 +26,10 @@ import org.apache.activemq.artemis.utils.XidCodecSupport;
* to be called after a failure on an XA Session * to be called after a failure on an XA Session
*/ */
public class SessionXAAfterFailedMessage extends PacketImpl { public class SessionXAAfterFailedMessage extends PacketImpl {
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
private Xid xid; private Xid xid;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public SessionXAAfterFailedMessage(final Xid xid) { public SessionXAAfterFailedMessage(final Xid xid) {
super(SESS_XA_FAILED); super(SESS_XA_FAILED);
@ -46,8 +41,6 @@ public class SessionXAAfterFailedMessage extends PacketImpl {
super(SESS_XA_FAILED); super(SESS_XA_FAILED);
} }
// Public --------------------------------------------------------
public Xid getXid() { public Xid getXid() {
return xid; return xid;
} }

View File

@ -41,8 +41,6 @@ public class SessionXAResponseMessage extends PacketImpl {
super(SESS_XA_RESP); super(SESS_XA_RESP);
} }
// Public --------------------------------------------------------
@Override @Override
public boolean isResponse() { public boolean isResponse() {
return true; return true;

View File

@ -32,8 +32,6 @@ public class SessionXAResponseMessage_V2 extends SessionXAResponseMessage {
super(); super();
} }
// Public --------------------------------------------------------
@Override @Override
public long getCorrelationID() { public long getCorrelationID() {
return correlationID; return correlationID;

View File

@ -36,8 +36,6 @@ public class SessionXAResumeMessage extends PacketImpl {
super(SESS_XA_RESUME); super(SESS_XA_RESUME);
} }
// Public --------------------------------------------------------
public Xid getXid() { public Xid getXid() {
return xid; return xid;
} }

View File

@ -36,8 +36,6 @@ public class SessionXARollbackMessage extends PacketImpl {
super(SESS_XA_ROLLBACK); super(SESS_XA_ROLLBACK);
} }
// Public --------------------------------------------------------
public Xid getXid() { public Xid getXid() {
return xid; return xid;
} }

View File

@ -33,8 +33,6 @@ public class SessionXASetTimeoutMessage extends PacketImpl {
super(SESS_XA_SET_TIMEOUT); super(SESS_XA_SET_TIMEOUT);
} }
// Public --------------------------------------------------------
public int getTimeoutSeconds() { public int getTimeoutSeconds() {
return timeoutSeconds; return timeoutSeconds;
} }

View File

@ -33,8 +33,6 @@ public class SessionXASetTimeoutResponseMessage extends PacketImpl {
super(SESS_XA_SET_TIMEOUT_RESP); super(SESS_XA_SET_TIMEOUT_RESP);
} }
// Public --------------------------------------------------------
@Override @Override
public boolean isResponse() { public boolean isResponse() {
return true; return true;

View File

@ -23,15 +23,10 @@ import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl;
import org.apache.activemq.artemis.utils.XidCodecSupport; import org.apache.activemq.artemis.utils.XidCodecSupport;
public class SessionXAStartMessage extends PacketImpl { public class SessionXAStartMessage extends PacketImpl {
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
private Xid xid; private Xid xid;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public SessionXAStartMessage(final Xid xid) { public SessionXAStartMessage(final Xid xid) {
super(SESS_XA_START); super(SESS_XA_START);
@ -43,8 +38,6 @@ public class SessionXAStartMessage extends PacketImpl {
super(SESS_XA_START); super(SESS_XA_START);
} }
// Public --------------------------------------------------------
public Xid getXid() { public Xid getXid() {
return xid; return xid;
} }

View File

@ -43,8 +43,6 @@ public class SubscribeClusterTopologyUpdatesMessage extends PacketImpl {
super(packetType); super(packetType);
} }
// Public --------------------------------------------------------
public boolean isClusterConnection() { public boolean isClusterConnection() {
return clusterConnection; return clusterConnection;
} }

View File

@ -32,8 +32,6 @@ public class SubscribeClusterTopologyUpdatesMessageV2 extends SubscribeClusterTo
super(SUBSCRIBE_TOPOLOGY_V2); super(SUBSCRIBE_TOPOLOGY_V2);
} }
// Public --------------------------------------------------------
@Override @Override
public void encodeRest(final ActiveMQBuffer buffer) { public void encodeRest(final ActiveMQBuffer buffer) {
super.encodeRest(buffer); super.encodeRest(buffer);

View File

@ -134,7 +134,6 @@ public class NettyConnector extends AbstractConnector {
private static final Logger logger = Logger.getLogger(NettyConnector.class); private static final Logger logger = Logger.getLogger(NettyConnector.class);
// Constants -----------------------------------------------------
public static final String JAVAX_KEYSTORE_PATH_PROP_NAME = "javax.net.ssl.keyStore"; public static final String JAVAX_KEYSTORE_PATH_PROP_NAME = "javax.net.ssl.keyStore";
public static final String JAVAX_KEYSTORE_PASSWORD_PROP_NAME = "javax.net.ssl.keyStorePassword"; public static final String JAVAX_KEYSTORE_PASSWORD_PROP_NAME = "javax.net.ssl.keyStorePassword";
public static final String JAVAX_KEYSTORE_TYPE_PROP_NAME = "javax.net.ssl.keyStoreType"; public static final String JAVAX_KEYSTORE_TYPE_PROP_NAME = "javax.net.ssl.keyStoreType";
@ -176,7 +175,6 @@ public class NettyConnector extends AbstractConnector {
DEFAULT_CONFIG = Collections.unmodifiableMap(config); DEFAULT_CONFIG = Collections.unmodifiableMap(config);
} }
// Attributes ----------------------------------------------------
private final boolean serverConnection; private final boolean serverConnection;
@ -303,11 +301,6 @@ public class NettyConnector extends AbstractConnector {
private final ClientProtocolManager protocolManager; private final ClientProtocolManager protocolManager;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
public NettyConnector(final Map<String, Object> configuration, public NettyConnector(final Map<String, Object> configuration,
final BufferHandler handler, final BufferHandler handler,
final BaseConnectionLifeCycleListener<?> listener, final BaseConnectionLifeCycleListener<?> listener,
@ -966,8 +959,6 @@ public class NettyConnector extends AbstractConnector {
} }
} }
// Public --------------------------------------------------------
public int getConnectTimeoutMillis() { public int getConnectTimeoutMillis() {
return connectTimeoutMillis; return connectTimeoutMillis;
} }
@ -976,14 +967,6 @@ public class NettyConnector extends AbstractConnector {
this.connectTimeoutMillis = connectTimeoutMillis; this.connectTimeoutMillis = connectTimeoutMillis;
} }
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
// Inner classes -------------------------------------------------
private static final class ActiveMQClientChannelHandler extends ActiveMQChannelHandler { private static final class ActiveMQClientChannelHandler extends ActiveMQChannelHandler {
ActiveMQClientChannelHandler(final ChannelGroup group, ActiveMQClientChannelHandler(final ChannelGroup group,

View File

@ -241,7 +241,6 @@ public class SSLSupport {
return supportedSuites.delete(supportedSuites.length() - 2, supportedSuites.length()).toString(); return supportedSuites.delete(supportedSuites.length() - 2, supportedSuites.length()).toString();
} }
// Private -------------------------------------------------------
private TrustManagerFactory loadTrustManagerFactory() throws Exception { private TrustManagerFactory loadTrustManagerFactory() throws Exception {
if (trustManagerFactoryPlugin != null) { if (trustManagerFactoryPlugin != null) {
return AccessController.doPrivileged((PrivilegedAction<TrustManagerFactory>) () -> ((TrustManagerFactoryPlugin) ClassloadingUtil.newInstanceFromClassLoader(SSLSupport.class, trustManagerFactoryPlugin)).getTrustManagerFactory()); return AccessController.doPrivileged((PrivilegedAction<TrustManagerFactory>) () -> ((TrustManagerFactoryPlugin) ClassloadingUtil.newInstanceFromClassLoader(SSLSupport.class, trustManagerFactoryPlugin)).getTrustManagerFactory());

View File

@ -39,7 +39,6 @@ public class XidImpl implements Xid, Serializable {
private boolean hashCalculated; private boolean hashCalculated;
// Static --------------------------------------------------------
public static String toBase64String(final Xid xid) { public static String toBase64String(final Xid xid) {
byte[] data = XidImpl.toByteArray(xid); byte[] data = XidImpl.toByteArray(xid);
@ -62,7 +61,7 @@ public class XidImpl implements Xid, Serializable {
return hashBytes; return hashBytes;
} }
// Constructors --------------------------------------------------
/** /**
* Standard constructor * Standard constructor
@ -88,8 +87,6 @@ public class XidImpl implements Xid, Serializable {
globalTransactionId = copyBytes(other.getGlobalTransactionId()); globalTransactionId = copyBytes(other.getGlobalTransactionId());
} }
// Xid implementation ------------------------------------------------------------------
@Override @Override
public byte[] getBranchQualifier() { public byte[] getBranchQualifier() {
return branchQualifier; return branchQualifier;
@ -105,8 +102,6 @@ public class XidImpl implements Xid, Serializable {
return globalTransactionId; return globalTransactionId;
} }
// Public -------------------------------------------------------------------------------
@Override @Override
public int hashCode() { public int hashCode() {
if (!hashCalculated) { if (!hashCalculated) {
@ -160,7 +155,6 @@ public class XidImpl implements Xid, Serializable {
" base64:" + toBase64String(this); " base64:" + toBase64String(this);
} }
// Private -------------------------------------------------------------------------------
private String stringRep(final byte[] bytes) { private String stringRep(final byte[] bytes) {
StringBuffer buff = new StringBuffer(); StringBuffer buff = new StringBuffer();

View File

@ -37,7 +37,7 @@ public class VersionImpl implements Version, Serializable {
private final int[] compatibleVersionList; private final int[] compatibleVersionList;
// Constructors --------------------------------------------------
public VersionImpl(final String versionName, public VersionImpl(final String versionName,
final int majorVersion, final int majorVersion,

View File

@ -29,16 +29,9 @@ public class ActiveMQBufferInputStream extends InputStream {
/* (non-Javadoc) /* (non-Javadoc)
* @see java.io.InputStream#read() * @see java.io.InputStream#read()
*/ */
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
private ActiveMQBuffer bb; private ActiveMQBuffer bb;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
public ActiveMQBufferInputStream(final ActiveMQBuffer paramByteBuffer) { public ActiveMQBufferInputStream(final ActiveMQBuffer paramByteBuffer) {
bb = paramByteBuffer; bb = paramByteBuffer;
@ -137,12 +130,6 @@ public class ActiveMQBufferInputStream extends InputStream {
return false; return false;
} }
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
/** /**
* @return * @return
*/ */
@ -150,6 +137,4 @@ public class ActiveMQBufferInputStream extends InputStream {
return bb.writerIndex() - bb.readerIndex(); return bb.writerIndex() - bb.readerIndex();
} }
// Inner classes -------------------------------------------------
} }

View File

@ -24,9 +24,6 @@ import javax.naming.NamingException;
import java.util.StringTokenizer; import java.util.StringTokenizer;
public class JNDIUtil { public class JNDIUtil {
// Constants -----------------------------------------------------
// Static --------------------------------------------------------
/** /**
* Create a context path recursively. * Create a context path recursively.
@ -89,17 +86,4 @@ public class JNDIUtil {
} }
} }
// Attributes ----------------------------------------------------
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
// Inner classes -------------------------------------------------
} }

View File

@ -30,7 +30,6 @@ import java.util.List;
public class ObjectInputStreamWithClassLoader extends ObjectInputStream { public class ObjectInputStreamWithClassLoader extends ObjectInputStream {
// Constants ------------------------------------------------------------------------------------
/** /**
* Value used to indicate that all classes should be white or black listed, * Value used to indicate that all classes should be white or black listed,
@ -40,14 +39,10 @@ public class ObjectInputStreamWithClassLoader extends ObjectInputStream {
public static final String WHITELIST_PROPERTY = "org.apache.activemq.artemis.jms.deserialization.whitelist"; public static final String WHITELIST_PROPERTY = "org.apache.activemq.artemis.jms.deserialization.whitelist";
public static final String BLACKLIST_PROPERTY = "org.apache.activemq.artemis.jms.deserialization.blacklist"; public static final String BLACKLIST_PROPERTY = "org.apache.activemq.artemis.jms.deserialization.blacklist";
// Attributes -----------------------------------------------------------------------------------
private List<String> whiteList = new ArrayList<>(); private List<String> whiteList = new ArrayList<>();
private List<String> blackList = new ArrayList<>(); private List<String> blackList = new ArrayList<>();
// Static ---------------------------------------------------------------------------------------
// Constructors ---------------------------------------------------------------------------------
public ObjectInputStreamWithClassLoader(final InputStream in) throws IOException { public ObjectInputStreamWithClassLoader(final InputStream in) throws IOException {
super(in); super(in);
@ -58,8 +53,6 @@ public class ObjectInputStreamWithClassLoader extends ObjectInputStream {
setBlackList(blackList); setBlackList(blackList);
} }
// Public ---------------------------------------------------------------------------------------
/** /**
* @return the whiteList configured on this policy instance. * @return the whiteList configured on this policy instance.
*/ */
@ -98,10 +91,6 @@ public class ObjectInputStreamWithClassLoader extends ObjectInputStream {
this.blackList = StringUtil.splitStringList(blackList, ","); this.blackList = StringUtil.splitStringList(blackList, ",");
} }
// Package protected ----------------------------------------------------------------------------
// Protected ------------------------------------------------------------------------------------
@Override @Override
protected Class resolveClass(final ObjectStreamClass desc) throws IOException, ClassNotFoundException { protected Class resolveClass(final ObjectStreamClass desc) throws IOException, ClassNotFoundException {
if (System.getSecurityManager() == null) { if (System.getSecurityManager() == null) {
@ -138,7 +127,6 @@ public class ObjectInputStreamWithClassLoader extends ObjectInputStream {
} }
} }
// Private --------------------------------------------------------------------------------------
private Class resolveClass0(final ObjectStreamClass desc) throws IOException, ClassNotFoundException { private Class resolveClass0(final ObjectStreamClass desc) throws IOException, ClassNotFoundException {
String name = desc.getName(); String name = desc.getName();
@ -273,6 +261,4 @@ public class ObjectInputStreamWithClassLoader extends ObjectInputStream {
return false; return false;
} }
// Inner classes --------------------------------------------------------------------------------
} }

View File

@ -18,7 +18,6 @@ package org.apache.activemq.artemis.utils;
public class SizeFormatterUtil { public class SizeFormatterUtil {
// Constants -----------------------------------------------------
private static long oneKiB = 1024; private static long oneKiB = 1024;
@ -26,10 +25,6 @@ public class SizeFormatterUtil {
private static long oneGiB = SizeFormatterUtil.oneMiB * 1024; private static long oneGiB = SizeFormatterUtil.oneMiB * 1024;
// Attributes ----------------------------------------------------
// Static --------------------------------------------------------
public static String sizeof(final long size) { public static String sizeof(final long size) {
double s = Long.valueOf(size).doubleValue(); double s = Long.valueOf(size).doubleValue();
String suffix = "B"; String suffix = "B";
@ -45,16 +40,4 @@ public class SizeFormatterUtil {
} }
return String.format("%.2f %s", s, suffix); return String.format("%.2f %s", s, suffix);
} }
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
// Inner classes -------------------------------------------------
} }

View File

@ -44,25 +44,19 @@ public class SoftValueLongObjectHashMap<V extends SoftValueLongObjectHashMap.Val
private int maxElements; private int maxElements;
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
// Static --------------------------------------------------------
public interface ValueCache { public interface ValueCache {
boolean isLive(); boolean isLive();
} }
// Constructors --------------------------------------------------
public SoftValueLongObjectHashMap(final int maxElements) { public SoftValueLongObjectHashMap(final int maxElements) {
this.maxElements = maxElements; this.maxElements = maxElements;
} }
// Public --------------------------------------------------------
public void setMaxElements(final int maxElements) { public void setMaxElements(final int maxElements) {
this.maxElements = maxElements; this.maxElements = maxElements;
checkCacheSize(); checkCacheSize();
@ -336,12 +330,6 @@ public class SoftValueLongObjectHashMap<V extends SoftValueLongObjectHashMap.Val
return mapDelegate.hashCode(); return mapDelegate.hashCode();
} }
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
private void processQueue() { private void processQueue() {
AggregatedSoftReference ref; AggregatedSoftReference ref;
@ -355,8 +343,6 @@ public class SoftValueLongObjectHashMap<V extends SoftValueLongObjectHashMap.Val
return new AggregatedSoftReference(key, value, refQueue); return new AggregatedSoftReference(key, value, refQueue);
} }
// Inner classes -------------------------------------------------
static final class AggregatedSoftReference<V> extends SoftReference<V> { static final class AggregatedSoftReference<V> extends SoftReference<V> {
final long key; final long key;

View File

@ -25,7 +25,7 @@ import java.util.concurrent.atomic.AtomicLong;
* </p> * </p>
*/ */
public class TimeAndCounterIDGenerator implements IDGenerator { public class TimeAndCounterIDGenerator implements IDGenerator {
// Constants ----------------------------------------------------
/** /**
* Bits to move the date accordingly to MASK_TIME * Bits to move the date accordingly to MASK_TIME
@ -40,7 +40,6 @@ public class TimeAndCounterIDGenerator implements IDGenerator {
private static final long TIME_ID_MASK = 0x7fffffffff000000L; private static final long TIME_ID_MASK = 0x7fffffffff000000L;
// Attributes ----------------------------------------------------
private final AtomicLong counter = new AtomicLong(0); private final AtomicLong counter = new AtomicLong(0);
@ -48,17 +47,12 @@ public class TimeAndCounterIDGenerator implements IDGenerator {
private volatile long tmMark; private volatile long tmMark;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public TimeAndCounterIDGenerator() { public TimeAndCounterIDGenerator() {
refresh(); refresh();
} }
// Public --------------------------------------------------------
// Public --------------------------------------------------------
@Override @Override
public long generateID() { public long generateID() {
@ -136,12 +130,6 @@ public class TimeAndCounterIDGenerator implements IDGenerator {
")"; ")";
} }
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
private long newTM() { private long newTM() {
return (System.currentTimeMillis() & TimeAndCounterIDGenerator.MASK_TIME) << TimeAndCounterIDGenerator.BITS_TO_MOVE; return (System.currentTimeMillis() & TimeAndCounterIDGenerator.MASK_TIME) << TimeAndCounterIDGenerator.BITS_TO_MOVE;
} }

View File

@ -392,6 +392,4 @@ public final class XMLUtil {
}); });
} }
// Inner classes --------------------------------------------------------------------------------
} }

View File

@ -23,11 +23,6 @@ import org.apache.activemq.artemis.core.transaction.impl.XidImpl;
public class XidCodecSupport { public class XidCodecSupport {
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
// Static --------------------------------------------------------
public static void encodeXid(final Xid xid, final ActiveMQBuffer out) { public static void encodeXid(final Xid xid, final ActiveMQBuffer out) {
out.writeInt(xid.getFormatId()); out.writeInt(xid.getFormatId());
@ -50,15 +45,4 @@ public class XidCodecSupport {
return DataConstants.SIZE_INT * 3 + xid.getBranchQualifier().length + xid.getGlobalTransactionId().length; return DataConstants.SIZE_INT * 3 + xid.getBranchQualifier().length + xid.getGlobalTransactionId().length;
} }
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
// Inner classes -------------------------------------------------
} }

View File

@ -26,16 +26,6 @@ import org.junit.Test;
public class TimeAndCounterIDGeneratorTest extends Assert { public class TimeAndCounterIDGeneratorTest extends Assert {
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
@Test @Test
public void testCalculation() { public void testCalculation() {
TimeAndCounterIDGenerator seq = new TimeAndCounterIDGenerator(); TimeAndCounterIDGenerator seq = new TimeAndCounterIDGenerator();

View File

@ -25,9 +25,7 @@ import org.w3c.dom.Node;
import org.w3c.dom.NodeList; import org.w3c.dom.NodeList;
public class XMLUtilTest extends SilentTestCase { public class XMLUtilTest extends SilentTestCase {
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
@Test @Test
public void testGetTextContext_1() throws Exception { public void testGetTextContext_1() throws Exception {

View File

@ -58,14 +58,11 @@ import static org.apache.activemq.artemis.reader.BytesMessageUtil.bytesWriteUTF;
*/ */
public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessage { public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessage {
// Static -------------------------------------------------------
public static final byte TYPE = Message.BYTES_TYPE; public static final byte TYPE = Message.BYTES_TYPE;
// Attributes ----------------------------------------------------
private int bodyLength; private int bodyLength;
// Constructor ---------------------------------------------------
/** /**
* This constructor is used to construct messages prior to sending * This constructor is used to construct messages prior to sending
@ -352,7 +349,6 @@ public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessag
reset(); reset();
} }
// Public --------------------------------------------------------
@Override @Override
public byte getType() { public byte getType() {

View File

@ -66,7 +66,7 @@ import org.apache.activemq.artemis.utils.collections.ConcurrentHashSet;
*/ */
public class ActiveMQConnection extends ActiveMQConnectionForContextImpl implements TopicConnection, QueueConnection { public class ActiveMQConnection extends ActiveMQConnectionForContextImpl implements TopicConnection, QueueConnection {
// Constants ------------------------------------------------------------------------------------
public static final int TYPE_GENERIC_CONNECTION = 0; public static final int TYPE_GENERIC_CONNECTION = 0;
public static final int TYPE_QUEUE_CONNECTION = 1; public static final int TYPE_QUEUE_CONNECTION = 1;
@ -79,9 +79,6 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme
public static final SimpleString CONNECTION_ID_PROPERTY_NAME = MessageUtil.CONNECTION_ID_PROPERTY_NAME; public static final SimpleString CONNECTION_ID_PROPERTY_NAME = MessageUtil.CONNECTION_ID_PROPERTY_NAME;
// Static ---------------------------------------------------------------------------------------
// Attributes -----------------------------------------------------------------------------------
private final int connectionType; private final int connectionType;
@ -137,7 +134,6 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme
private final ConnectionFactoryOptions options; private final ConnectionFactoryOptions options;
// Constructors ---------------------------------------------------------------------------------
public ActiveMQConnection(final ConnectionFactoryOptions options, public ActiveMQConnection(final ConnectionFactoryOptions options,
final String username, final String username,
@ -502,8 +498,6 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme
return null; // we offer RA return null; // we offer RA
} }
// Public ---------------------------------------------------------------------------------------
/** /**
* Sets a FailureListener for the session which is notified if a failure occurs on the session. * Sets a FailureListener for the session which is notified if a failure occurs on the session.
* *
@ -563,12 +557,6 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme
return initialSession; return initialSession;
} }
// Package protected ----------------------------------------------------------------------------
// Protected ------------------------------------------------------------------------------------
// In case the user forgets to close the connection manually
@Override @Override
protected final void finalize() throws Throwable { protected final void finalize() throws Throwable {
if (!closed) { if (!closed) {
@ -638,7 +626,6 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme
return sessionFactory; return sessionFactory;
} }
// Private --------------------------------------------------------------------------------------
/** /**
* @param transacted * @param transacted
@ -714,8 +701,6 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme
} }
// Inner classes --------------------------------------------------------------------------------
private static class JMSFailureListener implements SessionFailureListener { private static class JMSFailureListener implements SessionFailureListener {
private final WeakReference<ActiveMQConnection> connectionRef; private final WeakReference<ActiveMQConnection> connectionRef;

View File

@ -868,10 +868,6 @@ public class ActiveMQConnectionFactory extends JNDIStorable implements Connectio
return JMSFactoryType.CF.intValue(); return JMSFactoryType.CF.intValue();
} }
// Package protected ----------------------------------------------------------------------------
// Protected ------------------------------------------------------------------------------------
protected synchronized ActiveMQConnection createConnectionInternal(final String username, protected synchronized ActiveMQConnection createConnectionInternal(final String username,
final String password, final String password,
final boolean isXA, final boolean isXA,
@ -947,7 +943,6 @@ public class ActiveMQConnectionFactory extends JNDIStorable implements Connectio
"]"; "]";
} }
// Private --------------------------------------------------------------------------------------
private void checkWrite() { private void checkWrite() {
if (readOnly) { if (readOnly) {

View File

@ -49,17 +49,13 @@ public class ActiveMQConnectionMetaData implements ConnectionMetaData {
JMS_MINOR_VERSION = Integer.valueOf(versionProps.getProperty("activemq.version.implementation.minorVersion", "0")); JMS_MINOR_VERSION = Integer.valueOf(versionProps.getProperty("activemq.version.implementation.minorVersion", "0"));
} }
// Constants -----------------------------------------------------
private static final String ACTIVEMQ = "ActiveMQ"; private static final String ACTIVEMQ = "ActiveMQ";
// Static --------------------------------------------------------
// Attributes ----------------------------------------------------
private final Version serverVersion; private final Version serverVersion;
// Constructors --------------------------------------------------
/** /**
* Create a new ActiveMQConnectionMetaData object. * Create a new ActiveMQConnectionMetaData object.

View File

@ -37,9 +37,7 @@ import org.apache.activemq.artemis.utils.DestinationUtil;
* ActiveMQ Artemis implementation of a JMS Destination. * ActiveMQ Artemis implementation of a JMS Destination.
*/ */
public class ActiveMQDestination extends JNDIStorable implements Destination, Serializable { public class ActiveMQDestination extends JNDIStorable implements Destination, Serializable {
// Constants -----------------------------------------------------
// Static --------------------------------------------------------
private static final long serialVersionUID = 5027962425462382883L; private static final long serialVersionUID = 5027962425462382883L;
@ -292,7 +290,6 @@ public class ActiveMQDestination extends JNDIStorable implements Destination, Se
return createTemporaryTopic(address, null); return createTemporaryTopic(address, null);
} }
// Attributes ----------------------------------------------------
/** /**
* The core address * The core address
@ -318,7 +315,7 @@ public class ActiveMQDestination extends JNDIStorable implements Destination, Se
private final transient ActiveMQSession session; private final transient ActiveMQSession session;
private transient boolean created; private transient boolean created;
// Constructors --------------------------------------------------
protected ActiveMQDestination(final String address, protected ActiveMQDestination(final String address,
final TYPE type, final TYPE type,
@ -428,7 +425,6 @@ public class ActiveMQDestination extends JNDIStorable implements Destination, Se
return queue; return queue;
} }
// Public --------------------------------------------------------
public String getAddress() { public String getAddress() {
return simpleAddress != null ? simpleAddress.toString() : null; return simpleAddress != null ? simpleAddress.toString() : null;
@ -512,14 +508,6 @@ public class ActiveMQDestination extends JNDIStorable implements Destination, Se
props.put("address", getAddress()); props.put("address", getAddress());
} }
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
// Inner classes -------------------------------------------------
public enum TYPE { public enum TYPE {
QUEUE, QUEUE,
TOPIC, TOPIC,

View File

@ -37,19 +37,14 @@ import static org.apache.activemq.artemis.reader.MapMessageUtil.writeBodyMap;
* ActiveMQ Artemis implementation of a JMS MapMessage. * ActiveMQ Artemis implementation of a JMS MapMessage.
*/ */
public class ActiveMQMapMessage extends ActiveMQMessage implements MapMessage { public class ActiveMQMapMessage extends ActiveMQMessage implements MapMessage {
// Constants -----------------------------------------------------
public static final byte TYPE = Message.MAP_TYPE; public static final byte TYPE = Message.MAP_TYPE;
// Attributes ----------------------------------------------------
private final TypedProperties map = new TypedProperties(); private final TypedProperties map = new TypedProperties();
private boolean invalid; private boolean invalid;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
/* /*
* This constructor is used to construct messages prior to sending * This constructor is used to construct messages prior to sending
@ -89,7 +84,6 @@ public class ActiveMQMapMessage extends ActiveMQMessage implements MapMessage {
} }
} }
// Public --------------------------------------------------------
@Override @Override
public byte getType() { public byte getType() {
@ -335,11 +329,8 @@ public class ActiveMQMapMessage extends ActiveMQMessage implements MapMessage {
readBodyMap(message.getBodyBuffer(), map); readBodyMap(message.getBodyBuffer(), map);
} }
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
/** /**
* Check the name * Check the name

View File

@ -63,7 +63,6 @@ import static org.apache.activemq.artemis.jms.client.ActiveMQDestination.TOPIC_Q
*/ */
public class ActiveMQMessage implements javax.jms.Message { public class ActiveMQMessage implements javax.jms.Message {
// Constants -----------------------------------------------------
public static final byte TYPE = org.apache.activemq.artemis.api.core.Message.DEFAULT_TYPE; public static final byte TYPE = org.apache.activemq.artemis.api.core.Message.DEFAULT_TYPE;
public static final SimpleString OLD_QUEUE_QUALIFIED_PREFIX = SimpleString.toSimpleString(ActiveMQDestination.QUEUE_QUALIFIED_PREFIX + PacketImpl.OLD_QUEUE_PREFIX); public static final SimpleString OLD_QUEUE_QUALIFIED_PREFIX = SimpleString.toSimpleString(ActiveMQDestination.QUEUE_QUALIFIED_PREFIX + PacketImpl.OLD_QUEUE_PREFIX);
@ -110,7 +109,6 @@ public class ActiveMQMessage implements javax.jms.Message {
return jmsdata; return jmsdata;
} }
// Static --------------------------------------------------------
private static final HashSet<String> reservedIdentifiers = new HashSet<>(); private static final HashSet<String> reservedIdentifiers = new HashSet<>();
@ -172,7 +170,6 @@ public class ActiveMQMessage implements javax.jms.Message {
return msg; return msg;
} }
// Attributes ----------------------------------------------------
// The underlying message // The underlying message
protected ClientMessage message; protected ClientMessage message;
@ -206,7 +203,6 @@ public class ActiveMQMessage implements javax.jms.Message {
private long jmsDeliveryTime; private long jmsDeliveryTime;
// Constructors --------------------------------------------------
/* /*
* Create a new message prior to sending * Create a new message prior to sending
@ -771,7 +767,6 @@ public class ActiveMQMessage implements javax.jms.Message {
return message.getBodySize() == 0; return message.getBodySize() == 0;
} }
// Public --------------------------------------------------------
public void setIndividualAcknowledge() { public void setIndividualAcknowledge() {
this.individualAck = true; this.individualAck = true;
@ -865,9 +860,7 @@ public class ActiveMQMessage implements javax.jms.Message {
return sb.toString(); return sb.toString();
} }
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
protected void checkWrite() throws JMSException { protected void checkWrite() throws JMSException {
if (readOnly) { if (readOnly) {
@ -881,8 +874,6 @@ public class ActiveMQMessage implements javax.jms.Message {
} }
} }
// Private ------------------------------------------------------------
private void checkStream() throws JMSException { private void checkStream() throws JMSException {
if (!(message.getType() == ActiveMQBytesMessage.TYPE || message.getType() == ActiveMQStreamMessage.TYPE)) { if (!(message.getType() == ActiveMQBytesMessage.TYPE || message.getType() == ActiveMQStreamMessage.TYPE)) {
throw ActiveMQJMSClientBundle.BUNDLE.onlyValidForByteOrStreamMessages(); throw ActiveMQJMSClientBundle.BUNDLE.onlyValidForByteOrStreamMessages();
@ -948,5 +939,4 @@ public class ActiveMQMessage implements javax.jms.Message {
} }
} }
// Inner classes -------------------------------------------------
} }

View File

@ -66,7 +66,7 @@ public final class ActiveMQMessageConsumer implements QueueReceiver, TopicSubscr
private final SimpleString autoDeleteQueueName; private final SimpleString autoDeleteQueueName;
// Constructors --------------------------------------------------
protected ActiveMQMessageConsumer(final ConnectionFactoryOptions options, protected ActiveMQMessageConsumer(final ConnectionFactoryOptions options,
final ActiveMQConnection connection, final ActiveMQConnection connection,
@ -180,7 +180,6 @@ public final class ActiveMQMessageConsumer implements QueueReceiver, TopicSubscr
return noLocal; return noLocal;
} }
// Public --------------------------------------------------------
@Override @Override
public String toString() { public String toString() {
@ -191,11 +190,8 @@ public final class ActiveMQMessageConsumer implements QueueReceiver, TopicSubscr
return consumer.isClosed(); return consumer.isClosed();
} }
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
private void checkClosed() throws JMSException { private void checkClosed() throws JMSException {
if (consumer.isClosed() || session.getCoreSession().isClosed()) { if (consumer.isClosed() || session.getCoreSession().isClosed()) {
@ -265,6 +261,4 @@ public final class ActiveMQMessageConsumer implements QueueReceiver, TopicSubscr
} }
} }
// Inner classes -------------------------------------------------
} }

View File

@ -72,7 +72,6 @@ public class ActiveMQMessageProducer implements MessageProducer, QueueSender, To
private long defaultDeliveryDelay = Message.DEFAULT_DELIVERY_DELAY; private long defaultDeliveryDelay = Message.DEFAULT_DELIVERY_DELAY;
private final ActiveMQDestination defaultDestination; private final ActiveMQDestination defaultDestination;
// Constructors --------------------------------------------------
protected ActiveMQMessageProducer(final ActiveMQConnection connection, protected ActiveMQMessageProducer(final ActiveMQConnection connection,
final ClientProducer producer, final ClientProducer producer,
@ -326,7 +325,6 @@ public class ActiveMQMessageProducer implements MessageProducer, QueueSender, To
return (Queue) getDestination(); return (Queue) getDestination();
} }
// Public --------------------------------------------------------
@Override @Override
public String toString() { public String toString() {

View File

@ -38,20 +38,16 @@ import org.apache.activemq.artemis.utils.ObjectInputStreamWithClassLoader;
* Serialization is slooooow! * Serialization is slooooow!
*/ */
public class ActiveMQObjectMessage extends ActiveMQMessage implements ObjectMessage { public class ActiveMQObjectMessage extends ActiveMQMessage implements ObjectMessage {
// Constants -----------------------------------------------------
public static final byte TYPE = Message.OBJECT_TYPE; public static final byte TYPE = Message.OBJECT_TYPE;
// Attributes ----------------------------------------------------
// keep a snapshot of the Serializable Object as a byte[] to provide Object isolation // keep a snapshot of the Serializable Object as a byte[] to provide Object isolation
private byte[] data; private byte[] data;
private final ConnectionFactoryOptions options; private final ConnectionFactoryOptions options;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
protected ActiveMQObjectMessage(final ClientSession session, ConnectionFactoryOptions options) { protected ActiveMQObjectMessage(final ClientSession session, ConnectionFactoryOptions options) {
super(ActiveMQObjectMessage.TYPE, session); super(ActiveMQObjectMessage.TYPE, session);
@ -77,7 +73,6 @@ public class ActiveMQObjectMessage extends ActiveMQMessage implements ObjectMess
this.options = options; this.options = options;
} }
// Public --------------------------------------------------------
@Override @Override
public byte getType() { public byte getType() {

View File

@ -27,14 +27,9 @@ import org.apache.activemq.artemis.api.core.SimpleString;
*/ */
public class ActiveMQQueue extends ActiveMQDestination implements Queue { public class ActiveMQQueue extends ActiveMQDestination implements Queue {
// Constants -----------------------------------------------------
private static final long serialVersionUID = -1106092883162295462L; private static final long serialVersionUID = -1106092883162295462L;
// Static --------------------------------------------------------
// Attributes ----------------------------------------------------
// Constructors --------------------------------------------------
public ActiveMQQueue() { public ActiveMQQueue() {
this((SimpleString) null); this((SimpleString) null);
} }
@ -68,7 +63,6 @@ public class ActiveMQQueue extends ActiveMQDestination implements Queue {
// Queue implementation ------------------------------------------ // Queue implementation ------------------------------------------
// Public --------------------------------------------------------
@Override @Override
public String getQueueName() { public String getQueueName() {
@ -100,11 +94,5 @@ public class ActiveMQQueue extends ActiveMQDestination implements Queue {
return super.getAddress().hashCode(); return super.getAddress().hashCode();
} }
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
// Inner classes -------------------------------------------------
} }

View File

@ -34,11 +34,7 @@ import org.apache.activemq.artemis.utils.SelectorTranslator;
* ActiveMQ Artemis implementation of a JMS QueueBrowser. * ActiveMQ Artemis implementation of a JMS QueueBrowser.
*/ */
public final class ActiveMQQueueBrowser implements QueueBrowser { public final class ActiveMQQueueBrowser implements QueueBrowser {
// Constants ------------------------------------------------------------------------------------
// Static ---------------------------------------------------------------------------------------
// Attributes -----------------------------------------------------------------------------------
private final ConnectionFactoryOptions options; private final ConnectionFactoryOptions options;
@ -52,7 +48,7 @@ public final class ActiveMQQueueBrowser implements QueueBrowser {
private final boolean enable1xPrefixes; private final boolean enable1xPrefixes;
// Constructors ---------------------------------------------------------------------------------
protected ActiveMQQueueBrowser(final ConnectionFactoryOptions options, protected ActiveMQQueueBrowser(final ConnectionFactoryOptions options,
final ActiveMQQueue queue, final ActiveMQQueue queue,
@ -105,21 +101,12 @@ public final class ActiveMQQueueBrowser implements QueueBrowser {
return queue; return queue;
} }
// Public ---------------------------------------------------------------------------------------
@Override @Override
public String toString() { public String toString() {
return "ActiveMQQueueBrowser->" + consumer; return "ActiveMQQueueBrowser->" + consumer;
} }
// Package protected ----------------------------------------------------------------------------
// Protected ------------------------------------------------------------------------------------
// Private --------------------------------------------------------------------------------------
// Inner classes --------------------------------------------------------------------------------
private final class BrowserEnumeration implements Enumeration<ActiveMQMessage> { private final class BrowserEnumeration implements Enumeration<ActiveMQMessage> {
ClientMessage current = null; ClientMessage current = null;

View File

@ -120,7 +120,6 @@ public class ActiveMQSession implements QueueSession, TopicSession {
private final Map<String, Queue> queueCache = new ConcurrentHashMap<>(); private final Map<String, Queue> queueCache = new ConcurrentHashMap<>();
// Constructors --------------------------------------------------
protected ActiveMQSession(final ConnectionFactoryOptions options, protected ActiveMQSession(final ConnectionFactoryOptions options,
final ActiveMQConnection connection, final ActiveMQConnection connection,
@ -1139,7 +1138,6 @@ public class ActiveMQSession implements QueueSession, TopicSession {
return (TopicSession) getSession(); return (TopicSession) getSession();
} }
// Public --------------------------------------------------------
@Override @Override
public String toString() { public String toString() {
@ -1237,8 +1235,6 @@ public class ActiveMQSession implements QueueSession, TopicSession {
return enable1xPrefixes; return enable1xPrefixes;
} }
// Package protected ---------------------------------------------
void deleteQueue(final SimpleString queueName) throws JMSException { void deleteQueue(final SimpleString queueName) throws JMSException {
if (!session.isClosed()) { if (!session.isClosed()) {
try { try {
@ -1253,8 +1249,6 @@ public class ActiveMQSession implements QueueSession, TopicSession {
return connection; return connection;
} }
// Protected -----------------------------------------------------
void checkClosed() throws JMSException { void checkClosed() throws JMSException {
if (session.isClosed()) { if (session.isClosed()) {
@ -1280,7 +1274,6 @@ public class ActiveMQSession implements QueueSession, TopicSession {
session.createQueue(queueConfiguration.setName(queueName).setAddress(destination.getAddress()).setAutoCreated(autoCreated).setDurable(durable)); session.createQueue(queueConfiguration.setName(queueName).setAddress(destination.getAddress()).setAutoCreated(autoCreated).setDurable(durable));
} }
// Private -------------------------------------------------------
private ActiveMQQueue lookupQueue(final String queueName, boolean isTemporary) throws ActiveMQException { private ActiveMQQueue lookupQueue(final String queueName, boolean isTemporary) throws ActiveMQException {
@ -1337,6 +1330,5 @@ public class ActiveMQSession implements QueueSession, TopicSession {
return topic; return topic;
} }
} }
// Inner classes -------------------------------------------------
} }

View File

@ -76,7 +76,6 @@ public class ActiveMQStreamMessage extends ActiveMQMessage implements StreamMess
message = new ClientMessageImpl((byte) 0, false, 0, 0, (byte) 4, 1500, null); message = new ClientMessageImpl((byte) 0, false, 0, 0, (byte) 4, 1500, null);
} }
// Public --------------------------------------------------------
@Override @Override
public byte getType() { public byte getType() {

View File

@ -24,19 +24,13 @@ import javax.jms.TemporaryQueue;
* This class can be instantiated directly. * This class can be instantiated directly.
*/ */
public class ActiveMQTemporaryQueue extends ActiveMQQueue implements TemporaryQueue { public class ActiveMQTemporaryQueue extends ActiveMQQueue implements TemporaryQueue {
// Constants -----------------------------------------------------
private static final long serialVersionUID = -4624930377557954624L; private static final long serialVersionUID = -4624930377557954624L;
// Static --------------------------------------------------------
// Attributes ----------------------------------------------------
// Constructors --------------------------------------------------
// TemporaryQueue implementation ------------------------------------------ // TemporaryQueue implementation ------------------------------------------
// Public --------------------------------------------------------
public ActiveMQTemporaryQueue() { public ActiveMQTemporaryQueue() {
this(null, null); this(null, null);
} }
@ -74,11 +68,5 @@ public class ActiveMQTemporaryQueue extends ActiveMQQueue implements TemporaryQu
return super.getAddress().hashCode(); return super.getAddress().hashCode();
} }
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
// Inner classes -------------------------------------------------
} }

View File

@ -20,15 +20,10 @@ import javax.jms.TemporaryTopic;
public class ActiveMQTemporaryTopic extends ActiveMQTopic implements TemporaryTopic { public class ActiveMQTemporaryTopic extends ActiveMQTopic implements TemporaryTopic {
// Constants -----------------------------------------------------
private static final long serialVersionUID = 845450764835635266L; private static final long serialVersionUID = 845450764835635266L;
// Attributes ----------------------------------------------------
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public ActiveMQTemporaryTopic() { public ActiveMQTemporaryTopic() {
this(null, null); this(null, null);
} }
@ -37,7 +32,6 @@ public class ActiveMQTemporaryTopic extends ActiveMQTopic implements TemporaryTo
super(address, true, session); super(address, true, session);
} }
// Public --------------------------------------------------------
@Override @Override
public boolean equals(final Object o) { public boolean equals(final Object o) {
@ -59,12 +53,4 @@ public class ActiveMQTemporaryTopic extends ActiveMQTopic implements TemporaryTo
return super.getAddress().hashCode(); return super.getAddress().hashCode();
} }
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
// Inner classes -------------------------------------------------
} }

View File

@ -34,19 +34,14 @@ import static org.apache.activemq.artemis.reader.TextMessageUtil.writeBodyText;
* This class was ported from SpyTextMessage in JBossMQ. * This class was ported from SpyTextMessage in JBossMQ.
*/ */
public class ActiveMQTextMessage extends ActiveMQMessage implements TextMessage { public class ActiveMQTextMessage extends ActiveMQMessage implements TextMessage {
// Constants -----------------------------------------------------
public static final byte TYPE = Message.TEXT_TYPE; public static final byte TYPE = Message.TEXT_TYPE;
// Attributes ----------------------------------------------------
// We cache it locally - it's more performant to cache as a SimpleString, the AbstractChannelBuffer write // We cache it locally - it's more performant to cache as a SimpleString, the AbstractChannelBuffer write
// methods are more efficient for a SimpleString // methods are more efficient for a SimpleString
private SimpleString text; private SimpleString text;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public ActiveMQTextMessage(final ClientSession session) { public ActiveMQTextMessage(final ClientSession session) {
super(ActiveMQTextMessage.TYPE, session); super(ActiveMQTextMessage.TYPE, session);
@ -65,7 +60,6 @@ public class ActiveMQTextMessage extends ActiveMQMessage implements TextMessage
setText(foreign.getText()); setText(foreign.getText());
} }
// Public --------------------------------------------------------
@Override @Override
public byte getType() { public byte getType() {

View File

@ -26,14 +26,10 @@ import org.apache.activemq.artemis.api.core.SimpleString;
* This class can be instantiated directly. * This class can be instantiated directly.
*/ */
public class ActiveMQTopic extends ActiveMQDestination implements Topic { public class ActiveMQTopic extends ActiveMQDestination implements Topic {
// Constants -----------------------------------------------------
private static final long serialVersionUID = 7873614001276404156L; private static final long serialVersionUID = 7873614001276404156L;
// Static --------------------------------------------------------
// Attributes ----------------------------------------------------
// Constructors --------------------------------------------------
public ActiveMQTopic() { public ActiveMQTopic() {
this((SimpleString) null); this((SimpleString) null);
} }
@ -71,7 +67,6 @@ public class ActiveMQTopic extends ActiveMQDestination implements Topic {
return getName(); return getName();
} }
// Public --------------------------------------------------------
@Override @Override
public String toString() { public String toString() {
@ -98,11 +93,5 @@ public class ActiveMQTopic extends ActiveMQDestination implements Topic {
return super.getAddress().hashCode(); return super.getAddress().hashCode();
} }
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
// Inner classes -------------------------------------------------
} }

View File

@ -26,14 +26,12 @@ public class JMSBridgeControlImpl extends StandardMBean implements JMSBridgeCont
private final JMSBridge bridge; private final JMSBridge bridge;
// Constructors --------------------------------------------------
public JMSBridgeControlImpl(final JMSBridge bridge) throws Exception { public JMSBridgeControlImpl(final JMSBridge bridge) throws Exception {
super(JMSBridgeControl.class); super(JMSBridgeControl.class);
this.bridge = bridge; this.bridge = bridge;
} }
// Public --------------------------------------------------------
@Override @Override
public void pause() throws Exception { public void pause() throws Exception {
@ -207,18 +205,5 @@ public class JMSBridgeControlImpl extends StandardMBean implements JMSBridgeCont
bridge.setTargetUsername(name); bridge.setTargetUsername(name);
} }
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
// Static --------------------------------------------------------
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
// Inner classes -------------------------------------------------
} }

View File

@ -940,10 +940,6 @@ public final class JMSBridgeImpl implements JMSBridge {
this.tm = tm; this.tm = tm;
} }
// Public ---------------------------------------------------------------------------
// Private -------------------------------------------------------------------
private synchronized void checkParams() { private synchronized void checkParams() {
checkNotNull(sourceCff, "sourceCff"); checkNotNull(sourceCff, "sourceCff");
checkNotNull(targetCff, "targetCff"); checkNotNull(targetCff, "targetCff");
@ -1747,8 +1743,6 @@ public final class JMSBridgeImpl implements JMSBridge {
return service; return service;
} }
// Inner classes ---------------------------------------------------------------
/** /**
* We use a Thread which polls the sourceDestination instead of a MessageListener * We use a Thread which polls the sourceDestination instead of a MessageListener
* to ensure that message delivery does not happen concurrently with * to ensure that message delivery does not happen concurrently with

View File

@ -26,9 +26,6 @@ import org.apache.activemq.artemis.utils.DataConstants;
public class PersistedBindings implements EncodingSupport { public class PersistedBindings implements EncodingSupport {
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
private long id; private long id;
@ -38,9 +35,6 @@ public class PersistedBindings implements EncodingSupport {
private ArrayList<String> bindings = new ArrayList<>(); private ArrayList<String> bindings = new ArrayList<>();
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public PersistedBindings() { public PersistedBindings() {
} }
@ -55,7 +49,6 @@ public class PersistedBindings implements EncodingSupport {
this.name = name; this.name = name;
} }
// Public --------------------------------------------------------
@Override @Override
public void decode(ActiveMQBuffer buffer) { public void decode(ActiveMQBuffer buffer) {
type = PersistedType.getType(buffer.readByte()); type = PersistedType.getType(buffer.readByte());
@ -138,12 +131,4 @@ public class PersistedBindings implements EncodingSupport {
bindings.remove(address); bindings.remove(address);
} }
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
// Inner classes -------------------------------------------------
} }

View File

@ -23,9 +23,6 @@ import org.apache.activemq.artemis.jms.server.config.impl.ConnectionFactoryConfi
public class PersistedConnectionFactory implements EncodingSupport { public class PersistedConnectionFactory implements EncodingSupport {
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
private long id; private long id;
@ -43,11 +40,7 @@ public class PersistedConnectionFactory implements EncodingSupport {
this.config = config; this.config = config;
} }
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
/** /**
* @return the id * @return the id
@ -87,12 +80,4 @@ public class PersistedConnectionFactory implements EncodingSupport {
return config.getEncodeSize(); return config.getEncodeSize();
} }
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
// Inner classes -------------------------------------------------
} }

View File

@ -24,9 +24,6 @@ import org.apache.activemq.artemis.utils.DataConstants;
public class PersistedDestination implements EncodingSupport { public class PersistedDestination implements EncodingSupport {
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
private long id; private long id;
@ -37,9 +34,6 @@ public class PersistedDestination implements EncodingSupport {
private String selector; private String selector;
private boolean durable; private boolean durable;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public PersistedDestination() { public PersistedDestination() {
} }
@ -57,15 +51,6 @@ public class PersistedDestination implements EncodingSupport {
this.selector = selector; this.selector = selector;
this.durable = durable; this.durable = durable;
} }
// Public --------------------------------------------------------
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
// Inner classes -------------------------------------------------
public long getId() { public long getId() {
return id; return id;

View File

@ -46,7 +46,7 @@ import org.apache.activemq.artemis.utils.IDGenerator;
public final class JMSJournalStorageManagerImpl implements JMSStorageManager { public final class JMSJournalStorageManagerImpl implements JMSStorageManager {
// Constants -----------------------------------------------------
public static final byte CF_RECORD = 1; public static final byte CF_RECORD = 1;
@ -54,7 +54,6 @@ public final class JMSJournalStorageManagerImpl implements JMSStorageManager {
public static final byte BINDING_RECORD = 3; public static final byte BINDING_RECORD = 3;
// Attributes ----------------------------------------------------
private final IDGenerator idGenerator; private final IDGenerator idGenerator;
@ -72,9 +71,7 @@ public final class JMSJournalStorageManagerImpl implements JMSStorageManager {
private final Configuration config; private final Configuration config;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public JMSJournalStorageManagerImpl(ExecutorFactory ioExecutors, public JMSJournalStorageManagerImpl(ExecutorFactory ioExecutors,
final IDGenerator idGenerator, final IDGenerator idGenerator,
final Configuration config, final Configuration config,
@ -101,7 +98,6 @@ public final class JMSJournalStorageManagerImpl implements JMSStorageManager {
this.idGenerator = idGenerator; this.idGenerator = idGenerator;
} }
// Public --------------------------------------------------------
@Override @Override
public List<PersistedConnectionFactory> recoverConnectionFactories() { public List<PersistedConnectionFactory> recoverConnectionFactories() {
List<PersistedConnectionFactory> cfs = new ArrayList<>(mapFactories.values()); List<PersistedConnectionFactory> cfs = new ArrayList<>(mapFactories.values());
@ -280,11 +276,8 @@ public final class JMSJournalStorageManagerImpl implements JMSStorageManager {
} }
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
private void checkAndCreateDir(final File dir, final boolean create) { private void checkAndCreateDir(final File dir, final boolean create) {
@ -299,6 +292,5 @@ public final class JMSJournalStorageManagerImpl implements JMSStorageManager {
} }
} }
// Inner classes -------------------------------------------------
} }

Some files were not shown because too many files have changed in this diff Show More