activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From martyntay...@apache.org
Subject [19/20] activemq-6 git commit: ACTIVEMQ6-3 Renaming Exception classes and fixing native compilation
Date Tue, 18 Nov 2014 09:24:21 GMT
ACTIVEMQ6-3 Renaming Exception classes and fixing native compilation

https://issues.apache.org/jira/browse/ACTIVEMQ6-3

The Native Layer has some dependencies on the Exception classes so
I had to rename them now in order to fix the native dependencies


Project: http://git-wip-us.apache.org/repos/asf/activemq-6/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-6/commit/1bf2e41f
Tree: http://git-wip-us.apache.org/repos/asf/activemq-6/tree/1bf2e41f
Diff: http://git-wip-us.apache.org/repos/asf/activemq-6/diff/1bf2e41f

Branch: refs/heads/master
Commit: 1bf2e41f23193b1cf53cc15163aab18ff88d1d3b
Parents: fdf1a1a
Author: Clebert Suconic <clebertsuconic@apache.org>
Authored: Mon Nov 17 14:53:12 2014 -0500
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Mon Nov 17 21:31:19 2014 -0500

----------------------------------------------------------------------
 .../core/ActiveMQAddressExistsException.java    |   35 +
 .../api/core/ActiveMQAddressFullException.java  |   35 +
 .../ActiveMQAlreadyReplicatingException.java    |   35 +
 .../activemq/api/core/ActiveMQBuffer.java       | 1084 ++++++++++++++++++
 .../activemq/api/core/ActiveMQBuffers.java      |   96 ++
 .../core/ActiveMQClusterSecurityException.java  |   32 +
 .../ActiveMQConnectionTimedOutException.java    |   35 +
 .../api/core/ActiveMQDisconnectedException.java |   35 +
 .../api/core/ActiveMQDuplicateIdException.java  |   35 +
 .../ActiveMQDuplicateMetaDataException.java     |   35 +
 .../activemq/api/core/ActiveMQException.java    |   76 ++
 .../api/core/ActiveMQExceptionType.java         |  298 +++++
 .../api/core/ActiveMQIOErrorException.java      |   40 +
 .../api/core/ActiveMQIllegalStateException.java |   36 +
 ...tiveMQIncompatibleClientServerException.java |   37 +
 ...iveMQInterceptorRejectedPacketException.java |   37 +
 .../core/ActiveMQInternalErrorException.java    |   45 +
 .../api/core/ActiveMQInterruptedException.java  |   27 +
 ...ctiveMQInvalidFilterExpressionException.java |   35 +
 ...tiveMQInvalidTransientQueueUseException.java |   35 +
 .../api/core/ActiveMQLargeMessageException.java |   35 +
 ...ctiveMQLargeMessageInterruptedException.java |   36 +
 .../api/core/ActiveMQNativeIOError.java         |   35 +
 .../core/ActiveMQNonExistentQueueException.java |   35 +
 .../api/core/ActiveMQNotConnectedException.java |   35 +
 .../api/core/ActiveMQObjectClosedException.java |   36 +
 .../ActiveMQPropertyConversionException.java    |   30 +
 .../api/core/ActiveMQQueueExistsException.java  |   35 +
 .../api/core/ActiveMQSecurityException.java     |   35 +
 .../core/ActiveMQSessionCreationException.java  |   36 +
 ...iveMQTransactionOutcomeUnknownException.java |   35 +
 .../ActiveMQTransactionRolledBackException.java |   35 +
 .../api/core/ActiveMQUnBlockedException.java    |   35 +
 .../ActiveMQUnsupportedPacketException.java     |   35 +
 .../api/core/HornetQAddressExistsException.java |   35 -
 .../api/core/HornetQAddressFullException.java   |   35 -
 .../HornetQAlreadyReplicatingException.java     |   35 -
 .../apache/activemq/api/core/HornetQBuffer.java | 1084 ------------------
 .../activemq/api/core/HornetQBuffers.java       |   96 --
 .../core/HornetQClusterSecurityException.java   |   32 -
 .../HornetQConnectionTimedOutException.java     |   35 -
 .../api/core/HornetQDisconnectedException.java  |   35 -
 .../api/core/HornetQDuplicateIdException.java   |   35 -
 .../core/HornetQDuplicateMetaDataException.java |   35 -
 .../activemq/api/core/HornetQException.java     |   76 --
 .../activemq/api/core/HornetQExceptionType.java |  298 -----
 .../api/core/HornetQIOErrorException.java       |   40 -
 .../api/core/HornetQIllegalStateException.java  |   36 -
 ...ornetQIncompatibleClientServerException.java |   37 -
 ...rnetQInterceptorRejectedPacketException.java |   37 -
 .../api/core/HornetQInternalErrorException.java |   45 -
 .../api/core/HornetQInterruptedException.java   |   27 -
 ...HornetQInvalidFilterExpressionException.java |   35 -
 ...ornetQInvalidTransientQueueUseException.java |   35 -
 .../api/core/HornetQLargeMessageException.java  |   35 -
 ...HornetQLargeMessageInterruptedException.java |   36 -
 .../activemq/api/core/HornetQNativeIOError.java |   35 -
 .../core/HornetQNonExistentQueueException.java  |   35 -
 .../api/core/HornetQNotConnectedException.java  |   35 -
 .../api/core/HornetQObjectClosedException.java  |   36 -
 .../HornetQPropertyConversionException.java     |   30 -
 .../api/core/HornetQQueueExistsException.java   |   35 -
 .../api/core/HornetQSecurityException.java      |   35 -
 .../core/HornetQSessionCreationException.java   |   36 -
 ...rnetQTransactionOutcomeUnknownException.java |   35 -
 .../HornetQTransactionRolledBackException.java  |   35 -
 .../api/core/HornetQUnBlockedException.java     |   35 -
 .../core/HornetQUnsupportedPacketException.java |   35 -
 .../core/buffers/impl/ChannelBufferWrapper.java |   40 +-
 .../activemq/utils/HornetQUtilBundle.java       |    4 +-
 .../activemq/utils/PasswordMaskingUtil.java     |    8 +-
 .../apache/activemq/utils/TypedProperties.java  |   94 +-
 .../org/apache/activemq/utils/UTF8Util.java     |    6 +-
 .../apache/activemq/api/core/Interceptor.java   |    4 +-
 .../org/apache/activemq/api/core/Message.java   |   72 +-
 .../api/core/TransportConfiguration.java        |    4 +-
 .../api/core/client/ClientConsumer.java         |   38 +-
 .../activemq/api/core/client/ClientMessage.java |   26 +-
 .../api/core/client/ClientProducer.java         |   26 +-
 .../activemq/api/core/client/ClientSession.java |  152 +--
 .../api/core/client/ClientSessionFactory.java   |   34 +-
 .../activemq/api/core/client/ServerLocator.java |    2 +-
 .../api/core/client/SessionFailureListener.java |    4 +-
 .../core/management/HornetQServerControl.java   |    6 +-
 .../impl/ResetLimitWrappedHornetQBuffer.java    |   16 +-
 .../core/client/HornetQClientLogger.java        |    4 +-
 .../core/client/HornetQClientMessageBundle.java |   96 +-
 .../core/client/impl/ClientConsumerImpl.java    |   54 +-
 .../client/impl/ClientConsumerInternal.java     |   20 +-
 .../client/impl/ClientLargeMessageImpl.java     |   22 +-
 .../core/client/impl/ClientMessageImpl.java     |   30 +-
 .../core/client/impl/ClientProducerCredits.java |    4 +-
 .../client/impl/ClientProducerCreditsImpl.java  |    4 +-
 .../core/client/impl/ClientProducerImpl.java    |   56 +-
 .../client/impl/ClientSessionFactoryImpl.java   |   64 +-
 .../impl/ClientSessionFactoryInternal.java      |    4 +-
 .../core/client/impl/ClientSessionImpl.java     |  152 +--
 .../core/client/impl/ClientSessionInternal.java |   18 +-
 .../CompressedLargeMessageControllerImpl.java   |   50 +-
 .../core/client/impl/DelegatingSession.java     |   94 +-
 .../client/impl/LargeMessageController.java     |   12 +-
 .../client/impl/LargeMessageControllerImpl.java |   82 +-
 .../core/client/impl/ServerLocatorImpl.java     |   52 +-
 .../core/client/impl/ServerLocatorInternal.java |    8 +-
 .../activemq/core/cluster/DiscoveryGroup.java   |   12 +-
 .../activemq/core/message/BodyEncoder.java      |   12 +-
 .../activemq/core/message/impl/MessageImpl.java |   92 +-
 .../core/message/impl/MessageInternal.java      |   16 +-
 .../core/protocol/ClientPacketDecoder.java      |    4 +-
 .../activemq/core/protocol/core/Channel.java    |    6 +-
 .../activemq/core/protocol/core/Packet.java     |    8 +-
 .../core/protocol/core/impl/ChannelImpl.java    |   22 +-
 .../core/impl/HornetQClientProtocolManager.java |   36 +-
 .../core/impl/HornetQSessionContext.java        |   86 +-
 .../core/protocol/core/impl/PacketDecoder.java  |    4 +-
 .../core/protocol/core/impl/PacketImpl.java     |   12 +-
 .../core/impl/RemotingConnectionImpl.java       |    8 +-
 .../impl/wireformat/CheckFailoverMessage.java   |    6 +-
 .../wireformat/CheckFailoverReplyMessage.java   |    6 +-
 .../ClusterTopologyChangeMessage.java           |    6 +-
 .../ClusterTopologyChangeMessage_V2.java        |    6 +-
 .../ClusterTopologyChangeMessage_V3.java        |    6 +-
 .../impl/wireformat/CreateQueueMessage.java     |    6 +-
 .../impl/wireformat/CreateSessionMessage.java   |    6 +-
 .../CreateSessionResponseMessage.java           |    6 +-
 .../wireformat/CreateSharedQueueMessage.java    |    6 +-
 .../wireformat/DisconnectConsumerMessage.java   |    6 +-
 .../core/impl/wireformat/DisconnectMessage.java |    6 +-
 .../impl/wireformat/DisconnectMessage_V2.java   |    6 +-
 .../wireformat/HornetQExceptionMessage.java     |   18 +-
 .../wireformat/PacketsConfirmedMessage.java     |    6 +-
 .../protocol/core/impl/wireformat/Ping.java     |    6 +-
 .../impl/wireformat/ReattachSessionMessage.java |    6 +-
 .../ReattachSessionResponseMessage.java         |    6 +-
 .../core/impl/wireformat/RollbackMessage.java   |    6 +-
 .../wireformat/SessionAcknowledgeMessage.java   |    6 +-
 .../wireformat/SessionAddMetaDataMessage.java   |    6 +-
 .../wireformat/SessionAddMetaDataMessageV2.java |    6 +-
 .../wireformat/SessionBindingQueryMessage.java  |    6 +-
 .../SessionBindingQueryResponseMessage.java     |    6 +-
 .../wireformat/SessionConsumerCloseMessage.java |    6 +-
 .../SessionConsumerFlowCreditMessage.java       |    6 +-
 .../wireformat/SessionContinuationMessage.java  |    6 +-
 .../SessionCreateConsumerMessage.java           |    6 +-
 .../wireformat/SessionDeleteQueueMessage.java   |    6 +-
 .../impl/wireformat/SessionExpireMessage.java   |    6 +-
 .../SessionForceConsumerDelivery.java           |    6 +-
 .../SessionIndividualAcknowledgeMessage.java    |    6 +-
 .../SessionProducerCreditsFailMessage.java      |    6 +-
 .../SessionProducerCreditsMessage.java          |    6 +-
 .../wireformat/SessionQueueQueryMessage.java    |    6 +-
 .../SessionQueueQueryResponseMessage.java       |    6 +-
 .../SessionReceiveClientLargeMessage.java       |    4 +-
 .../SessionReceiveContinuationMessage.java      |    6 +-
 .../wireformat/SessionReceiveLargeMessage.java  |    6 +-
 .../impl/wireformat/SessionReceiveMessage.java  |    8 +-
 .../SessionRequestProducerCreditsMessage.java   |    6 +-
 .../SessionSendContinuationMessage.java         |    6 +-
 .../wireformat/SessionSendLargeMessage.java     |    6 +-
 .../impl/wireformat/SessionSendMessage.java     |    8 +-
 .../wireformat/SessionXAAfterFailedMessage.java |    6 +-
 .../impl/wireformat/SessionXACommitMessage.java |    6 +-
 .../impl/wireformat/SessionXAEndMessage.java    |    6 +-
 .../impl/wireformat/SessionXAForgetMessage.java |    6 +-
 .../SessionXAGetInDoubtXidsResponseMessage.java |    6 +-
 .../SessionXAGetTimeoutResponseMessage.java     |    6 +-
 .../impl/wireformat/SessionXAJoinMessage.java   |    6 +-
 .../wireformat/SessionXAPrepareMessage.java     |    6 +-
 .../wireformat/SessionXAResponseMessage.java    |    6 +-
 .../impl/wireformat/SessionXAResumeMessage.java |    6 +-
 .../wireformat/SessionXARollbackMessage.java    |    6 +-
 .../wireformat/SessionXASetTimeoutMessage.java  |    6 +-
 .../SessionXASetTimeoutResponseMessage.java     |    6 +-
 .../impl/wireformat/SessionXAStartMessage.java  |    6 +-
 .../SubscribeClusterTopologyUpdatesMessage.java |    6 +-
 ...ubscribeClusterTopologyUpdatesMessageV2.java |    6 +-
 .../activemq/core/remoting/FailureListener.java |    6 +-
 .../impl/netty/HornetQChannelHandler.java       |    6 +-
 .../remoting/impl/netty/NettyConnection.java    |   24 +-
 .../remoting/impl/netty/NettyConnector.java     |    4 +-
 .../apache/activemq/reader/MapMessageUtil.java  |    6 +-
 .../org/apache/activemq/reader/MessageUtil.java |   14 +-
 .../activemq/reader/StreamMessageUtil.java      |   24 +-
 .../apache/activemq/reader/TextMessageUtil.java |    6 +-
 .../protocol/AbstractRemotingConnection.java    |   16 +-
 .../spi/core/protocol/RemotingConnection.java   |   10 +-
 .../spi/core/remoting/BufferDecoder.java        |    6 +-
 .../spi/core/remoting/BufferHandler.java        |    4 +-
 .../core/remoting/ClientProtocolManager.java    |    8 +-
 .../activemq/spi/core/remoting/Connection.java  |   10 +-
 .../remoting/ConnectionLifeCycleListener.java   |    4 +-
 .../spi/core/remoting/SessionContext.java       |   78 +-
 .../org/apache/activemq/utils/BufferHelper.java |   24 +-
 .../activemq/utils/ConfigurationHelper.java     |    4 +-
 .../utils/HornetQBufferInputStream.java         |    6 +-
 .../activemq/utils/OrderedExecutorFactory.java  |    4 +-
 .../apache/activemq/utils/XidCodecSupport.java  |    6 +-
 .../apache/activemq/tests/util/RandomUtil.java  |    8 +-
 .../util/TypedPropertiesConversionTest.java     |   20 +-
 .../activemq/util/TypedPropertiesTest.java      |    8 +-
 .../jms/client/HornetQBytesMessage.java         |    8 +-
 .../activemq/jms/client/HornetQConnection.java  |   26 +-
 .../jms/client/HornetQJMSClientBundle.java      |   12 +-
 .../activemq/jms/client/HornetQJMSProducer.java |   24 +-
 .../activemq/jms/client/HornetQMapMessage.java  |   28 +-
 .../activemq/jms/client/HornetQMessage.java     |   38 +-
 .../jms/client/HornetQMessageConsumer.java      |    8 +-
 .../jms/client/HornetQMessageProducer.java      |    8 +-
 .../jms/client/HornetQObjectMessage.java        |    4 +-
 .../jms/client/HornetQQueueBrowser.java         |    8 +-
 .../activemq/jms/client/HornetQSession.java     |   46 +-
 .../jms/client/HornetQStreamMessage.java        |    4 +-
 .../activemq/jms/client/HornetQTextMessage.java |    4 +-
 .../activemq/jms/client/JMSExceptionHelper.java |    4 +-
 .../jms/client/JMSMessageListenerWrapper.java   |    6 +-
 .../activemq/jms/bridge/impl/JMSBridgeImpl.java |   12 +-
 .../management/impl/JMSQueueControlImpl.java    |    6 +-
 .../management/impl/JMSTopicControlImpl.java    |    4 +-
 .../config/PersistedConnectionFactory.java      |    6 +-
 .../config/PersistedDestination.java            |    6 +-
 .../jms/persistence/config/PersistedJNDI.java   |    6 +-
 .../journal/JMSJournalStorageManagerImpl.java   |    6 +-
 .../jms/server/HornetQJMSServerBundle.java      |   22 +-
 .../ConnectionFactoryConfigurationImpl.java     |    6 +-
 .../TransportConfigurationEncodingSupport.java  |   10 +-
 .../server/impl/JMSServerConfigParserImpl.java  |    4 +-
 .../jms/server/impl/JMSServerManagerImpl.java   |    6 +-
 .../recovery/HornetQXAResourceWrapper.java      |   16 +-
 .../jms/server/recovery/RecoveryDiscovery.java  |   12 +-
 .../activemq/core/asyncio/AsynchronousFile.java |   20 +-
 .../core/asyncio/impl/AsynchronousFileImpl.java |   46 +-
 .../activemq/core/journal/EncodingSupport.java  |    6 +-
 .../activemq/core/journal/SequentialFile.java   |   10 +-
 .../core/journal/impl/AIOSequentialFile.java    |   12 +-
 .../journal/impl/AIOSequentialFileFactory.java  |    6 +-
 .../journal/impl/AbstractJournalUpdateTask.java |   14 +-
 .../journal/impl/AbstractSequentialFile.java    |   30 +-
 .../impl/AbstractSequentialFileFactory.java     |    4 +-
 .../core/journal/impl/FileWrapperJournal.java   |   16 +-
 .../activemq/core/journal/impl/JournalBase.java |    6 +-
 .../core/journal/impl/JournalCompactor.java     |    6 +-
 .../activemq/core/journal/impl/JournalImpl.java |   14 +-
 .../core/journal/impl/JournalTransaction.java   |    4 +-
 .../core/journal/impl/NIOSequentialFile.java    |   44 +-
 .../core/journal/impl/SimpleWaitIOCallback.java |   12 +-
 .../activemq/core/journal/impl/TimedBuffer.java |   22 +-
 .../impl/dataformat/ByteArrayEncoding.java      |    6 +-
 .../impl/dataformat/JournalAddRecord.java       |    4 +-
 .../impl/dataformat/JournalAddRecordTX.java     |    4 +-
 .../dataformat/JournalCompleteRecordTX.java     |    4 +-
 .../impl/dataformat/JournalDeleteRecord.java    |    4 +-
 .../impl/dataformat/JournalDeleteRecordTX.java  |    4 +-
 .../impl/dataformat/JournalInternalRecord.java  |    4 +-
 .../dataformat/JournalRollbackRecordTX.java     |    4 +-
 .../activemq/journal/HornetQJournalBundle.java  |   10 +-
 activemq-native/README                          |    3 +-
 activemq-native/bin/libactivemqAIO64.so         |  Bin 0 -> 51692 bytes
 activemq-native/pom.xml                         |    4 +-
 .../src/main/c/JNI_AsynchronousFileImpl.cpp     |   38 +-
 activemq-native/src/main/c/JavaUtilities.cpp    |    2 +-
 .../org/apache/activemq/core/libaio/Native.java |   12 +-
 .../proton/HornetQProtonRemotingConnection.java |    8 +-
 .../protocol/proton/ProtonProtocolManager.java  |    6 +-
 .../converter/jms/ServerJMSMapMessage.java      |   24 +-
 .../proton/converter/jms/ServerJMSMessage.java  |    4 +-
 .../converter/jms/ServerJMSStreamMessage.java   |    4 +-
 .../core/protocol/proton/TestConversions.java   |   40 +-
 .../protocol/openwire/DataInputWrapper.java     |    4 +-
 .../protocol/openwire/OpenWireConnection.java   |   28 +-
 .../openwire/OpenWireMessageConverter.java      |   10 +-
 .../openwire/OpenWireProtocolManager.java       |    6 +-
 .../core/protocol/openwire/OpenWireUtil.java    |    8 +-
 .../core/protocol/stomp/StompConnection.java    |   22 +-
 .../core/protocol/stomp/StompDecoder.java       |    4 +-
 .../core/protocol/stomp/StompFrame.java         |   12 +-
 .../protocol/stomp/StompProtocolManager.java    |   10 +-
 .../core/protocol/stomp/StompSession.java       |    4 +-
 .../stomp/VersionedStompFrameHandler.java       |    6 +-
 .../core/protocol/stomp/v11/StompFrameV11.java  |   10 +-
 .../core/protocol/stomp/v12/StompFrameV12.java  |   10 +-
 .../org/apache/activemq/ra/HornetQRABundle.java |    4 +-
 .../apache/activemq/ra/HornetQRAProperties.java |    4 +-
 .../apache/activemq/ra/HornetQRAXAResource.java |    4 +-
 .../activemq/ra/HornetQResourceAdapter.java     |   10 +-
 .../activemq/ra/inflow/HornetQActivation.java   |   20 +-
 .../ra/inflow/HornetQMessageHandler.java        |   10 +-
 .../apache/activemq/rest/HornetQRestLogger.java |    4 +-
 .../rest/queue/AcknowledgedQueueConsumer.java   |   10 +-
 .../activemq/rest/queue/ConsumersResource.java  |    8 +-
 .../apache/activemq/rest/queue/PostMessage.java |    8 +-
 .../activemq/rest/queue/PostMessageDupsOk.java  |    4 +-
 .../activemq/rest/queue/QueueConsumer.java      |    6 +-
 .../rest/queue/QueueDestinationsResource.java   |    4 +-
 .../activemq/rest/queue/push/PushConsumer.java  |    4 +-
 .../queue/push/PushConsumerMessageHandler.java  |    8 +-
 .../topic/AcknowledgedSubscriptionResource.java |    4 +-
 .../activemq/rest/topic/PushSubscription.java   |    6 +-
 .../rest/topic/PushSubscriptionsResource.java   |    8 +-
 .../rest/topic/SubscriptionResource.java        |    4 +-
 .../rest/topic/SubscriptionsResource.java       |   18 +-
 .../rest/topic/TopicDestinationsResource.java   |    4 +-
 .../core/config/ConfigurationUtils.java         |    8 +-
 .../core/deployers/impl/XmlDeployer.java        |    6 +-
 .../activemq/core/filter/impl/FilterImpl.java   |   10 +-
 .../core/management/impl/QueueControlImpl.java  |    8 +-
 .../apache/activemq/core/paging/impl/Page.java  |   10 +-
 .../core/paging/impl/PageSyncTimer.java         |    4 +-
 .../paging/impl/PageTransactionInfoImpl.java    |    6 +-
 .../core/paging/impl/PagedMessageImpl.java      |   10 +-
 .../config/PersistedAddressSetting.java         |    6 +-
 .../core/persistence/config/PersistedRoles.java |    6 +-
 .../impl/journal/BatchingIDGenerator.java       |    8 +-
 .../impl/journal/DescribeJournal.java           |    8 +-
 .../impl/journal/JournalStorageManager.java     |  104 +-
 .../impl/journal/LargeServerMessageImpl.java    |   36 +-
 .../impl/journal/LargeServerMessageInSync.java  |    4 +-
 .../impl/journal/OperationContextImpl.java      |    8 +-
 .../nullpm/NullStorageLargeServerMessage.java   |    4 +-
 .../core/postoffice/impl/PostOfficeImpl.java    |   18 +-
 .../core/protocol/ServerPacketDecoder.java      |    4 +-
 .../core/ServerSessionPacketHandler.java        |   16 +-
 .../protocol/core/impl/CoreProtocolManager.java |    6 +-
 .../core/impl/HornetQPacketHandler.java         |   18 +-
 .../wireformat/BackupRegistrationMessage.java   |    6 +-
 .../BackupReplicationStartFailedMessage.java    |    6 +-
 .../impl/wireformat/BackupRequestMessage.java   |    6 +-
 .../impl/wireformat/BackupResponseMessage.java  |    6 +-
 .../impl/wireformat/ClusterConnectMessage.java  |    6 +-
 .../wireformat/ClusterConnectReplyMessage.java  |    6 +-
 .../impl/wireformat/NodeAnnounceMessage.java    |    6 +-
 .../core/impl/wireformat/QuorumVoteMessage.java |    8 +-
 .../impl/wireformat/QuorumVoteReplyMessage.java |    8 +-
 .../impl/wireformat/ReplicationAddMessage.java  |    6 +-
 .../wireformat/ReplicationAddTXMessage.java     |    6 +-
 .../wireformat/ReplicationCommitMessage.java    |    6 +-
 .../wireformat/ReplicationDeleteMessage.java    |    6 +-
 .../wireformat/ReplicationDeleteTXMessage.java  |    6 +-
 .../ReplicationLargeMessageBeginMessage.java    |    6 +-
 .../ReplicationLargeMessageEndMessage.java      |    6 +-
 .../ReplicationLargeMessageWriteMessage.java    |    6 +-
 .../ReplicationLiveIsStoppingMessage.java       |    6 +-
 .../wireformat/ReplicationPageEventMessage.java |    6 +-
 .../wireformat/ReplicationPageWriteMessage.java |    6 +-
 .../wireformat/ReplicationPrepareMessage.java   |    6 +-
 .../wireformat/ReplicationStartSyncMessage.java |    6 +-
 .../wireformat/ReplicationSyncFileMessage.java  |    6 +-
 .../wireformat/ScaleDownAnnounceMessage.java    |    6 +-
 .../core/remoting/impl/invm/InVMAcceptor.java   |    4 +-
 .../core/remoting/impl/invm/InVMConnection.java |   20 +-
 .../core/remoting/impl/invm/InVMConnector.java  |    4 +-
 .../core/remoting/impl/netty/NettyAcceptor.java |    4 +-
 .../impl/netty/NettyServerConnection.java       |    4 +-
 .../server/impl/RemotingServiceImpl.java        |   12 +-
 .../core/replication/ReplicationEndpoint.java   |   10 +-
 .../core/replication/ReplicationManager.java    |   27 +-
 .../core/server/HornetQMessageBundle.java       |  122 +-
 .../core/server/HornetQServerLogger.java        |    4 +-
 .../core/server/LargeServerMessage.java         |    6 +-
 .../activemq/core/server/LiveNodeLocator.java   |    8 +-
 .../activemq/core/server/NodeManager.java       |    4 +-
 .../core/server/cluster/ClusterControl.java     |   18 +-
 .../core/server/cluster/ClusterController.java  |    4 +-
 .../core/server/cluster/ClusterManager.java     |   10 +-
 .../core/server/cluster/ha/ScaleDownPolicy.java |    4 +-
 .../core/server/cluster/impl/BridgeImpl.java    |   22 +-
 .../server/cluster/impl/BroadcastGroupImpl.java |    6 +-
 .../cluster/impl/ClusterConnectionBridge.java   |    8 +-
 .../cluster/impl/ClusterConnectionImpl.java     |    4 +-
 .../core/server/cluster/qourum/BooleanVote.java |    6 +-
 .../cluster/qourum/QuorumVoteHandler.java       |    4 +-
 .../qourum/SharedNothingBackupQuorum.java       |   12 +-
 .../core/server/cluster/qourum/Vote.java        |    6 +-
 .../activemq/core/server/impl/Activation.java   |    4 +-
 .../impl/AnyLiveNodeLocatorForReplication.java  |    6 +-
 .../impl/AnyLiveNodeLocatorForScaleDown.java    |    8 +-
 .../core/server/impl/ColocatedActivation.java   |    8 +-
 .../core/server/impl/FileLockNodeManager.java   |    6 +-
 .../core/server/impl/InVMNodeManager.java       |    4 +-
 .../core/server/impl/LiveOnlyActivation.java    |    4 +-
 .../NamedLiveNodeLocatorForReplication.java     |    6 +-
 .../impl/NamedLiveNodeLocatorForScaleDown.java  |    8 +-
 .../server/impl/NamedNodeIdNodeLocator.java     |    6 +-
 .../core/server/impl/ReplicationError.java      |    8 +-
 .../core/server/impl/ServerConsumerImpl.java    |   14 +-
 .../core/server/impl/ServerSessionImpl.java     |   22 +-
 .../impl/SharedNothingBackupActivation.java     |   12 +-
 .../impl/SharedNothingLiveActivation.java       |   26 +-
 .../impl/SharedStoreBackupActivation.java       |    4 +-
 .../server/impl/TransientQueueManagerImpl.java  |    4 +-
 .../core/settings/impl/AddressSettings.java     |    6 +-
 .../activemq/core/transaction/Transaction.java  |    4 +-
 .../core/transaction/impl/TransactionImpl.java  |    6 +-
 .../spi/core/protocol/ProtocolManager.java      |    6 +-
 .../activemq/core/filter/impl/FilterTest.java   |   12 +-
 .../impl/ScheduledDeliveryHandlerTest.java      |   70 +-
 .../util/CountDownSessionFailureListener.java   |    8 +-
 .../activemq/tests/util/ServiceTestBase.java    |    8 +-
 .../activemq/tests/util/UnitTestCase.java       |   18 +-
 .../org/apache/activemq/tools/PrintPages.java   |    6 +-
 .../apache/activemq/tools/XmlDataExporter.java  |   16 +-
 activemq6-native/bin/libHornetQAIO32.so         |  Bin 44803 -> 0 bytes
 activemq6-native/bin/libHornetQAIO64.so         |  Bin 51969 -> 0 bytes
 docs/user-manual/en/ha.xml                      |   12 +-
 docs/user-manual/en/intercepting-operations.xml |    6 +-
 docs/user-manual/zh/ha.xml                      |   12 +-
 docs/user-manual/zh/intercepting-operations.xml |    2 +-
 examples/jms/interceptor/readme.html            |    4 +-
 .../activemq/jms/example/SimpleInterceptor.java |    4 +-
 .../aerogear/HornetQAeroGearBundle.java         |   10 +-
 .../vertx/IncomingVertxEventHandler.java        |    4 +-
 .../vertx/OutgoingVertxEventHandler.java        |    4 +-
 pom.xml                                         |    8 +-
 tests/byteman-tests/pom.xml                     |    4 +-
 .../activemq/byteman/tests/BMFailoverTest.java  |   14 +-
 .../byteman/tests/ClusteredGroupingTest.java    |   10 +-
 .../activemq/byteman/tests/GroupingTest.java    |    4 +-
 .../activemq/byteman/tests/MessageCopyTest.java |    6 +-
 tests/concurrent-tests/pom.xml                  |    2 +-
 tests/integration-tests/pom.xml                 |    2 +-
 .../integration/DuplicateDetectionTest.java     |   16 +-
 .../tests/integration/InterceptorTest.java      |   32 +-
 .../integration/client/AcknowledgeTest.java     |   74 +-
 .../integration/client/AutogroupIdTest.java     |    4 +-
 .../integration/client/CommitRollbackTest.java  |   10 +-
 .../integration/client/ConsumerCloseTest.java   |   16 +-
 .../tests/integration/client/ConsumerTest.java  |   12 +-
 .../integration/client/CoreClientTest.java      |    4 +-
 .../client/CreateQueueIdempotentTest.java       |   12 +-
 .../client/DeadLetterAddressTest.java           |    4 +-
 .../integration/client/DeliveryOrderTest.java   |    4 +-
 .../integration/client/FailureDeadlockTest.java |    6 +-
 .../integration/client/HangConsumerTest.java    |   10 +-
 .../integration/client/HornetQCrashTest.java    |    4 +-
 .../client/IncompatibleVersionTest.java         |    8 +-
 .../client/InterruptedLargeMessageTest.java     |    6 +-
 .../integration/client/LargeMessageTest.java    |    4 +-
 .../client/MessageDurabilityTest.java           |   18 +-
 .../MessageGroupingConnectionFactoryTest.java   |    4 +-
 .../integration/client/MessageGroupingTest.java |    4 +-
 .../client/MultipleThreadFilterOneTest.java     |    6 +-
 .../client/NewDeadLetterAddressTest.java        |    4 +-
 .../integration/client/PagingOrderTest.java     |   12 +-
 .../integration/client/PagingSyncTest.java      |    4 +-
 .../tests/integration/client/PagingTest.java    |   68 +-
 .../integration/client/ProducerCloseTest.java   |    8 +-
 .../client/ProducerFlowControlTest.java         |    4 +-
 .../tests/integration/client/ProducerTest.java  |    4 +-
 .../tests/integration/client/ReceiveTest.java   |   14 +-
 .../client/RedeliveryConsumerTest.java          |    4 +-
 .../tests/integration/client/RequestorTest.java |   10 +-
 .../client/SelfExpandingBufferTest.java         |    4 +-
 .../client/ServerLocatorConnectTest.java        |   10 +-
 .../integration/client/SessionCloseTest.java    |   44 +-
 ...onClosedOnRemotingConnectionFailureTest.java |   16 +-
 .../client/SessionCreateAndDeleteQueueTest.java |    8 +-
 .../client/SessionCreateConsumerTest.java       |   14 +-
 .../client/SessionCreateProducerTest.java       |    8 +-
 .../tests/integration/client/SessionTest.java   |   12 +-
 .../integration/client/SlowConsumerTest.java    |   18 +-
 .../integration/client/TemporaryQueueTest.java  |   28 +-
 .../integration/client/TransientQueueTest.java  |   10 +-
 .../integration/client/WildCardRoutingTest.java |    4 +-
 .../clientcrash/DummyInterceptor.java           |    8 +-
 .../clientcrash/DummyInterceptorB.java          |    4 +-
 .../cluster/ClusterControllerTest.java          |    4 +-
 .../cluster/bridge/BridgeReconnectTest.java     |   16 +-
 .../integration/cluster/bridge/BridgeTest.java  |   10 +-
 .../cluster/bridge/SimpleTransformer.java       |    4 +-
 .../cluster/distribution/ClusterTestBase.java   |    6 +-
 .../distribution/ClusteredGroupingTest.java     |    6 +-
 .../failover/AsynchronousFailoverTest.java      |   40 +-
 .../failover/BackupAuthenticationTest.java      |    4 +-
 .../cluster/failover/BackupSyncJournalTest.java |    8 +-
 .../failover/BackupSyncLargeMessageTest.java    |    8 +-
 .../cluster/failover/DelayInterceptor.java      |    4 +-
 .../cluster/failover/DelayInterceptor2.java     |    4 +-
 .../cluster/failover/DelayInterceptor3.java     |    4 +-
 .../failover/FailoverOnFlowControlTest.java     |    4 +-
 .../cluster/failover/FailoverTest.java          |   78 +-
 .../cluster/failover/FailoverTestBase.java      |    4 +-
 .../failover/NettyAsynchronousReattachTest.java |    4 +-
 .../failover/ReplicatedDistributionTest.java    |    4 +-
 .../remote/FailoverWithSharedStoreTest.java     |    8 +-
 .../MultiThreadRandomReattachTestBase.java      |    4 +-
 .../MultiThreadReattachSupportTestBase.java     |    4 +-
 .../cluster/reattach/OrderReattachTest.java     |    4 +-
 .../cluster/reattach/RandomReattachTest.java    |   10 +-
 .../cluster/reattach/ReattachTest.java          |   48 +-
 .../topology/TopologyClusterTestBase.java       |   16 +-
 .../cluster/util/BackupSyncDelay.java           |    6 +-
 .../integration/discovery/DiscoveryTest.java    |    4 +-
 .../jms/bridge/ClusteredBridgeTestBase.java     |    6 +-
 .../jms/bridge/JMSBridgeClusteredTest.java      |   12 +-
 .../integration/jms/client/GroupingTest.java    |    4 +-
 ...onClosedOnRemotingConnectionFailureTest.java |    8 +-
 .../jms/cluster/BindingsClusterTest.java        |   10 +-
 .../jms/cluster/JMSFailoverTest.java            |    4 +-
 .../jms/cluster/JMSReconnectTest.java           |    6 +-
 .../CloseDestroyedConnectionTest.java           |   14 +-
 .../jms/connection/ExceptionListenerTest.java   |   12 +-
 .../server/management/JMSServerControlTest.java |    8 +-
 .../jms/server/management/JMSUtil.java          |    8 +-
 .../journal/JournalPerfTuneTest.java            |    6 +-
 .../largemessage/LargeMessageTestBase.java      |   20 +-
 .../management/AcceptorControlTest.java         |    6 +-
 .../ManagementWithPagingServerTest.java         |    4 +-
 .../management/NotificationTest.java            |    4 +-
 .../management/QueueControlTest.java            |    4 +-
 .../management/SecurityNotificationTest.java    |    4 +-
 .../persistence/DeleteQueueRestartTest.java     |    4 +-
 ...nnectionFactoryConfigurationStorageTest.java |    8 +-
 ...ansportConfigurationEncodingSupportTest.java |    8 +-
 .../ra/HornetQMessageHandlerTest.java           |    8 +-
 .../tests/integration/remoting/PingTest.java    |   22 +-
 .../integration/remoting/ReconnectTest.java     |   22 +-
 .../replication/ReplicationTest.java            |   24 +-
 .../integration/security/SecurityTest.java      |   96 +-
 .../server/AddressFullLoggingTest.java          |    4 +-
 .../integration/server/ExpiryRunnerTest.java    |    4 +-
 .../integration/server/LVQRecoveryTest.java     |    6 +-
 .../tests/integration/server/LVQTest.java       |    8 +-
 .../integration/server/PredefinedQueueTest.java |   16 +-
 .../ssl/CoreClientOverOneWaySSLTest.java        |   46 +-
 .../ssl/CoreClientOverTwoWaySSLTest.java        |   10 +-
 .../NettyConnectorWithHTTPUpgradeTest.java      |   10 +-
 .../integration/vertx/HornetQVertxUnitTest.java |    4 +-
 .../integration/xa/BasicXaRecoveryTest.java     |    4 +-
 .../tests/integration/xa/BasicXaTest.java       |    8 +-
 .../tests/integration/xa/XaTimeoutTest.java     |    6 +-
 .../largemessage/LargeMessageTestBase.java      |   20 +-
 tests/jms-tests/pom.xml                         |    2 +-
 .../jms/tests/message/MessageHeaderTest.java    |  110 +-
 tests/joram-tests/pom.xml                       |    2 +-
 tests/performance-tests/pom.xml                 |    2 +-
 .../paging/MeasurePagingMultiThreadTest.java    |   14 +-
 tests/pom.xml                                   |    2 +-
 tests/soak-tests/pom.xml                        |    2 +-
 tests/stress-tests/pom.xml                      |    2 +-
 .../journal/JournalRestartStressTest.java       |    2 +-
 .../NIOMultiThreadCompactorStressTest.java      |   12 +-
 .../stress/paging/PageCursorStressTest.java     |   14 +-
 .../tests/stress/paging/PageStressTest.java     |    4 +-
 .../tests/stress/remote/PingStressTest.java     |    4 +-
 tests/timing-tests/pom.xml                      |    2 +-
 .../activemq/tests/timing/util/UTF8Test.java    |    8 +-
 .../tests/unit/core/asyncio/AIOTestBase.java    |    4 +-
 .../unit/core/asyncio/AsynchronousFileTest.java |   10 +-
 .../MultiThreadAsynchronousFileTest.java        |    6 +-
 .../client/impl/LargeMessageBufferTest.java     |   46 +-
 .../core/journal/impl/JournalImplTestUnit.java  |    8 +-
 .../impl/SequentialFileFactoryTestBase.java     |   14 +-
 .../unit/core/journal/impl/TimedBufferTest.java |   14 +-
 .../impl/fakes/FakeSequentialFileFactory.java   |   18 +-
 .../core/journal/impl/fakes/SimpleEncoding.java |    6 +-
 .../unit/core/message/impl/MessageImplTest.java |    6 +-
 .../tests/unit/core/paging/impl/PageTest.java   |   10 +-
 .../core/paging/impl/PagingStoreImplTest.java   |   26 +-
 .../impl/BatchIDGeneratorUnitTest.java          |    6 +-
 .../impl/OperationContextUnitTest.java          |    4 +-
 .../core/postoffice/impl/BindingsImplTest.java  |    4 +-
 .../core/remoting/HornetQBufferTestBase.java    |    6 +-
 .../impl/netty/ChannelBufferWrapper2Test.java   |    8 +-
 .../impl/netty/NettyAcceptorFactoryTest.java    |    8 +-
 .../remoting/impl/netty/NettyAcceptorTest.java  |    8 +-
 .../impl/netty/NettyConnectionTest.java         |   12 +-
 .../remoting/impl/netty/NettyConnectorTest.java |   28 +-
 .../server/impl/fake/FakeInterceptor.java       |    4 +-
 .../unit/jms/client/JMSExceptionHelperTest.java |   30 +-
 .../unit/util/HornetQBufferInputStreamTest.java |    6 +-
 .../activemq/tests/unit/util/UTF8Test.java      |   20 +-
 570 files changed, 5870 insertions(+), 5876 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQAddressExistsException.java
----------------------------------------------------------------------
diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQAddressExistsException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQAddressExistsException.java
new file mode 100644
index 0000000..6b57422
--- /dev/null
+++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQAddressExistsException.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2005-2014 Red Hat, Inc.
+ * Red Hat licenses this file to you under the Apache License, version
+ * 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.  See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+package org.apache.activemq.api.core;
+
+import static org.apache.activemq.api.core.ActiveMQExceptionType.ADDRESS_EXISTS;
+
+/**
+ * An operation failed because an address exists on the server.
+ * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> 5/2/12
+ */
+public final class ActiveMQAddressExistsException extends ActiveMQException
+{
+   private static final long serialVersionUID = 3032730450033992367L;
+
+   public ActiveMQAddressExistsException()
+   {
+      super(ADDRESS_EXISTS);
+   }
+
+   public ActiveMQAddressExistsException(String msg)
+   {
+      super(ADDRESS_EXISTS, msg);
+   }
+}

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQAddressFullException.java
----------------------------------------------------------------------
diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQAddressFullException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQAddressFullException.java
new file mode 100644
index 0000000..18beece
--- /dev/null
+++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQAddressFullException.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2005-2014 Red Hat, Inc.
+ * Red Hat licenses this file to you under the Apache License, version
+ * 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.  See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+package org.apache.activemq.api.core;
+
+import static org.apache.activemq.api.core.ActiveMQExceptionType.ADDRESS_FULL;
+
+/**
+ * An address is full.
+ * @author Justin Bertram
+ */
+public final class ActiveMQAddressFullException extends ActiveMQException
+{
+   private static final long serialVersionUID = 0;
+
+   public ActiveMQAddressFullException(String message)
+   {
+      super(ADDRESS_FULL, message);
+   }
+
+   public ActiveMQAddressFullException()
+   {
+      super(ADDRESS_FULL);
+   }
+}

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQAlreadyReplicatingException.java
----------------------------------------------------------------------
diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQAlreadyReplicatingException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQAlreadyReplicatingException.java
new file mode 100644
index 0000000..81af8d3
--- /dev/null
+++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQAlreadyReplicatingException.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2005-2014 Red Hat, Inc.
+ * Red Hat licenses this file to you under the Apache License, version
+ * 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.  See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+package org.apache.activemq.api.core;
+
+import static org.apache.activemq.api.core.ActiveMQExceptionType.ALREADY_REPLICATING;
+
+/**
+ * The server is already paired with a replicating backup.
+ * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> 5/2/12
+ */
+public final class ActiveMQAlreadyReplicatingException extends ActiveMQException
+{
+   private static final long serialVersionUID = -7352538521961996152L;
+
+   public ActiveMQAlreadyReplicatingException()
+   {
+      super(ALREADY_REPLICATING);
+   }
+
+   public ActiveMQAlreadyReplicatingException(String msg)
+   {
+      super(ALREADY_REPLICATING, msg);
+   }
+}

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQBuffer.java
----------------------------------------------------------------------
diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQBuffer.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQBuffer.java
new file mode 100644
index 0000000..b6065cf
--- /dev/null
+++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQBuffer.java
@@ -0,0 +1,1084 @@
+/*
+ * Copyright 2005-2014 Red Hat, Inc.
+ * Red Hat licenses this file to you under the Apache License, version
+ * 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.  See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+package org.apache.activemq.api.core;
+
+import java.nio.ByteBuffer;
+
+import io.netty.buffer.ByteBuf;
+
+/**
+ * A HornetQBuffer wraps a Netty's ChannelBuffer and is used throughout HornetQ code base.
+ * <p>
+ * Instances of it can be obtained from {@link ActiveMQBuffers} factory.
+ * <p>
+ * Much of it derived from Netty ChannelBuffer by Trustin Lee
+ * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
+ * @see ActiveMQBuffers
+ */
+public interface ActiveMQBuffer
+{
+   /**
+    * Returns the underlying Netty's ByteBuf
+    *
+    * @return the underlying Netty's ByteBuf
+    */
+   ByteBuf byteBuf();
+
+   /**
+    * Returns the number of bytes this buffer can contain.
+    */
+   int capacity();
+
+   /**
+    * Returns the {@code readerIndex} of this buffer.
+    */
+   int readerIndex();
+
+   /**
+    * Sets the {@code readerIndex} of this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the specified {@code readerIndex} is
+    *            less than {@code 0} or
+    *            greater than {@code this.writerIndex}
+    */
+   void readerIndex(int readerIndex);
+
+   /**
+    * Returns the {@code writerIndex} of this buffer.
+    */
+   int writerIndex();
+
+   /**
+    * Sets the {@code writerIndex} of this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the specified {@code writerIndex} is
+    *            less than {@code this.readerIndex} or
+    *            greater than {@code this.capacity}
+    */
+   void writerIndex(int writerIndex);
+
+   /**
+    * Sets the {@code readerIndex} and {@code writerIndex} of this buffer
+    * in one shot.  This method is useful when you have to worry about the
+    * invocation order of {@link #readerIndex(int)} and {@link #writerIndex(int)}
+    * methods.  For example, the following code will fail:
+    *
+    * <pre>
+    * // Create a buffer whose readerIndex, writerIndex and capacity are
+    * // 0, 0 and 8 respectively.
+    * ChannelBuffer buf = ChannelBuffers.buffer(8);
+    *
+    * // IndexOutOfBoundsException is thrown because the specified
+    * // readerIndex (2) cannot be greater than the current writerIndex (0).
+    * buf.readerIndex(2);
+    * buf.writerIndex(4);
+    * </pre>
+    *
+    * The following code will also fail:
+    *
+    * <pre>
+    * // Create a buffer whose readerIndex, writerIndex and capacity are
+    * // 0, 8 and 8 respectively.
+    * ChannelBuffer buf = ChannelBuffers.wrappedBuffer(new byte[8]);
+    *
+    * // readerIndex becomes 8.
+    * buf.readLong();
+    *
+    * // IndexOutOfBoundsException is thrown because the specified
+    * // writerIndex (4) cannot be less than the current readerIndex (8).
+    * buf.writerIndex(4);
+    * buf.readerIndex(2);
+    * </pre>
+    *
+    * By contrast, {@link #setIndex(int, int)} guarantees that it never
+    * throws an {@link IndexOutOfBoundsException} as long as the specified
+    * indexes meet basic constraints, regardless what the current index
+    * values of the buffer are:
+    *
+    * <pre>
+    * // No matter what the current state of the buffer is, the following
+    * // call always succeeds as long as the capacity of the buffer is not
+    * // less than 4.
+    * buf.setIndex(2, 4);
+    * </pre>
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the specified {@code readerIndex} is less than 0,
+    *         if the specified {@code writerIndex} is less than the specified
+    *         {@code readerIndex} or if the specified {@code writerIndex} is
+    *         greater than {@code this.capacity}
+    */
+   void setIndex(int readerIndex, int writerIndex);
+
+   /**
+    * Returns the number of readable bytes which is equal to
+    * {@code (this.writerIndex - this.readerIndex)}.
+    */
+   int readableBytes();
+
+   /**
+    * Returns the number of writable bytes which is equal to
+    * {@code (this.capacity - this.writerIndex)}.
+    */
+   int writableBytes();
+
+   /**
+    * Returns {@code true}
+    * if and only if {@code (this.writerIndex - this.readerIndex)} is greater
+    * than {@code 0}.
+    */
+   boolean readable();
+
+   /**
+    * Returns {@code true}
+    * if and only if {@code (this.capacity - this.writerIndex)} is greater
+    * than {@code 0}.
+    */
+   boolean writable();
+
+   /**
+    * Sets the {@code readerIndex} and {@code writerIndex} of this buffer to
+    * {@code 0}.
+    * This method is identical to {@link #setIndex(int, int) setIndex(0, 0)}.
+    * <p>
+    * Please note that the behavior of this method is different
+    * from that of NIO buffer, which sets the {@code limit} to
+    * the {@code capacity} of the buffer.
+    */
+   void clear();
+
+   /**
+    * Marks the current {@code readerIndex} in this buffer.  You can
+    * reposition the current {@code readerIndex} to the marked
+    * {@code readerIndex} by calling {@link #resetReaderIndex()}.
+    * The initial value of the marked {@code readerIndex} is {@code 0}.
+    */
+   void markReaderIndex();
+
+   /**
+    * Repositions the current {@code readerIndex} to the marked
+    * {@code readerIndex} in this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the current {@code writerIndex} is less than the marked
+    *         {@code readerIndex}
+    */
+   void resetReaderIndex();
+
+   /**
+    * Marks the current {@code writerIndex} in this buffer.  You can
+    * reposition the current {@code writerIndex} to the marked
+    * {@code writerIndex} by calling {@link #resetWriterIndex()}.
+    * The initial value of the marked {@code writerIndex} is {@code 0}.
+    */
+   void markWriterIndex();
+
+   /**
+    * Repositions the current {@code writerIndex} to the marked
+    * {@code writerIndex} in this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the current {@code readerIndex} is greater than the marked
+    *         {@code writerIndex}
+    */
+   void resetWriterIndex();
+
+   /**
+    * Discards the bytes between the 0th index and {@code readerIndex}.
+    * It moves the bytes between {@code readerIndex} and {@code writerIndex}
+    * to the 0th index, and sets {@code readerIndex} and {@code writerIndex}
+    * to {@code 0} and {@code oldWriterIndex - oldReaderIndex} respectively.
+    * <p>
+    * Please refer to the class documentation for more detailed explanation.
+    */
+   void discardReadBytes();
+
+   /**
+    * Gets a byte at the specified absolute {@code index} in this buffer.
+    * This method does not modify {@code readerIndex} or {@code writerIndex} of
+    * this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the specified {@code index} is less than {@code 0} or
+    *         {@code index + 1} is greater than {@code this.capacity}
+    */
+   byte  getByte(int index);
+
+   /**
+    * Gets an unsigned byte at the specified absolute {@code index} in this
+    * buffer.  This method does not modify {@code readerIndex} or
+    * {@code writerIndex} of this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the specified {@code index} is less than {@code 0} or
+    *         {@code index + 1} is greater than {@code this.capacity}
+    */
+   short getUnsignedByte(int index);
+
+   /**
+    * Gets a 16-bit short integer at the specified absolute {@code index} in
+    * this buffer.  This method does not modify {@code readerIndex} or
+    * {@code writerIndex} of this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the specified {@code index} is less than {@code 0} or
+    *         {@code index + 2} is greater than {@code this.capacity}
+    */
+   short getShort(int index);
+
+   /**
+    * Gets an unsigned 16-bit short integer at the specified absolute
+    * {@code index} in this buffer.  This method does not modify
+    * {@code readerIndex} or {@code writerIndex} of this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the specified {@code index} is less than {@code 0} or
+    *         {@code index + 2} is greater than {@code this.capacity}
+    */
+   int getUnsignedShort(int index);
+
+   /**
+    * Gets a 32-bit integer at the specified absolute {@code index} in
+    * this buffer.  This method does not modify {@code readerIndex} or
+    * {@code writerIndex} of this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the specified {@code index} is less than {@code 0} or
+    *         {@code index + 4} is greater than {@code this.capacity}
+    */
+   int   getInt(int index);
+
+   /**
+    * Gets an unsigned 32-bit integer at the specified absolute {@code index}
+    * in this buffer.  This method does not modify {@code readerIndex} or
+    * {@code writerIndex} of this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the specified {@code index} is less than {@code 0} or
+    *         {@code index + 4} is greater than {@code this.capacity}
+    */
+   long  getUnsignedInt(int index);
+
+   /**
+    * Gets a 64-bit long integer at the specified absolute {@code index} in
+    * this buffer.  This method does not modify {@code readerIndex} or
+    * {@code writerIndex} of this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the specified {@code index} is less than {@code 0} or
+    *         {@code index + 8} is greater than {@code this.capacity}
+    */
+   long  getLong(int index);
+
+   /**
+    * Transfers this buffer's data to the specified destination starting at
+    * the specified absolute {@code index} until the destination becomes
+    * non-writable.  This method is basically same with
+    * {@link #getBytes(int, ActiveMQBuffer, int, int)}, except that this
+    * method increases the {@code writerIndex} of the destination by the
+    * number of the transferred bytes while
+    * {@link #getBytes(int, ActiveMQBuffer, int, int)} does not.
+    * This method does not modify {@code readerIndex} or {@code writerIndex} of
+    * the source buffer (i.e. {@code this}).
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the specified {@code index} is less than {@code 0} or
+    *         if {@code index + dst.writableBytes} is greater than
+    *            {@code this.capacity}
+    */
+   void getBytes(int index, ActiveMQBuffer dst);
+
+   /**
+    * Transfers this buffer's data to the specified destination starting at
+    * the specified absolute {@code index}.  This method is basically same
+    * with {@link #getBytes(int, ActiveMQBuffer, int, int)}, except that this
+    * method increases the {@code writerIndex} of the destination by the
+    * number of the transferred bytes while
+    * {@link #getBytes(int, ActiveMQBuffer, int, int)} does not.
+    * This method does not modify {@code readerIndex} or {@code writerIndex} of
+    * the source buffer (i.e. {@code this}).
+    *
+    * @param length the number of bytes to transfer
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the specified {@code index} is less than {@code 0},
+    *         if {@code index + length} is greater than
+    *            {@code this.capacity}, or
+    *         if {@code length} is greater than {@code dst.writableBytes}
+    */
+   void getBytes(int index, ActiveMQBuffer dst, int length);
+
+   /**
+    * Transfers this buffer's data to the specified destination starting at
+    * the specified absolute {@code index}.
+    * This method does not modify {@code readerIndex} or {@code writerIndex}
+    * of both the source (i.e. {@code this}) and the destination.
+    *
+    * @param dstIndex the first index of the destination
+    * @param length   the number of bytes to transfer
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the specified {@code index} is less than {@code 0},
+    *         if the specified {@code dstIndex} is less than {@code 0},
+    *         if {@code index + length} is greater than
+    *            {@code this.capacity}, or
+    *         if {@code dstIndex + length} is greater than
+    *            {@code dst.capacity}
+    */
+   void getBytes(int index, ActiveMQBuffer dst, int dstIndex, int length);
+
+   /**
+    * Transfers this buffer's data to the specified destination starting at
+    * the specified absolute {@code index}.
+    * This method does not modify {@code readerIndex} or {@code writerIndex} of
+    * this buffer
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the specified {@code index} is less than {@code 0} or
+    *         if {@code index + dst.length} is greater than
+    *            {@code this.capacity}
+    */
+   void getBytes(int index, byte[] dst);
+
+   /**
+    * Transfers this buffer's data to the specified destination starting at
+    * the specified absolute {@code index}.
+    * This method does not modify {@code readerIndex} or {@code writerIndex}
+    * of this buffer.
+    *
+    * @param dstIndex the first index of the destination
+    * @param length   the number of bytes to transfer
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the specified {@code index} is less than {@code 0},
+    *         if the specified {@code dstIndex} is less than {@code 0},
+    *         if {@code index + length} is greater than
+    *            {@code this.capacity}, or
+    *         if {@code dstIndex + length} is greater than
+    *            {@code dst.length}
+    */
+   void getBytes(int index, byte[] dst, int dstIndex, int length);
+
+   /**
+    * Transfers this buffer's data to the specified destination starting at
+    * the specified absolute {@code index} until the destination's position
+    * reaches its limit.
+    * This method does not modify {@code readerIndex} or {@code writerIndex} of
+    * this buffer while the destination's {@code position} will be increased.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the specified {@code index} is less than {@code 0} or
+    *         if {@code index + dst.remaining()} is greater than
+    *            {@code this.capacity}
+    */
+   void getBytes(int index, ByteBuffer dst);
+
+   /**
+    * Gets a char at the specified absolute {@code index} in
+    * this buffer.  This method does not modify {@code readerIndex} or
+    * {@code writerIndex} of this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the specified {@code index} is less than {@code 0} or
+    *         {@code index + 2} is greater than {@code this.capacity}
+    */
+   char getChar(int index);
+
+   /**
+    * Gets a float at the specified absolute {@code index} in
+    * this buffer.  This method does not modify {@code readerIndex} or
+    * {@code writerIndex} of this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the specified {@code index} is less than {@code 0} or
+    *         {@code index + 4} is greater than {@code this.capacity}
+    */
+   float getFloat(int index);
+
+   /**
+    * Gets a double at the specified absolute {@code index} in
+    * this buffer.  This method does not modify {@code readerIndex} or
+    * {@code writerIndex} of this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the specified {@code index} is less than {@code 0} or
+    *         {@code index + 8} is greater than {@code this.capacity}
+    */
+   double getDouble(int index);
+
+   /**
+    * Sets the specified byte at the specified absolute {@code index} in this
+    * buffer.
+    * This method does not modify {@code readerIndex} or {@code writerIndex} of
+    * this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the specified {@code index} is less than {@code 0} or
+    *         {@code index + 1} is greater than {@code this.capacity}
+    */
+   void setByte(int index, byte value);
+
+   /**
+    * Sets the specified 16-bit short integer at the specified absolute
+    * {@code index} in this buffer.
+    * This method does not modify {@code readerIndex} or {@code writerIndex} of
+    * this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the specified {@code index} is less than {@code 0} or
+    *         {@code index + 2} is greater than {@code this.capacity}
+    */
+   void setShort(int index, short value);
+
+   /**
+    * Sets the specified 32-bit integer at the specified absolute
+    * {@code index} in this buffer.
+    * This method does not modify {@code readerIndex} or {@code writerIndex} of
+    * this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the specified {@code index} is less than {@code 0} or
+    *         {@code index + 4} is greater than {@code this.capacity}
+    */
+   void setInt(int index, int value);
+
+   /**
+    * Sets the specified 64-bit long integer at the specified absolute
+    * {@code index} in this buffer.
+    * This method does not modify {@code readerIndex} or {@code writerIndex} of
+    * this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the specified {@code index} is less than {@code 0} or
+    *         {@code index + 8} is greater than {@code this.capacity}
+    */
+   void setLong(int index, long value);
+
+   /**
+    * Transfers the specified source buffer's data to this buffer starting at
+    * the specified absolute {@code index} until the destination becomes
+    * unreadable.  This method is basically same with
+    * {@link #setBytes(int, ActiveMQBuffer, int, int)}, except that this
+    * method increases the {@code readerIndex} of the source buffer by
+    * the number of the transferred bytes while
+    * {@link #getBytes(int, ActiveMQBuffer, int, int)} does not.
+    * This method does not modify {@code readerIndex} or {@code writerIndex} of
+    * the source buffer (i.e. {@code this}).
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the specified {@code index} is less than {@code 0} or
+    *         if {@code index + src.readableBytes} is greater than
+    *            {@code this.capacity}
+    */
+   void setBytes(int index, ActiveMQBuffer src);
+
+   /**
+    * Transfers the specified source buffer's data to this buffer starting at
+    * the specified absolute {@code index}.  This method is basically same
+    * with {@link #setBytes(int, ActiveMQBuffer, int, int)}, except that this
+    * method increases the {@code readerIndex} of the source buffer by
+    * the number of the transferred bytes while
+    * {@link #getBytes(int, ActiveMQBuffer, int, int)} does not.
+    * This method does not modify {@code readerIndex} or {@code writerIndex} of
+    * the source buffer (i.e. {@code this}).
+    *
+    * @param length the number of bytes to transfer
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the specified {@code index} is less than {@code 0},
+    *         if {@code index + length} is greater than
+    *            {@code this.capacity}, or
+    *         if {@code length} is greater than {@code src.readableBytes}
+    */
+   void setBytes(int index, ActiveMQBuffer src, int length);
+
+   /**
+    * Transfers the specified source buffer's data to this buffer starting at
+    * the specified absolute {@code index}.
+    * This method does not modify {@code readerIndex} or {@code writerIndex}
+    * of both the source (i.e. {@code this}) and the destination.
+    *
+    * @param srcIndex the first index of the source
+    * @param length   the number of bytes to transfer
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the specified {@code index} is less than {@code 0},
+    *         if the specified {@code srcIndex} is less than {@code 0},
+    *         if {@code index + length} is greater than
+    *            {@code this.capacity}, or
+    *         if {@code srcIndex + length} is greater than
+    *            {@code src.capacity}
+    */
+   void setBytes(int index, ActiveMQBuffer src, int srcIndex, int length);
+
+   /**
+    * Transfers the specified source array's data to this buffer starting at
+    * the specified absolute {@code index}.
+    * This method does not modify {@code readerIndex} or {@code writerIndex} of
+    * this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the specified {@code index} is less than {@code 0} or
+    *         if {@code index + src.length} is greater than
+    *            {@code this.capacity}
+    */
+   void setBytes(int index, byte[] src);
+
+   /**
+    * Transfers the specified source array's data to this buffer starting at
+    * the specified absolute {@code index}.
+    * This method does not modify {@code readerIndex} or {@code writerIndex} of
+    * this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the specified {@code index} is less than {@code 0},
+    *         if the specified {@code srcIndex} is less than {@code 0},
+    *         if {@code index + length} is greater than
+    *            {@code this.capacity}, or
+    *         if {@code srcIndex + length} is greater than {@code src.length}
+    */
+   void setBytes(int index, byte[] src, int srcIndex, int length);
+
+   /**
+    * Transfers the specified source buffer's data to this buffer starting at
+    * the specified absolute {@code index} until the source buffer's position
+    * reaches its limit.
+    * This method does not modify {@code readerIndex} or {@code writerIndex} of
+    * this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the specified {@code index} is less than {@code 0} or
+    *         if {@code index + src.remaining()} is greater than
+    *            {@code this.capacity}
+    */
+   void setBytes(int index, ByteBuffer src);
+
+   /**
+    * Sets the specified char at the specified absolute
+    * {@code index} in this buffer.
+    * This method does not modify {@code readerIndex} or {@code writerIndex} of
+    * this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the specified {@code index} is less than {@code 0} or
+    *         {@code index + 2} is greater than {@code this.capacity}
+    */
+   void setChar(int index, char value);
+
+   /**
+    * Sets the specified float at the specified absolute
+    * {@code index} in this buffer.
+    * This method does not modify {@code readerIndex} or {@code writerIndex} of
+    * this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the specified {@code index} is less than {@code 0} or
+    *         {@code index + 4} is greater than {@code this.capacity}
+    */
+   void setFloat(int index, float value);
+
+   /**
+    * Sets the specified double at the specified absolute
+    * {@code index} in this buffer.
+    * This method does not modify {@code readerIndex} or {@code writerIndex} of
+    * this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the specified {@code index} is less than {@code 0} or
+    *         {@code index + 8} is greater than {@code this.capacity}
+    */
+   void setDouble(int index, double value);
+
+   /**
+    * Gets a byte at the current {@code readerIndex} and increases
+    * the {@code readerIndex} by {@code 1} in this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if {@code this.readableBytes} is less than {@code 1}
+    */
+   byte readByte();
+
+   /**
+    * Gets an unsigned byte at the current {@code readerIndex} and increases
+    * the {@code readerIndex} by {@code 1} in this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if {@code this.readableBytes} is less than {@code 1}
+    */
+   short readUnsignedByte();
+
+   /**
+    * Gets a 16-bit short integer at the current {@code readerIndex}
+    * and increases the {@code readerIndex} by {@code 2} in this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if {@code this.readableBytes} is less than {@code 2}
+    */
+   short readShort();
+
+   /**
+    * Gets an unsigned 16-bit short integer at the current {@code readerIndex}
+    * and increases the {@code readerIndex} by {@code 2} in this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if {@code this.readableBytes} is less than {@code 2}
+    */
+   int   readUnsignedShort();
+
+   /**
+    * Gets a 32-bit integer at the current {@code readerIndex}
+    * and increases the {@code readerIndex} by {@code 4} in this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if {@code this.readableBytes} is less than {@code 4}
+    */
+   int   readInt();
+
+   /**
+    * Gets an unsigned 32-bit integer at the current {@code readerIndex}
+    * and increases the {@code readerIndex} by {@code 4} in this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if {@code this.readableBytes} is less than {@code 4}
+    */
+   long  readUnsignedInt();
+
+   /**
+    * Gets a 64-bit integer at the current {@code readerIndex}
+    * and increases the {@code readerIndex} by {@code 8} in this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if {@code this.readableBytes} is less than {@code 8}
+    */
+   long  readLong();
+
+   /**
+    * Gets a char at the current {@code readerIndex}
+    * and increases the {@code readerIndex} by {@code 2} in this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if {@code this.readableBytes} is less than {@code 2}
+    */
+   char readChar();
+
+   /**
+    * Gets a float at the current {@code readerIndex}
+    * and increases the {@code readerIndex} by {@code 4} in this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if {@code this.readableBytes} is less than {@code 4}
+    */
+   float readFloat();
+
+   /**
+    * Gets a double at the current {@code readerIndex}
+    * and increases the {@code readerIndex} by {@code 8} in this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if {@code this.readableBytes} is less than {@code 8}
+    */
+   double readDouble();
+
+   /**
+    * Gets a boolean at the current {@code readerIndex}
+    * and increases the {@code readerIndex} by {@code 1} in this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if {@code this.readableBytes} is less than {@code 1}
+    */
+   boolean readBoolean();
+
+   /**
+    * Gets a SimpleString (potentially {@code null}) at the current {@code readerIndex}
+    */
+   SimpleString readNullableSimpleString();
+
+   /**
+    * Gets a String (potentially {@code null}) at the current {@code readerIndex}
+    */
+   String readNullableString();
+
+   /**
+    * Gets a non-null SimpleString at the current {@code readerIndex}
+    */
+   SimpleString readSimpleString();
+
+   /**
+    * Gets a non-null String at the current {@code readerIndex}
+    */
+   String readString();
+
+   /**
+    * Gets a UTF-8 String at the current {@code readerIndex}
+    */
+   String readUTF();
+
+   /**
+    * Transfers this buffer's data to a newly created buffer starting at
+    * the current {@code readerIndex} and increases the {@code readerIndex}
+    * by the number of the transferred bytes (= {@code length}).
+    * The returned buffer's {@code readerIndex} and {@code writerIndex} are
+    * {@code 0} and {@code length} respectively.
+    *
+    * @param length the number of bytes to transfer
+    *
+    * @return the newly created buffer which contains the transferred bytes
+    *
+    * @throws IndexOutOfBoundsException
+    *         if {@code length} is greater than {@code this.readableBytes}
+    */
+   ActiveMQBuffer readBytes(int length);
+
+   /**
+    * Returns a new slice of this buffer's sub-region starting at the current
+    * {@code readerIndex} and increases the {@code readerIndex} by the size
+    * of the new slice (= {@code length}).
+    *
+    * @param length the size of the new slice
+    *
+    * @return the newly created slice
+    *
+    * @throws IndexOutOfBoundsException
+    *         if {@code length} is greater than {@code this.readableBytes}
+    */
+   ActiveMQBuffer readSlice(int length);
+
+   /**
+    * Transfers this buffer's data to the specified destination starting at
+    * the current {@code readerIndex} until the destination becomes
+    * non-writable, and increases the {@code readerIndex} by the number of the
+    * transferred bytes.  This method is basically same with
+    * {@link #readBytes(ActiveMQBuffer, int, int)}, except that this method
+    * increases the {@code writerIndex} of the destination by the number of
+    * the transferred bytes while {@link #readBytes(ActiveMQBuffer, int, int)}
+    * does not.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if {@code dst.writableBytes} is greater than
+    *            {@code this.readableBytes}
+    */
+   void readBytes(ActiveMQBuffer dst);
+
+   /**
+    * Transfers this buffer's data to the specified destination starting at
+    * the current {@code readerIndex} and increases the {@code readerIndex}
+    * by the number of the transferred bytes (= {@code length}).  This method
+    * is basically same with {@link #readBytes(ActiveMQBuffer, int, int)},
+    * except that this method increases the {@code writerIndex} of the
+    * destination by the number of the transferred bytes (= {@code length})
+    * while {@link #readBytes(ActiveMQBuffer, int, int)} does not.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if {@code length} is greater than {@code this.readableBytes} or
+    *         if {@code length} is greater than {@code dst.writableBytes}
+    */
+   void readBytes(ActiveMQBuffer dst, int length);
+
+   /**
+    * Transfers this buffer's data to the specified destination starting at
+    * the current {@code readerIndex} and increases the {@code readerIndex}
+    * by the number of the transferred bytes (= {@code length}).
+    *
+    * @param dstIndex the first index of the destination
+    * @param length   the number of bytes to transfer
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the specified {@code dstIndex} is less than {@code 0},
+    *         if {@code length} is greater than {@code this.readableBytes}, or
+    *         if {@code dstIndex + length} is greater than
+    *            {@code dst.capacity}
+    */
+   void readBytes(ActiveMQBuffer dst, int dstIndex, int length);
+
+   /**
+    * Transfers this buffer's data to the specified destination starting at
+    * the current {@code readerIndex} and increases the {@code readerIndex}
+    * by the number of the transferred bytes (= {@code dst.length}).
+    *
+    * @throws IndexOutOfBoundsException
+    *         if {@code dst.length} is greater than {@code this.readableBytes}
+    */
+   void readBytes(byte[] dst);
+
+   /**
+    * Transfers this buffer's data to the specified destination starting at
+    * the current {@code readerIndex} and increases the {@code readerIndex}
+    * by the number of the transferred bytes (= {@code length}).
+    *
+    * @param dstIndex the first index of the destination
+    * @param length   the number of bytes to transfer
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the specified {@code dstIndex} is less than {@code 0},
+    *         if {@code length} is greater than {@code this.readableBytes}, or
+    *         if {@code dstIndex + length} is greater than {@code dst.length}
+    */
+   void readBytes(byte[] dst, int dstIndex, int length);
+
+   /**
+    * Transfers this buffer's data to the specified destination starting at
+    * the current {@code readerIndex} until the destination's position
+    * reaches its limit, and increases the {@code readerIndex} by the
+    * number of the transferred bytes.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if {@code dst.remaining()} is greater than
+    *            {@code this.readableBytes}
+    */
+   void readBytes(ByteBuffer dst);
+
+   /**
+    * Increases the current {@code readerIndex} by the specified
+    * {@code length} in this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if {@code length} is greater than {@code this.readableBytes}
+    */
+   void skipBytes(int length);
+
+   /**
+    * Sets the specified byte at the current {@code writerIndex}
+    * and increases the {@code writerIndex} by {@code 1} in this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if {@code this.writableBytes} is less than {@code 1}
+    */
+   void writeByte(byte  value);
+
+   /**
+    * Sets the specified 16-bit short integer at the current
+    * {@code writerIndex} and increases the {@code writerIndex} by {@code 2}
+    * in this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if {@code this.writableBytes} is less than {@code 2}
+    */
+   void writeShort(short value);
+
+   /**
+    * Sets the specified 32-bit integer at the current {@code writerIndex}
+    * and increases the {@code writerIndex} by {@code 4} in this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if {@code this.writableBytes} is less than {@code 4}
+    */
+   void writeInt(int   value);
+
+   /**
+    * Sets the specified 64-bit long integer at the current
+    * {@code writerIndex} and increases the {@code writerIndex} by {@code 8}
+    * in this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if {@code this.writableBytes} is less than {@code 8}
+    */
+   void writeLong(long  value);
+
+   /**
+    * Sets the specified char at the current {@code writerIndex}
+    * and increases the {@code writerIndex} by {@code 2} in this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if {@code this.writableBytes} is less than {@code 2}
+    */
+   void writeChar(char chr);
+
+   /**
+    * Sets the specified float at the current {@code writerIndex}
+    * and increases the {@code writerIndex} by {@code 4} in this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if {@code this.writableBytes} is less than {@code 4}
+    */
+   void writeFloat(float value);
+
+   /**
+    * Sets the specified double at the current {@code writerIndex}
+    * and increases the {@code writerIndex} by {@code 8} in this buffer.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if {@code this.writableBytes} is less than {@code 8}
+    */
+   void writeDouble(double value);
+
+   /**
+    * Sets the specified boolean at the current {@code writerIndex}
+    */
+   void writeBoolean(boolean val);
+
+   /**
+    * Sets the specified SimpleString (potentially {@code null}) at the current {@code writerIndex}
+    */
+   void writeNullableSimpleString(SimpleString val);
+
+   /**
+    * Sets the specified String (potentially {@code null}) at the current {@code writerIndex}
+    */
+   void writeNullableString(String val);
+
+   /**
+    * Sets the specified non-null SimpleString at the current {@code writerIndex}
+    */
+   void writeSimpleString(SimpleString val);
+
+   /**
+    * Sets the specified non-null String at the current {@code writerIndex}
+    */
+   void writeString(String val);
+
+   /**
+    * Sets the specified UTF-8 String at the current {@code writerIndex}
+    */
+
+   void writeUTF(String utf);
+
+   /**
+    * Transfers the specified source buffer's data to this buffer starting at
+    * the current {@code writerIndex} and increases the {@code writerIndex}
+    * by the number of the transferred bytes (= {@code length}).  This method
+    * is basically same with {@link #writeBytes(ActiveMQBuffer, int, int)},
+    * except that this method increases the {@code readerIndex} of the source
+    * buffer by the number of the transferred bytes (= {@code length}) while
+    * {@link #writeBytes(ActiveMQBuffer, int, int)} does not.
+    *
+    * @param length the number of bytes to transfer
+    *
+    * @throws IndexOutOfBoundsException
+    *         if {@code length} is greater than {@code this.writableBytes} or
+    *         if {@code length} is greater then {@code src.readableBytes}
+    */
+   void writeBytes(ActiveMQBuffer src, int length);
+
+   /**
+    * Transfers the specified source buffer's data to this buffer starting at
+    * the current {@code writerIndex} and increases the {@code writerIndex}
+    * by the number of the transferred bytes (= {@code length}).
+    *
+    * @param srcIndex the first index of the source
+    * @param length   the number of bytes to transfer
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the specified {@code srcIndex} is less than {@code 0},
+    *         if {@code srcIndex + length} is greater than
+    *            {@code src.capacity}, or
+    *         if {@code length} is greater than {@code this.writableBytes}
+    */
+   void writeBytes(ActiveMQBuffer src, int srcIndex, int length);
+
+   /**
+    * Transfers the specified source array's data to this buffer starting at
+    * the current {@code writerIndex} and increases the {@code writerIndex}
+    * by the number of the transferred bytes (= {@code src.length}).
+    *
+    * @throws IndexOutOfBoundsException
+    *         if {@code src.length} is greater than {@code this.writableBytes}
+    */
+   void writeBytes(byte[] src);
+
+   /**
+    * Transfers the specified source array's data to this buffer starting at
+    * the current {@code writerIndex} and increases the {@code writerIndex}
+    * by the number of the transferred bytes (= {@code length}).
+    *
+    * @param srcIndex the first index of the source
+    * @param length   the number of bytes to transfer
+    *
+    * @throws IndexOutOfBoundsException
+    *         if the specified {@code srcIndex} is less than {@code 0},
+    *         if {@code srcIndex + length} is greater than
+    *            {@code src.length}, or
+    *         if {@code length} is greater than {@code this.writableBytes}
+    */
+   void writeBytes(byte[] src, int srcIndex, int length);
+
+   /**
+    * Transfers the specified source buffer's data to this buffer starting at
+    * the current {@code writerIndex} until the source buffer's position
+    * reaches its limit, and increases the {@code writerIndex} by the
+    * number of the transferred bytes.
+    *
+    * @throws IndexOutOfBoundsException
+    *         if {@code src.remaining()} is greater than
+    *            {@code this.writableBytes}
+    */
+   void writeBytes(ByteBuffer src);
+
+   /**
+    * Returns a copy of this buffer's readable bytes.  Modifying the content
+    * of the returned buffer or this buffer does not affect each other at all.
+    * This method is identical to {@code buf.copy(buf.readerIndex(), buf.readableBytes())}.
+    * This method does not modify {@code readerIndex} or {@code writerIndex} of
+    * this buffer.
+    *
+    */
+   ActiveMQBuffer copy();
+
+   /**
+    * Returns a copy of this buffer's sub-region.  Modifying the content of
+    * the returned buffer or this buffer does not affect each other at all.
+    * This method does not modify {@code readerIndex} or {@code writerIndex} of
+    * this buffer.
+    */
+   ActiveMQBuffer copy(int index, int length);
+
+   /**
+    * Returns a slice of this buffer's readable bytes. Modifying the content
+    * of the returned buffer or this buffer affects each other's content
+    * while they maintain separate indexes and marks.  This method is
+    * identical to {@code buf.slice(buf.readerIndex(), buf.readableBytes())}.
+    * This method does not modify {@code readerIndex} or {@code writerIndex} of
+    * this buffer.
+    */
+   ActiveMQBuffer slice();
+
+   /**
+    * Returns a slice of this buffer's sub-region. Modifying the content of
+    * the returned buffer or this buffer affects each other's content while
+    * they maintain separate indexes and marks.
+    * This method does not modify {@code readerIndex} or {@code writerIndex} of
+    * this buffer.
+    */
+   ActiveMQBuffer slice(int index, int length);
+
+   /**
+    * Returns a buffer which shares the whole region of this buffer.
+    * Modifying the content of the returned buffer or this buffer affects
+    * each other's content while they maintain separate indexes and marks.
+    * This method is identical to {@code buf.slice(0, buf.capacity())}.
+    * This method does not modify {@code readerIndex} or {@code writerIndex} of
+    * this buffer.
+    */
+   ActiveMQBuffer duplicate();
+
+   /**
+    * Converts this buffer's readable bytes into a NIO buffer.  The returned
+    * buffer might or might not share the content with this buffer, while
+    * they have separate indexes and marks.  This method is identical to
+    * {@code buf.toByteBuffer(buf.readerIndex(), buf.readableBytes())}.
+    * This method does not modify {@code readerIndex} or {@code writerIndex} of
+    * this buffer.
+    */
+   ByteBuffer toByteBuffer();
+
+   /**
+    * Converts this buffer's sub-region into a NIO buffer.  The returned
+    * buffer might or might not share the content with this buffer, while
+    * they have separate indexes and marks.
+    * This method does not modify {@code readerIndex} or {@code writerIndex} of
+    * this buffer.
+    */
+   ByteBuffer toByteBuffer(int index, int length);
+}

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQBuffers.java
----------------------------------------------------------------------
diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQBuffers.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQBuffers.java
new file mode 100644
index 0000000..482e801
--- /dev/null
+++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQBuffers.java
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2005-2014 Red Hat, Inc.
+ * Red Hat licenses this file to you under the Apache License, version
+ * 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.  See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+package org.apache.activemq.api.core;
+
+import java.nio.ByteBuffer;
+
+import io.netty.buffer.Unpooled;
+import org.apache.activemq.core.buffers.impl.ChannelBufferWrapper;
+
+/**
+ * Factory class to create instances of {@link ActiveMQBuffer}.
+ * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
+ */
+public final class ActiveMQBuffers
+{
+   /**
+    * Creates a <em>self-expanding</em> HornetQBuffer with the given initial size
+    *
+    * @param size the initial size of the created HornetQBuffer
+    * @return a self-expanding HornetQBuffer starting with the given size
+    */
+   public static ActiveMQBuffer dynamicBuffer(final int size)
+   {
+      return new ChannelBufferWrapper(Unpooled.buffer(size));
+   }
+
+   /**
+    * Creates a <em>self-expanding</em> HornetQBuffer filled with the given byte array
+    *
+    * @param bytes the created buffer will be initially filled with this byte array
+    * @return a self-expanding HornetQBuffer filled with the given byte array
+    */
+   public static ActiveMQBuffer dynamicBuffer(final byte[] bytes)
+   {
+      ActiveMQBuffer buff = dynamicBuffer(bytes.length);
+
+      buff.writeBytes(bytes);
+
+      return buff;
+   }
+
+   /**
+    * Creates a HornetQBuffer wrapping an underlying NIO ByteBuffer
+    *
+    * The position on this buffer won't affect the position on the inner buffer
+    *
+    * @param underlying the underlying NIO ByteBuffer
+    * @return a HornetQBuffer wrapping the underlying NIO ByteBuffer
+    */
+   public static ActiveMQBuffer wrappedBuffer(final ByteBuffer underlying)
+   {
+      ActiveMQBuffer buff = new ChannelBufferWrapper(Unpooled.wrappedBuffer(underlying));
+
+      buff.clear();
+
+      return buff;
+   }
+
+   /**
+    * Creates a HornetQBuffer wrapping an underlying byte array
+    *
+    * @param underlying the underlying byte array
+    * @return a HornetQBuffer wrapping the underlying byte array
+    */
+   public static ActiveMQBuffer wrappedBuffer(final byte[] underlying)
+   {
+      return new ChannelBufferWrapper(Unpooled.wrappedBuffer(underlying));
+   }
+
+   /**
+    * Creates a <em>fixed</em> HornetQBuffer of the given size
+    *
+    * @param size the size of the created HornetQBuffer
+    * @return a fixed HornetQBuffer with the given size
+    */
+   public static ActiveMQBuffer fixedBuffer(final int size)
+   {
+      return new ChannelBufferWrapper(Unpooled.buffer(size, size));
+   }
+
+   private ActiveMQBuffers()
+   {
+      // Utility class
+   }
+}

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/1bf2e41f/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQClusterSecurityException.java
----------------------------------------------------------------------
diff --git a/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQClusterSecurityException.java b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQClusterSecurityException.java
new file mode 100644
index 0000000..01a30a0
--- /dev/null
+++ b/activemq-commons/src/main/java/org/apache/activemq/api/core/ActiveMQClusterSecurityException.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2005-2014 Red Hat, Inc.
+ * Red Hat licenses this file to you under the Apache License, version
+ * 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.  See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+package org.apache.activemq.api.core;
+
+/**
+ * Security exception thrown when the cluster user fails authentication.
+ */
+public final class ActiveMQClusterSecurityException extends ActiveMQException
+{
+   private static final long serialVersionUID = -5890578849781297933L;
+
+   public ActiveMQClusterSecurityException()
+   {
+      super(ActiveMQExceptionType.CLUSTER_SECURITY_EXCEPTION);
+   }
+
+   public ActiveMQClusterSecurityException(final String msg)
+   {
+      super(ActiveMQExceptionType.CLUSTER_SECURITY_EXCEPTION, msg);
+   }
+}


Mime
View raw message