mirror of
https://github.com/apache/activemq-artemis.git
synced 2025-02-20 17:05:51 +00:00
Merged PR #8
This commit is contained in:
commit
571fb7a236
85
README.md
85
README.md
@ -1,10 +1,4 @@
|
||||
# HornetQ
|
||||
|
||||
If you need information about the HornetQ project please go to
|
||||
|
||||
http://community.jboss.org/wiki/HornetQ
|
||||
|
||||
http://www.jboss.org/hornetq/
|
||||
# ActiveMQ6
|
||||
|
||||
This file describes some minimum 'stuff one needs to know' to get
|
||||
started coding in this project.
|
||||
@ -13,7 +7,7 @@ started coding in this project.
|
||||
|
||||
The project's source code is hosted at:
|
||||
|
||||
https://github.com/hornetq
|
||||
https://git-wip-us.apache.org/repos/asf/activemq-6.git
|
||||
|
||||
### Git usage:
|
||||
|
||||
@ -100,7 +94,7 @@ can be installed from [Eclipse Kepler release repository].
|
||||
|
||||
### Annotation Pre-Processing
|
||||
|
||||
HornetQ uses [JBoss Logging] and that requires source code generation from Java
|
||||
ActiveMQ6 uses [JBoss Logging] and that requires source code generation from Java
|
||||
annotations. In order for it to 'just work' in Eclipse you need to install the
|
||||
_Maven Integration for Eclipse JDT Annotation Processor Toolkit_ [m2e-apt]. See
|
||||
this [JBoss blog post] for details.
|
||||
@ -122,7 +116,7 @@ do this with Eclipse Juno (4.2).
|
||||
|
||||
The current recommended solution for Eclipse Kepler is to mark
|
||||
`javacc-maven-plugin` as ignored by Eclipse, run Maven from the
|
||||
command line and then modify the project `hornetq-core-client` adding
|
||||
command line and then modify the project `activemq-core-client` adding
|
||||
the folder `target/generated-sources/javacc` to its build path.
|
||||
|
||||
[m2e connector for javacc-maven-plugin]: https://github.com/objectledge/maven-extensions
|
||||
@ -131,7 +125,7 @@ http://dev.eclipse.org/mhonarc/lists/m2e-users/msg02725.html
|
||||
|
||||
### Use _Project Working Sets_
|
||||
|
||||
Importing all HornetQ subprojects will create _too many_ projects in Eclipse,
|
||||
Importing all ActiveMQ6 subprojects will create _too many_ projects in Eclipse,
|
||||
cluttering your _Package Explorer_ and _Project Explorer_ views. One way to address
|
||||
that is to use [Eclipse's Working Sets] feature. A good introduction to it can be
|
||||
found at a [Dzone article on Eclipse Working Sets].
|
||||
@ -161,7 +155,8 @@ Do not use the [maven-eclipse-plugin] to copy the files as it conflicts with [m2
|
||||
### Repositories
|
||||
|
||||
The code repository for ActiveMQ6 is hosted by Apache org and lives here: https://git-wip-us.apache.org/repos/asf/activemq-6.git.
|
||||
We also host a mirror of the ActiveMQ repository on GitHub: https://github.com/apache/activemq-6. We use this mirror for all code submissions and reviews. To submit code to ActiveMQ please open a Pull Request as outlined as part of the GitHub workflow described here: https://guides.github.com/introduction/flow/index.html. Once a pull request is opened it will be reviewed and commented on. Any further changes as a result of comments / review process should be addressed and reflected in the original pull request as outlined in the GitHub workflow. When the pull request has went through the review process and ready to merge, the reviewer should comment with "Ack, Ready to Push". Once an Ack message is received one of the ActiveMQ core team members will push the changes to upstream Apache ActiveMQ repository and close the pull request.
|
||||
|
||||
We also host a mirror of the ActiveMQ repository on GitHub: https://github.com/apache/activemq-6. We use this mirror for all code submissions and reviews. To submit code to ActiveMQ6 please open a Pull Request as outlined as part of the GitHub workflow described here: https://guides.github.com/introduction/flow/index.html. Once a pull request is opened it will be reviewed and commented on. Any further changes as a result of comments / review process should be addressed and reflected in the original pull request as outlined in the GitHub workflow. When the pull request has went through the review process and ready to merge, the reviewer should comment with "Ack, Ready to Push". Once an Ack message is received one of the ActiveMQ6 core team members will push the changes to upstream Apache ActiveMQ6 repository and close the pull request.
|
||||
|
||||
### Commit Messages
|
||||
|
||||
@ -186,23 +181,24 @@ do and why the commit was added.
|
||||
|
||||
### Core Contributers
|
||||
|
||||
Core ActiveMQ members have write access to the Apache ActiveMQ repositories and will be responsible for Ack'ing and pushing commits contributed via pull requests on GitHub. The follow steps can be used as an example for how to set up relevant ActiveMQ repositories for reviewing and pushing changes.
|
||||
Core ActiveMQ6 members have write access to the Apache ActiveMQ6 repositories and will be responsible for Ack'ing and pushing commits contributed via pull requests on GitHub. The follow steps can be used as an example for how to set up relevant ActiveMQ6 repositories for reviewing and pushing changes.
|
||||
|
||||
To setup repositories for reviewing and pushing:
|
||||
|
||||
```
|
||||
# Clone the GitHub Mirror of ActiveMQ Repo:
|
||||
```bash
|
||||
# Clone the GitHub Mirror of ActiveMQ6 Repo:
|
||||
git clone git@github.com:apache/activemq-6.git
|
||||
|
||||
# Add the following section to your <activemq-6 repo>/.git/config statement to fetch all pull requests sent to the GitHub mirror. Note that the remote name for git@github.com:apache/activemq-6.git may be different. Be sure to edit all references to the remote name. In this case "activemq".
|
||||
[remote "activemq"]
|
||||
# Add the following section to your <activemq6 repo>/.git/config statement to fetch all pull requests sent to the GitHub mirror. Note that the remote name for git@github.com:apache/activemq-6.git may be different. Be sure to edit all references to the remote name. In this case "activemq".
|
||||
|
||||
[remote "origin"]
|
||||
url = git@github.com:apache/activemq-6.git
|
||||
fetch = +refs/heads/*:refs/remotes/activemq/*
|
||||
fetch = +refs/pull/*/head:refs/remotes/activemq/pr/*
|
||||
fetch = +refs/heads/*:refs/remotes/origin/*
|
||||
fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
|
||||
|
||||
|
||||
# Add the Apache repository as a remote
|
||||
git remote add apache https://git-wip-us.apache.org/repos/asf/activemq-6.git
|
||||
git remote add upstream https://git-wip-us.apache.org/repos/asf/activemq-6.git
|
||||
|
||||
# Fetch
|
||||
git fetch --all
|
||||
@ -210,8 +206,8 @@ To setup repositories for reviewing and pushing:
|
||||
|
||||
To push commits from a pull request to the apache repository:
|
||||
|
||||
```
|
||||
cd <activemq repo>
|
||||
```bash
|
||||
cd <activemq6 repo>
|
||||
|
||||
# Download all the remote branches etc... including all the pull requests.
|
||||
git fetch --all
|
||||
@ -219,9 +215,46 @@ To push commits from a pull request to the apache repository:
|
||||
# Checkout the pull request you wish to review
|
||||
git checkout pr/2
|
||||
|
||||
# Ensure this patch is rebased onto apache/master
|
||||
git rebase apache/master
|
||||
# Review is done... READY TO MERGE.
|
||||
|
||||
# Continue through review process. Once an Ack has been sent. Push to the Apache ActiveMQ6 repo
|
||||
git push apache pr/2:master
|
||||
# Check out the master branch.
|
||||
git checkout master
|
||||
|
||||
# Ensure you are up to date
|
||||
git pull
|
||||
|
||||
# Create a new merge commit from the
|
||||
git merge --no-ff pr/2
|
||||
|
||||
# IMPORTANT: In this commit message be sure to write something along the lines of: "Merge Pull Request #2" Where 2 is the Pull Request ID. "#2" shows up as a link in the GitHub UI for navigating to the PR from the commit message.
|
||||
|
||||
# Pushes to the upstream repo.
|
||||
git push upstream master
|
||||
```
|
||||
|
||||
#### Notes:
|
||||
|
||||
The GitHub mirror repository is cloning the Apache ActiveMQ6 repository (The root repository). There maybe a slight delay between when a commit is pushed to the Apache repo and when that commit is reflected in the GitHub mirror. This may cause some difficulty when trying to push a PR to upstream (Apache) that has been merged on an out of date GitHub (mirror) master. You can wait for the mirror to update before performing the steps above. A solution to this is to change local master branch to track the upstream (Apache) master, rather than GitHub (mirror) master by editing your config to look like this:
|
||||
|
||||
```bash
|
||||
[branch "master"]
|
||||
remote = upstream
|
||||
merge = refs/heads/master
|
||||
```
|
||||
|
||||
Where upstream points to the Apache Repo.
|
||||
|
||||
If you'd like master to always track GitHub master, then another way to acheive this is to add another branch that tracks upstream master and push from that branch to upstream master e.g.
|
||||
|
||||
```bash
|
||||
# .git/config entry
|
||||
[branch "umaster"]
|
||||
remote = upstream
|
||||
merge = refs/heads/master
|
||||
|
||||
git checkout umaster
|
||||
git pull
|
||||
git merge --no-ff pr/2
|
||||
git push upstream umaster:master # Push local branch umaster to upstream branch master.
|
||||
```
|
||||
|
||||
|
@ -3,14 +3,14 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.hornetq</groupId>
|
||||
<artifactId>hornetq-pom</artifactId>
|
||||
<version>2.5.0-SNAPSHOT</version>
|
||||
<groupId>org.apache.activemq</groupId>
|
||||
<artifactId>activemq-pom</artifactId>
|
||||
<version>6.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>hornetq-bootstrap</artifactId>
|
||||
<artifactId>activemq-bootstrap</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>HornetQ Bootstrap</name>
|
||||
<name>ActiveMQ6 Bootstrap</name>
|
||||
|
||||
<properties>
|
||||
<hornetq.basedir>${project.basedir}/..</hornetq.basedir>
|
||||
@ -18,18 +18,18 @@
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.hornetq</groupId>
|
||||
<artifactId>hornetq-server</artifactId>
|
||||
<groupId>org.apache.activemq</groupId>
|
||||
<artifactId>activemq-server</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hornetq</groupId>
|
||||
<artifactId>hornetq-jms-server</artifactId>
|
||||
<groupId>org.apache.activemq</groupId>
|
||||
<artifactId>activemq-jms-server</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hornetq</groupId>
|
||||
<artifactId>hornetq-dto</artifactId>
|
||||
<groupId>org.apache.activemq</groupId>
|
||||
<artifactId>activemq-dto</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
@ -10,30 +10,30 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.cli;
|
||||
package org.apache.activemq.cli;
|
||||
|
||||
import io.airlift.command.Cli;
|
||||
import io.airlift.command.ParseArgumentsUnexpectedException;
|
||||
import org.hornetq.cli.commands.Action;
|
||||
import org.hornetq.cli.commands.ActionContext;
|
||||
import org.hornetq.cli.commands.HelpAction;
|
||||
import org.hornetq.cli.commands.Run;
|
||||
import org.hornetq.cli.commands.Stop;
|
||||
import org.apache.activemq.cli.commands.Action;
|
||||
import org.apache.activemq.cli.commands.ActionContext;
|
||||
import org.apache.activemq.cli.commands.HelpAction;
|
||||
import org.apache.activemq.cli.commands.Run;
|
||||
import org.apache.activemq.cli.commands.Stop;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
|
||||
public class HornetQ
|
||||
public class ActiveMQ
|
||||
{
|
||||
|
||||
public static void main(String[] args) throws Exception
|
||||
{
|
||||
Cli.CliBuilder<Action> builder = Cli.<Action>builder("hornetq")
|
||||
Cli.CliBuilder<Action> builder = Cli.<Action>builder("activemq")
|
||||
.withDefaultCommand(HelpAction.class)
|
||||
.withCommand(Run.class)
|
||||
.withCommand(Stop.class)
|
||||
.withCommand(HelpAction.class)
|
||||
.withDescription("HornetQ Command Line");
|
||||
.withDescription("ActiveMQ Command Line");
|
||||
|
||||
Cli<Action> parser = builder.build();
|
||||
|
||||
@ -51,14 +51,14 @@ public class HornetQ
|
||||
{
|
||||
System.err.println(configException.getMessage());
|
||||
System.out.println();
|
||||
System.out.println("Configuration should be specified as 'scheme:location'. Default configuration is 'xml:${HORNETQ_HOME}/config/non-clustered/bootstrap.xml'");
|
||||
System.out.println("Configuration should be specified as 'scheme:location'. Default configuration is 'xml:${ACTIVEMQ_HOME}/config/non-clustered/bootstrap.xml'");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void printBanner() throws Exception
|
||||
{
|
||||
copy(HornetQ.class.getResourceAsStream("banner.txt"), System.out);
|
||||
copy(ActiveMQ.class.getResourceAsStream("banner.txt"), System.out);
|
||||
}
|
||||
|
||||
private static long copy(InputStream in, OutputStream out) throws Exception
|
@ -10,7 +10,7 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.cli;
|
||||
package org.apache.activemq.cli;
|
||||
|
||||
public class ConfigurationException extends Exception
|
||||
{
|
@ -10,7 +10,7 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.cli.commands;
|
||||
package org.apache.activemq.cli.commands;
|
||||
|
||||
public interface Action
|
||||
{
|
@ -10,7 +10,7 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.cli.commands;
|
||||
package org.apache.activemq.cli.commands;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.PrintStream;
|
@ -10,7 +10,7 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.cli.commands;
|
||||
package org.apache.activemq.cli.commands;
|
||||
|
||||
import io.airlift.command.Help;
|
||||
|
@ -10,25 +10,25 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.cli.commands;
|
||||
package org.apache.activemq.cli.commands;
|
||||
|
||||
import io.airlift.command.Arguments;
|
||||
import io.airlift.command.Command;
|
||||
|
||||
import org.hornetq.cli.HornetQ;
|
||||
import org.hornetq.core.config.Configuration;
|
||||
import org.hornetq.core.server.impl.HornetQServerImpl;
|
||||
import org.hornetq.dto.BrokerDTO;
|
||||
import org.hornetq.factory.BrokerFactory;
|
||||
import org.hornetq.factory.CoreFactory;
|
||||
import org.hornetq.factory.JmsFactory;
|
||||
import org.hornetq.factory.SecurityManagerFactory;
|
||||
import org.hornetq.integration.bootstrap.HornetQBootstrapLogger;
|
||||
import org.hornetq.jms.server.JMSServerManager;
|
||||
import org.hornetq.jms.server.config.JMSConfiguration;
|
||||
import org.hornetq.jms.server.impl.JMSServerManagerImpl;
|
||||
import org.hornetq.jms.server.impl.StandaloneNamingServer;
|
||||
import org.hornetq.spi.core.security.HornetQSecurityManager;
|
||||
import org.apache.activemq.cli.ActiveMQ;
|
||||
import org.apache.activemq.core.config.Configuration;
|
||||
import org.apache.activemq.core.server.impl.HornetQServerImpl;
|
||||
import org.apache.activemq.dto.BrokerDTO;
|
||||
import org.apache.activemq.factory.BrokerFactory;
|
||||
import org.apache.activemq.factory.CoreFactory;
|
||||
import org.apache.activemq.factory.JmsFactory;
|
||||
import org.apache.activemq.factory.SecurityManagerFactory;
|
||||
import org.apache.activemq.integration.bootstrap.HornetQBootstrapLogger;
|
||||
import org.apache.activemq.jms.server.JMSServerManager;
|
||||
import org.apache.activemq.jms.server.config.JMSConfiguration;
|
||||
import org.apache.activemq.jms.server.impl.JMSServerManagerImpl;
|
||||
import org.apache.activemq.jms.server.impl.StandaloneNamingServer;
|
||||
import org.apache.activemq.spi.core.security.HornetQSecurityManager;
|
||||
|
||||
import javax.management.MBeanServer;
|
||||
|
||||
@ -41,7 +41,7 @@ import java.util.TimerTask;
|
||||
public class Run implements Action
|
||||
{
|
||||
|
||||
@Arguments(description = "Broker Configuration URI, default 'xml:${HORNETQ_HOME}/config/non-clustered/bootstrap.xml'")
|
||||
@Arguments(description = "Broker Configuration URI, default 'xml:${ACTIVEMQ_HOME}/config/non-clustered/bootstrap.xml'")
|
||||
String configuration;
|
||||
private StandaloneNamingServer namingServer;
|
||||
private JMSServerManager jmsServerManager;
|
||||
@ -50,11 +50,11 @@ public class Run implements Action
|
||||
public Object execute(ActionContext context) throws Exception
|
||||
{
|
||||
|
||||
HornetQ.printBanner();
|
||||
ActiveMQ.printBanner();
|
||||
|
||||
if (configuration == null)
|
||||
{
|
||||
configuration = "xml:" + System.getProperty("hornetq.home").replace("\\", "/") + "/config/non-clustered/bootstrap.xml";
|
||||
configuration = "xml:" + System.getProperty("activemq.home").replace("\\", "/") + "/config/non-clustered/bootstrap.xml";
|
||||
}
|
||||
|
||||
System.out.println("Loading configuration file: " + configuration);
|
||||
@ -117,7 +117,7 @@ public class Run implements Action
|
||||
HornetQBootstrapLogger.LOGGER.errorDeletingFile(file.getAbsolutePath());
|
||||
}
|
||||
}
|
||||
final Timer timer = new Timer("HornetQ Server Shutdown Timer", true);
|
||||
final Timer timer = new Timer("ActiveMQ Server Shutdown Timer", true);
|
||||
timer.scheduleAtFixedRate(new TimerTask()
|
||||
{
|
||||
@Override
|
@ -10,19 +10,19 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.cli.commands;
|
||||
package org.apache.activemq.cli.commands;
|
||||
|
||||
import io.airlift.command.Arguments;
|
||||
import io.airlift.command.Command;
|
||||
import org.hornetq.dto.BrokerDTO;
|
||||
import org.hornetq.factory.BrokerFactory;
|
||||
import org.apache.activemq.dto.BrokerDTO;
|
||||
import org.apache.activemq.factory.BrokerFactory;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@Command(name = "stop", description = "stops the broker instance")
|
||||
public class Stop implements Action
|
||||
{
|
||||
@Arguments(description = "Broker Configuration URI, default 'xml:${HORNETQ_HOME}/config/non-clustered/bootstrap.xml'")
|
||||
@Arguments(description = "Broker Configuration URI, default 'xml:${ACTIVEMQ_HOME}/config/non-clustered/bootstrap.xml'")
|
||||
String configuration;
|
||||
|
||||
@Override
|
||||
@ -30,7 +30,7 @@ public class Stop implements Action
|
||||
{
|
||||
if (configuration == null)
|
||||
{
|
||||
configuration = "xml:" + System.getProperty("hornetq.home").replace("\\", "/") + "/config/non-clustered/bootstrap.xml";
|
||||
configuration = "xml:" + System.getProperty("activemq.home").replace("\\", "/") + "/config/non-clustered/bootstrap.xml";
|
||||
}
|
||||
BrokerDTO broker = BrokerFactory.createBroker(configuration);
|
||||
|
@ -10,11 +10,11 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.factory;
|
||||
package org.apache.activemq.factory;
|
||||
|
||||
import org.hornetq.cli.ConfigurationException;
|
||||
import org.hornetq.dto.BrokerDTO;
|
||||
import org.hornetq.utils.FactoryFinder;
|
||||
import org.apache.activemq.cli.ConfigurationException;
|
||||
import org.apache.activemq.dto.BrokerDTO;
|
||||
import org.apache.activemq.utils.FactoryFinder;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
@ -32,7 +32,7 @@ public class BrokerFactory
|
||||
BrokerFactoryHandler factory = null;
|
||||
try
|
||||
{
|
||||
FactoryFinder finder = new FactoryFinder("META-INF/services/org/hornetq/broker/");
|
||||
FactoryFinder finder = new FactoryFinder("META-INF/services/org/apache/activemq/broker/");
|
||||
factory = (BrokerFactoryHandler)finder.newInstance(configURI.getScheme());
|
||||
}
|
||||
catch (IOException ioe )
|
@ -10,9 +10,9 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.factory;
|
||||
package org.apache.activemq.factory;
|
||||
|
||||
import org.hornetq.dto.BrokerDTO;
|
||||
import org.apache.activemq.dto.BrokerDTO;
|
||||
|
||||
import java.net.URI;
|
||||
|
@ -10,13 +10,13 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.factory;
|
||||
package org.apache.activemq.factory;
|
||||
|
||||
import org.hornetq.cli.ConfigurationException;
|
||||
import org.hornetq.core.config.Configuration;
|
||||
import org.hornetq.core.config.impl.ConfigurationImpl;
|
||||
import org.hornetq.dto.CoreDTO;
|
||||
import org.hornetq.utils.FactoryFinder;
|
||||
import org.apache.activemq.cli.ConfigurationException;
|
||||
import org.apache.activemq.core.config.Configuration;
|
||||
import org.apache.activemq.core.config.impl.ConfigurationImpl;
|
||||
import org.apache.activemq.dto.CoreDTO;
|
||||
import org.apache.activemq.utils.FactoryFinder;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
@ -31,7 +31,7 @@ public class CoreFactory
|
||||
URI configURI = new URI(core.configuration.replace("\\", "/"));
|
||||
try
|
||||
{
|
||||
FactoryFinder finder = new FactoryFinder("META-INF/services/org/hornetq/broker/core/");
|
||||
FactoryFinder finder = new FactoryFinder("META-INF/services/org/apache/activemq/broker/core/");
|
||||
factory = (CoreFactoryHandler)finder.newInstance(configURI.getScheme());
|
||||
}
|
||||
catch (IOException ioe )
|
@ -10,9 +10,9 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.factory;
|
||||
package org.apache.activemq.factory;
|
||||
|
||||
import org.hornetq.core.config.Configuration;
|
||||
import org.apache.activemq.core.config.Configuration;
|
||||
|
||||
import java.net.URI;
|
||||
|
@ -10,10 +10,10 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.factory;
|
||||
package org.apache.activemq.factory;
|
||||
|
||||
import org.hornetq.core.config.Configuration;
|
||||
import org.hornetq.core.config.impl.FileConfiguration;
|
||||
import org.apache.activemq.core.config.Configuration;
|
||||
import org.apache.activemq.core.config.impl.FileConfiguration;
|
||||
|
||||
import java.net.URI;
|
||||
|
@ -10,10 +10,10 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.factory;
|
||||
package org.apache.activemq.factory;
|
||||
|
||||
import org.hornetq.jms.server.config.JMSConfiguration;
|
||||
import org.hornetq.jms.server.impl.JMSServerConfigParserImpl;
|
||||
import org.apache.activemq.jms.server.config.JMSConfiguration;
|
||||
import org.apache.activemq.jms.server.impl.JMSServerConfigParserImpl;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.InputStream;
|
@ -10,15 +10,15 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.factory;
|
||||
package org.apache.activemq.factory;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
|
||||
import org.hornetq.cli.ConfigurationException;
|
||||
import org.hornetq.dto.JmsDTO;
|
||||
import org.hornetq.jms.server.config.JMSConfiguration;
|
||||
import org.hornetq.utils.FactoryFinder;
|
||||
import org.apache.activemq.cli.ConfigurationException;
|
||||
import org.apache.activemq.dto.JmsDTO;
|
||||
import org.apache.activemq.jms.server.config.JMSConfiguration;
|
||||
import org.apache.activemq.utils.FactoryFinder;
|
||||
|
||||
public class JmsFactory
|
||||
{
|
||||
@ -30,7 +30,7 @@ public class JmsFactory
|
||||
URI configURI = new URI(jms.configuration.replace("\\", "/"));
|
||||
try
|
||||
{
|
||||
FactoryFinder finder = new FactoryFinder("META-INF/services/org/hornetq/broker/jms/");
|
||||
FactoryFinder finder = new FactoryFinder("META-INF/services/org/apache/activemq/broker/jms/");
|
||||
factory = (JmsFactoryHandler)finder.newInstance(configURI.getScheme());
|
||||
}
|
||||
catch (IOException ioe )
|
@ -10,9 +10,9 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.factory;
|
||||
package org.apache.activemq.factory;
|
||||
|
||||
import org.hornetq.jms.server.config.JMSConfiguration;
|
||||
import org.apache.activemq.jms.server.config.JMSConfiguration;
|
||||
|
||||
import java.net.URI;
|
||||
|
@ -10,11 +10,11 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.factory;
|
||||
package org.apache.activemq.factory;
|
||||
|
||||
import org.hornetq.dto.SecurityDTO;
|
||||
import org.hornetq.spi.core.security.HornetQSecurityManager;
|
||||
import org.hornetq.utils.FactoryFinder;
|
||||
import org.apache.activemq.dto.SecurityDTO;
|
||||
import org.apache.activemq.spi.core.security.HornetQSecurityManager;
|
||||
import org.apache.activemq.utils.FactoryFinder;
|
||||
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@ -25,7 +25,7 @@ public class SecurityManagerFactory
|
||||
{
|
||||
if (config != null)
|
||||
{
|
||||
FactoryFinder finder = new FactoryFinder("META-INF/services/org/hornetq/security/");
|
||||
FactoryFinder finder = new FactoryFinder("META-INF/services/org/apache/activemq/security/");
|
||||
HornetQSecurityManager manager = (HornetQSecurityManager)finder.newInstance(config.getClass().getAnnotation(XmlRootElement.class).name());
|
||||
return manager;
|
||||
}
|
@ -10,11 +10,11 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.factory;
|
||||
package org.apache.activemq.factory;
|
||||
|
||||
import org.hornetq.cli.ConfigurationException;
|
||||
import org.hornetq.dto.BrokerDTO;
|
||||
import org.hornetq.dto.XmlUtil;
|
||||
import org.apache.activemq.cli.ConfigurationException;
|
||||
import org.apache.activemq.dto.BrokerDTO;
|
||||
import org.apache.activemq.dto.XmlUtil;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.URI;
|
@ -10,7 +10,7 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.integration.bootstrap;
|
||||
package org.apache.activemq.integration.bootstrap;
|
||||
|
||||
|
||||
import org.jboss.logging.annotations.MessageBundle;
|
@ -11,7 +11,7 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.integration.bootstrap;
|
||||
package org.apache.activemq.integration.bootstrap;
|
||||
|
||||
import org.jboss.logging.BasicLogger;
|
||||
import org.jboss.logging.Logger;
|
||||
@ -46,11 +46,11 @@ public interface HornetQBootstrapLogger extends BasicLogger
|
||||
HornetQBootstrapLogger LOGGER = Logger.getMessageLogger(HornetQBootstrapLogger.class, HornetQBootstrapLogger.class.getPackage().getName());
|
||||
|
||||
@LogMessage(level = Logger.Level.INFO)
|
||||
@Message(id = 101000, value = "Starting HornetQ Server", format = Message.Format.MESSAGE_FORMAT)
|
||||
@Message(id = 101000, value = "Starting ActiveMQ Server", format = Message.Format.MESSAGE_FORMAT)
|
||||
void serverStarting();
|
||||
|
||||
@LogMessage(level = Logger.Level.INFO)
|
||||
@Message(id = 101001, value = "Stopping HornetQ Server", format = Message.Format.MESSAGE_FORMAT)
|
||||
@Message(id = 101001, value = "Stopping ActiveMQ Server", format = Message.Format.MESSAGE_FORMAT)
|
||||
void serverStopping();
|
||||
|
||||
@LogMessage(level = Logger.Level.INFO)
|
@ -10,4 +10,4 @@
|
||||
## implied. See the License for the specific language governing
|
||||
## permissions and limitations under the License.
|
||||
## ---------------------------------------------------------------------------
|
||||
class=org.hornetq.factory.FileJmsFactoryHandler
|
||||
class=org.apache.activemq.factory.FileCoreFactoryHandler
|
@ -10,4 +10,4 @@
|
||||
## implied. See the License for the specific language governing
|
||||
## permissions and limitations under the License.
|
||||
## ---------------------------------------------------------------------------
|
||||
class=org.hornetq.factory.FileCoreFactoryHandler
|
||||
class=org.apache.activemq.factory.FileJmsFactoryHandler
|
@ -10,4 +10,4 @@
|
||||
## implied. See the License for the specific language governing
|
||||
## permissions and limitations under the License.
|
||||
## ---------------------------------------------------------------------------
|
||||
class=org.hornetq.factory.XmlBrokerFactoryHandler
|
||||
class=org.apache.activemq.factory.XmlBrokerFactoryHandler
|
@ -3,14 +3,14 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.hornetq</groupId>
|
||||
<artifactId>hornetq-pom</artifactId>
|
||||
<version>2.5.0-SNAPSHOT</version>
|
||||
<groupId>org.apache.activemq</groupId>
|
||||
<artifactId>activemq-pom</artifactId>
|
||||
<version>6.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>hornetq-commons</artifactId>
|
||||
<artifactId>activemq-commons</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>HornetQ Commons</name>
|
||||
<name>ActiveMQ6 Commons</name>
|
||||
|
||||
<properties>
|
||||
<hornetq.basedir>${project.basedir}/..</hornetq.basedir>
|
@ -11,24 +11,24 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
import static org.hornetq.api.core.HornetQExceptionType.ADDRESS_EXISTS;
|
||||
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 HornetQAddressExistsException extends HornetQException
|
||||
public final class ActiveMQAddressExistsException extends ActiveMQException
|
||||
{
|
||||
private static final long serialVersionUID = 3032730450033992367L;
|
||||
|
||||
public HornetQAddressExistsException()
|
||||
public ActiveMQAddressExistsException()
|
||||
{
|
||||
super(ADDRESS_EXISTS);
|
||||
}
|
||||
|
||||
public HornetQAddressExistsException(String msg)
|
||||
public ActiveMQAddressExistsException(String msg)
|
||||
{
|
||||
super(ADDRESS_EXISTS, msg);
|
||||
}
|
@ -11,24 +11,24 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
import static org.hornetq.api.core.HornetQExceptionType.ADDRESS_FULL;
|
||||
import static org.apache.activemq.api.core.ActiveMQExceptionType.ADDRESS_FULL;
|
||||
|
||||
/**
|
||||
* An address is full.
|
||||
* @author Justin Bertram
|
||||
*/
|
||||
public final class HornetQAddressFullException extends HornetQException
|
||||
public final class ActiveMQAddressFullException extends ActiveMQException
|
||||
{
|
||||
private static final long serialVersionUID = 0;
|
||||
|
||||
public HornetQAddressFullException(String message)
|
||||
public ActiveMQAddressFullException(String message)
|
||||
{
|
||||
super(ADDRESS_FULL, message);
|
||||
}
|
||||
|
||||
public HornetQAddressFullException()
|
||||
public ActiveMQAddressFullException()
|
||||
{
|
||||
super(ADDRESS_FULL);
|
||||
}
|
@ -11,24 +11,24 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
import static org.hornetq.api.core.HornetQExceptionType.ALREADY_REPLICATING;
|
||||
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 HornetQAlreadyReplicatingException extends HornetQException
|
||||
public final class ActiveMQAlreadyReplicatingException extends ActiveMQException
|
||||
{
|
||||
private static final long serialVersionUID = -7352538521961996152L;
|
||||
|
||||
public HornetQAlreadyReplicatingException()
|
||||
public ActiveMQAlreadyReplicatingException()
|
||||
{
|
||||
super(ALREADY_REPLICATING);
|
||||
}
|
||||
|
||||
public HornetQAlreadyReplicatingException(String msg)
|
||||
public ActiveMQAlreadyReplicatingException(String msg)
|
||||
{
|
||||
super(ALREADY_REPLICATING, msg);
|
||||
}
|
@ -11,7 +11,7 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
@ -20,13 +20,13 @@ 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 HornetQBuffers} factory.
|
||||
* 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 HornetQBuffers
|
||||
* @see ActiveMQBuffers
|
||||
*/
|
||||
public interface HornetQBuffer
|
||||
public interface ActiveMQBuffer
|
||||
{
|
||||
/**
|
||||
* Returns the underlying Netty's ByteBuf
|
||||
@ -287,10 +287,10 @@ public interface HornetQBuffer
|
||||
* 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, HornetQBuffer, int, int)}, except that this
|
||||
* {@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, HornetQBuffer, int, int)} does not.
|
||||
* {@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}).
|
||||
*
|
||||
@ -299,15 +299,15 @@ public interface HornetQBuffer
|
||||
* if {@code index + dst.writableBytes} is greater than
|
||||
* {@code this.capacity}
|
||||
*/
|
||||
void getBytes(int index, HornetQBuffer dst);
|
||||
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, HornetQBuffer, int, int)}, except that this
|
||||
* 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, HornetQBuffer, int, int)} does not.
|
||||
* {@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}).
|
||||
*
|
||||
@ -319,7 +319,7 @@ public interface HornetQBuffer
|
||||
* {@code this.capacity}, or
|
||||
* if {@code length} is greater than {@code dst.writableBytes}
|
||||
*/
|
||||
void getBytes(int index, HornetQBuffer dst, int length);
|
||||
void getBytes(int index, ActiveMQBuffer dst, int length);
|
||||
|
||||
/**
|
||||
* Transfers this buffer's data to the specified destination starting at
|
||||
@ -338,7 +338,7 @@ public interface HornetQBuffer
|
||||
* if {@code dstIndex + length} is greater than
|
||||
* {@code dst.capacity}
|
||||
*/
|
||||
void getBytes(int index, HornetQBuffer dst, int dstIndex, int length);
|
||||
void getBytes(int index, ActiveMQBuffer dst, int dstIndex, int length);
|
||||
|
||||
/**
|
||||
* Transfers this buffer's data to the specified destination starting at
|
||||
@ -471,10 +471,10 @@ public interface HornetQBuffer
|
||||
* 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, HornetQBuffer, int, int)}, except that this
|
||||
* {@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, HornetQBuffer, int, int)} does not.
|
||||
* {@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}).
|
||||
*
|
||||
@ -483,15 +483,15 @@ public interface HornetQBuffer
|
||||
* if {@code index + src.readableBytes} is greater than
|
||||
* {@code this.capacity}
|
||||
*/
|
||||
void setBytes(int index, HornetQBuffer src);
|
||||
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, HornetQBuffer, int, int)}, except that this
|
||||
* 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, HornetQBuffer, int, int)} does not.
|
||||
* {@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}).
|
||||
*
|
||||
@ -503,7 +503,7 @@ public interface HornetQBuffer
|
||||
* {@code this.capacity}, or
|
||||
* if {@code length} is greater than {@code src.readableBytes}
|
||||
*/
|
||||
void setBytes(int index, HornetQBuffer src, int length);
|
||||
void setBytes(int index, ActiveMQBuffer src, int length);
|
||||
|
||||
/**
|
||||
* Transfers the specified source buffer's data to this buffer starting at
|
||||
@ -522,7 +522,7 @@ public interface HornetQBuffer
|
||||
* if {@code srcIndex + length} is greater than
|
||||
* {@code src.capacity}
|
||||
*/
|
||||
void setBytes(int index, HornetQBuffer src, int srcIndex, int length);
|
||||
void setBytes(int index, ActiveMQBuffer src, int srcIndex, int length);
|
||||
|
||||
/**
|
||||
* Transfers the specified source array's data to this buffer starting at
|
||||
@ -740,7 +740,7 @@ public interface HornetQBuffer
|
||||
* @throws IndexOutOfBoundsException
|
||||
* if {@code length} is greater than {@code this.readableBytes}
|
||||
*/
|
||||
HornetQBuffer readBytes(int length);
|
||||
ActiveMQBuffer readBytes(int length);
|
||||
|
||||
/**
|
||||
* Returns a new slice of this buffer's sub-region starting at the current
|
||||
@ -754,38 +754,38 @@ public interface HornetQBuffer
|
||||
* @throws IndexOutOfBoundsException
|
||||
* if {@code length} is greater than {@code this.readableBytes}
|
||||
*/
|
||||
HornetQBuffer readSlice(int length);
|
||||
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(HornetQBuffer, int, int)}, except that this method
|
||||
* {@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(HornetQBuffer, int, int)}
|
||||
* 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(HornetQBuffer dst);
|
||||
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(HornetQBuffer, int, int)},
|
||||
* 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(HornetQBuffer, int, int)} does not.
|
||||
* 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(HornetQBuffer dst, int length);
|
||||
void readBytes(ActiveMQBuffer dst, int length);
|
||||
|
||||
/**
|
||||
* Transfers this buffer's data to the specified destination starting at
|
||||
@ -801,7 +801,7 @@ public interface HornetQBuffer
|
||||
* if {@code dstIndex + length} is greater than
|
||||
* {@code dst.capacity}
|
||||
*/
|
||||
void readBytes(HornetQBuffer dst, int dstIndex, int length);
|
||||
void readBytes(ActiveMQBuffer dst, int dstIndex, int length);
|
||||
|
||||
/**
|
||||
* Transfers this buffer's data to the specified destination starting at
|
||||
@ -949,10 +949,10 @@ public interface HornetQBuffer
|
||||
* 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(HornetQBuffer, int, int)},
|
||||
* 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(HornetQBuffer, int, int)} does not.
|
||||
* {@link #writeBytes(ActiveMQBuffer, int, int)} does not.
|
||||
*
|
||||
* @param length the number of bytes to transfer
|
||||
*
|
||||
@ -960,7 +960,7 @@ public interface HornetQBuffer
|
||||
* if {@code length} is greater than {@code this.writableBytes} or
|
||||
* if {@code length} is greater then {@code src.readableBytes}
|
||||
*/
|
||||
void writeBytes(HornetQBuffer src, int length);
|
||||
void writeBytes(ActiveMQBuffer src, int length);
|
||||
|
||||
/**
|
||||
* Transfers the specified source buffer's data to this buffer starting at
|
||||
@ -976,7 +976,7 @@ public interface HornetQBuffer
|
||||
* {@code src.capacity}, or
|
||||
* if {@code length} is greater than {@code this.writableBytes}
|
||||
*/
|
||||
void writeBytes(HornetQBuffer src, int srcIndex, int length);
|
||||
void writeBytes(ActiveMQBuffer src, int srcIndex, int length);
|
||||
|
||||
/**
|
||||
* Transfers the specified source array's data to this buffer starting at
|
||||
@ -1024,7 +1024,7 @@ public interface HornetQBuffer
|
||||
* this buffer.
|
||||
*
|
||||
*/
|
||||
HornetQBuffer copy();
|
||||
ActiveMQBuffer copy();
|
||||
|
||||
/**
|
||||
* Returns a copy of this buffer's sub-region. Modifying the content of
|
||||
@ -1032,7 +1032,7 @@ public interface HornetQBuffer
|
||||
* This method does not modify {@code readerIndex} or {@code writerIndex} of
|
||||
* this buffer.
|
||||
*/
|
||||
HornetQBuffer copy(int index, int length);
|
||||
ActiveMQBuffer copy(int index, int length);
|
||||
|
||||
/**
|
||||
* Returns a slice of this buffer's readable bytes. Modifying the content
|
||||
@ -1042,7 +1042,7 @@ public interface HornetQBuffer
|
||||
* This method does not modify {@code readerIndex} or {@code writerIndex} of
|
||||
* this buffer.
|
||||
*/
|
||||
HornetQBuffer slice();
|
||||
ActiveMQBuffer slice();
|
||||
|
||||
/**
|
||||
* Returns a slice of this buffer's sub-region. Modifying the content of
|
||||
@ -1051,7 +1051,7 @@ public interface HornetQBuffer
|
||||
* This method does not modify {@code readerIndex} or {@code writerIndex} of
|
||||
* this buffer.
|
||||
*/
|
||||
HornetQBuffer slice(int index, int length);
|
||||
ActiveMQBuffer slice(int index, int length);
|
||||
|
||||
/**
|
||||
* Returns a buffer which shares the whole region of this buffer.
|
||||
@ -1061,7 +1061,7 @@ public interface HornetQBuffer
|
||||
* This method does not modify {@code readerIndex} or {@code writerIndex} of
|
||||
* this buffer.
|
||||
*/
|
||||
HornetQBuffer duplicate();
|
||||
ActiveMQBuffer duplicate();
|
||||
|
||||
/**
|
||||
* Converts this buffer's readable bytes into a NIO buffer. The returned
|
@ -11,18 +11,18 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
import io.netty.buffer.Unpooled;
|
||||
import org.hornetq.core.buffers.impl.ChannelBufferWrapper;
|
||||
import org.apache.activemq.core.buffers.impl.ChannelBufferWrapper;
|
||||
|
||||
/**
|
||||
* Factory class to create instances of {@link HornetQBuffer}.
|
||||
* Factory class to create instances of {@link ActiveMQBuffer}.
|
||||
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
|
||||
*/
|
||||
public final class HornetQBuffers
|
||||
public final class ActiveMQBuffers
|
||||
{
|
||||
/**
|
||||
* Creates a <em>self-expanding</em> HornetQBuffer with the given initial size
|
||||
@ -30,7 +30,7 @@ public final class HornetQBuffers
|
||||
* @param size the initial size of the created HornetQBuffer
|
||||
* @return a self-expanding HornetQBuffer starting with the given size
|
||||
*/
|
||||
public static HornetQBuffer dynamicBuffer(final int size)
|
||||
public static ActiveMQBuffer dynamicBuffer(final int size)
|
||||
{
|
||||
return new ChannelBufferWrapper(Unpooled.buffer(size));
|
||||
}
|
||||
@ -41,9 +41,9 @@ public final class HornetQBuffers
|
||||
* @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 HornetQBuffer dynamicBuffer(final byte[] bytes)
|
||||
public static ActiveMQBuffer dynamicBuffer(final byte[] bytes)
|
||||
{
|
||||
HornetQBuffer buff = dynamicBuffer(bytes.length);
|
||||
ActiveMQBuffer buff = dynamicBuffer(bytes.length);
|
||||
|
||||
buff.writeBytes(bytes);
|
||||
|
||||
@ -58,9 +58,9 @@ public final class HornetQBuffers
|
||||
* @param underlying the underlying NIO ByteBuffer
|
||||
* @return a HornetQBuffer wrapping the underlying NIO ByteBuffer
|
||||
*/
|
||||
public static HornetQBuffer wrappedBuffer(final ByteBuffer underlying)
|
||||
public static ActiveMQBuffer wrappedBuffer(final ByteBuffer underlying)
|
||||
{
|
||||
HornetQBuffer buff = new ChannelBufferWrapper(Unpooled.wrappedBuffer(underlying));
|
||||
ActiveMQBuffer buff = new ChannelBufferWrapper(Unpooled.wrappedBuffer(underlying));
|
||||
|
||||
buff.clear();
|
||||
|
||||
@ -73,7 +73,7 @@ public final class HornetQBuffers
|
||||
* @param underlying the underlying byte array
|
||||
* @return a HornetQBuffer wrapping the underlying byte array
|
||||
*/
|
||||
public static HornetQBuffer wrappedBuffer(final byte[] underlying)
|
||||
public static ActiveMQBuffer wrappedBuffer(final byte[] underlying)
|
||||
{
|
||||
return new ChannelBufferWrapper(Unpooled.wrappedBuffer(underlying));
|
||||
}
|
||||
@ -84,12 +84,12 @@ public final class HornetQBuffers
|
||||
* @param size the size of the created HornetQBuffer
|
||||
* @return a fixed HornetQBuffer with the given size
|
||||
*/
|
||||
public static HornetQBuffer fixedBuffer(final int size)
|
||||
public static ActiveMQBuffer fixedBuffer(final int size)
|
||||
{
|
||||
return new ChannelBufferWrapper(Unpooled.buffer(size, size));
|
||||
}
|
||||
|
||||
private HornetQBuffers()
|
||||
private ActiveMQBuffers()
|
||||
{
|
||||
// Utility class
|
||||
}
|
@ -11,22 +11,22 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
/**
|
||||
* Security exception thrown when the cluster user fails authentication.
|
||||
*/
|
||||
public final class HornetQClusterSecurityException extends HornetQException
|
||||
public final class ActiveMQClusterSecurityException extends ActiveMQException
|
||||
{
|
||||
private static final long serialVersionUID = -5890578849781297933L;
|
||||
|
||||
public HornetQClusterSecurityException()
|
||||
public ActiveMQClusterSecurityException()
|
||||
{
|
||||
super(HornetQExceptionType.CLUSTER_SECURITY_EXCEPTION);
|
||||
super(ActiveMQExceptionType.CLUSTER_SECURITY_EXCEPTION);
|
||||
}
|
||||
|
||||
public HornetQClusterSecurityException(final String msg)
|
||||
public ActiveMQClusterSecurityException(final String msg)
|
||||
{
|
||||
super(HornetQExceptionType.CLUSTER_SECURITY_EXCEPTION, msg);
|
||||
super(ActiveMQExceptionType.CLUSTER_SECURITY_EXCEPTION, msg);
|
||||
}
|
||||
}
|
@ -11,24 +11,24 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
import static org.hornetq.api.core.HornetQExceptionType.CONNECTION_TIMEDOUT;
|
||||
import static org.apache.activemq.api.core.ActiveMQExceptionType.CONNECTION_TIMEDOUT;
|
||||
|
||||
/**
|
||||
* A client timed out will connecting to HornetQ server.
|
||||
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> 4/30/12
|
||||
*/
|
||||
public final class HornetQConnectionTimedOutException extends HornetQException
|
||||
public final class ActiveMQConnectionTimedOutException extends ActiveMQException
|
||||
{
|
||||
private static final long serialVersionUID = 3244233758084830372L;
|
||||
|
||||
public HornetQConnectionTimedOutException()
|
||||
public ActiveMQConnectionTimedOutException()
|
||||
{
|
||||
super(CONNECTION_TIMEDOUT);
|
||||
}
|
||||
|
||||
public HornetQConnectionTimedOutException(String msg)
|
||||
public ActiveMQConnectionTimedOutException(String msg)
|
||||
{
|
||||
super(CONNECTION_TIMEDOUT, msg);
|
||||
}
|
@ -11,24 +11,24 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
import static org.hornetq.api.core.HornetQExceptionType.DISCONNECTED;
|
||||
import static org.apache.activemq.api.core.ActiveMQExceptionType.DISCONNECTED;
|
||||
|
||||
/**
|
||||
* A client was disconnected from HornetQ server when the server has shut down.
|
||||
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> 4/30/12
|
||||
*/
|
||||
public final class HornetQDisconnectedException extends HornetQException
|
||||
public final class ActiveMQDisconnectedException extends ActiveMQException
|
||||
{
|
||||
private static final long serialVersionUID = 7414966383933311627L;
|
||||
|
||||
public HornetQDisconnectedException()
|
||||
public ActiveMQDisconnectedException()
|
||||
{
|
||||
super(DISCONNECTED);
|
||||
}
|
||||
|
||||
public HornetQDisconnectedException(String message)
|
||||
public ActiveMQDisconnectedException(String message)
|
||||
{
|
||||
super(DISCONNECTED, message);
|
||||
}
|
@ -11,24 +11,24 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
import static org.hornetq.api.core.HornetQExceptionType.DUPLICATE_ID_REJECTED;
|
||||
import static org.apache.activemq.api.core.ActiveMQExceptionType.DUPLICATE_ID_REJECTED;
|
||||
|
||||
/**
|
||||
* A DuplicateID was rejected.
|
||||
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> 5/2/12
|
||||
*/
|
||||
public final class HornetQDuplicateIdException extends HornetQException
|
||||
public final class ActiveMQDuplicateIdException extends ActiveMQException
|
||||
{
|
||||
private static final long serialVersionUID = -4302979339865777119L;
|
||||
|
||||
public HornetQDuplicateIdException()
|
||||
public ActiveMQDuplicateIdException()
|
||||
{
|
||||
super(DUPLICATE_ID_REJECTED);
|
||||
}
|
||||
|
||||
public HornetQDuplicateIdException(String message)
|
||||
public ActiveMQDuplicateIdException(String message)
|
||||
{
|
||||
super(DUPLICATE_ID_REJECTED, message);
|
||||
}
|
@ -11,24 +11,24 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
import static org.hornetq.api.core.HornetQExceptionType.DUPLICATE_METADATA;
|
||||
import static org.apache.activemq.api.core.ActiveMQExceptionType.DUPLICATE_METADATA;
|
||||
|
||||
/**
|
||||
* A Session Metadata was set in duplication
|
||||
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> 5/2/12
|
||||
*/
|
||||
public final class HornetQDuplicateMetaDataException extends HornetQException
|
||||
public final class ActiveMQDuplicateMetaDataException extends ActiveMQException
|
||||
{
|
||||
private static final long serialVersionUID = 7877182872143004058L;
|
||||
|
||||
public HornetQDuplicateMetaDataException()
|
||||
public ActiveMQDuplicateMetaDataException()
|
||||
{
|
||||
super(DUPLICATE_METADATA);
|
||||
}
|
||||
|
||||
public HornetQDuplicateMetaDataException(String msg)
|
||||
public ActiveMQDuplicateMetaDataException(String msg)
|
||||
{
|
||||
super(DUPLICATE_METADATA, msg);
|
||||
}
|
@ -10,59 +10,59 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
/**
|
||||
* HornetQException is the root exception for the HornetQ API.
|
||||
* ActiveMQException is the root exception for the ActiveMQ API.
|
||||
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
|
||||
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
|
||||
*/
|
||||
public class HornetQException extends Exception
|
||||
public class ActiveMQException extends Exception
|
||||
{
|
||||
private static final long serialVersionUID = -4802014152804997417L;
|
||||
|
||||
private final HornetQExceptionType type;
|
||||
private final ActiveMQExceptionType type;
|
||||
|
||||
public HornetQException()
|
||||
public ActiveMQException()
|
||||
{
|
||||
type = HornetQExceptionType.GENERIC_EXCEPTION;
|
||||
type = ActiveMQExceptionType.GENERIC_EXCEPTION;
|
||||
}
|
||||
|
||||
public HornetQException(final String msg)
|
||||
public ActiveMQException(final String msg)
|
||||
{
|
||||
super(msg);
|
||||
type = HornetQExceptionType.GENERIC_EXCEPTION;
|
||||
type = ActiveMQExceptionType.GENERIC_EXCEPTION;
|
||||
}
|
||||
|
||||
/*
|
||||
* This constructor is needed only for the native layer
|
||||
*/
|
||||
public HornetQException(int code, String msg)
|
||||
public ActiveMQException(int code, String msg)
|
||||
{
|
||||
super(msg);
|
||||
|
||||
this.type = HornetQExceptionType.getType(code);
|
||||
this.type = ActiveMQExceptionType.getType(code);
|
||||
}
|
||||
|
||||
public HornetQException(HornetQExceptionType type, String msg)
|
||||
public ActiveMQException(ActiveMQExceptionType type, String msg)
|
||||
{
|
||||
super(msg);
|
||||
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public HornetQException(HornetQExceptionType type)
|
||||
public ActiveMQException(ActiveMQExceptionType type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public HornetQException(HornetQExceptionType type, String message, Throwable t)
|
||||
public ActiveMQException(ActiveMQExceptionType type, String message, Throwable t)
|
||||
{
|
||||
super(message, t);
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public HornetQExceptionType getType()
|
||||
public ActiveMQExceptionType getType()
|
||||
{
|
||||
return type;
|
||||
}
|
@ -0,0 +1,298 @@
|
||||
/*
|
||||
* 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.util.Collections;
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Defines all {@link ActiveMQException} types and their codes.
|
||||
*/
|
||||
public enum ActiveMQExceptionType
|
||||
{
|
||||
|
||||
// Error codes -------------------------------------------------
|
||||
|
||||
INTERNAL_ERROR(000)
|
||||
{
|
||||
@Override
|
||||
public ActiveMQException createException(String msg)
|
||||
{
|
||||
return new ActiveMQInternalErrorException(msg);
|
||||
}
|
||||
},
|
||||
UNSUPPORTED_PACKET(001)
|
||||
{
|
||||
@Override
|
||||
public ActiveMQException createException(String msg)
|
||||
{
|
||||
return new ActiveMQUnsupportedPacketException(msg);
|
||||
}
|
||||
},
|
||||
NOT_CONNECTED(002)
|
||||
{
|
||||
@Override
|
||||
public ActiveMQException createException(String msg)
|
||||
{
|
||||
return new ActiveMQNotConnectedException(msg);
|
||||
}
|
||||
},
|
||||
CONNECTION_TIMEDOUT(003)
|
||||
{
|
||||
@Override
|
||||
public ActiveMQException createException(String msg)
|
||||
{
|
||||
return new ActiveMQConnectionTimedOutException(msg);
|
||||
}
|
||||
},
|
||||
DISCONNECTED(004)
|
||||
{
|
||||
@Override
|
||||
public ActiveMQException createException(String msg)
|
||||
{
|
||||
return new ActiveMQDisconnectedException(msg);
|
||||
}
|
||||
},
|
||||
UNBLOCKED(005)
|
||||
{
|
||||
@Override
|
||||
public ActiveMQException createException(String msg)
|
||||
{
|
||||
return new ActiveMQUnBlockedException(msg);
|
||||
}
|
||||
},
|
||||
IO_ERROR(006)
|
||||
{
|
||||
@Override
|
||||
public ActiveMQException createException(String msg)
|
||||
{
|
||||
return new ActiveMQIOErrorException(msg);
|
||||
}
|
||||
},
|
||||
QUEUE_DOES_NOT_EXIST(100)
|
||||
{
|
||||
@Override
|
||||
public ActiveMQException createException(String msg)
|
||||
{
|
||||
return new ActiveMQNonExistentQueueException(msg);
|
||||
}
|
||||
},
|
||||
QUEUE_EXISTS(101)
|
||||
{
|
||||
@Override
|
||||
public ActiveMQException createException(String msg)
|
||||
{
|
||||
return new ActiveMQQueueExistsException(msg);
|
||||
}
|
||||
},
|
||||
OBJECT_CLOSED(102)
|
||||
{
|
||||
@Override
|
||||
public ActiveMQException createException(String msg)
|
||||
{
|
||||
return new ActiveMQObjectClosedException(msg);
|
||||
}
|
||||
},
|
||||
INVALID_FILTER_EXPRESSION(103)
|
||||
{
|
||||
@Override
|
||||
public ActiveMQException createException(String msg)
|
||||
{
|
||||
return new ActiveMQInvalidFilterExpressionException(msg);
|
||||
}
|
||||
},
|
||||
ILLEGAL_STATE(104)
|
||||
{
|
||||
@Override
|
||||
public ActiveMQException createException(String msg)
|
||||
{
|
||||
return new ActiveMQIllegalStateException(msg);
|
||||
}
|
||||
},
|
||||
SECURITY_EXCEPTION(105)
|
||||
{
|
||||
@Override
|
||||
public ActiveMQException createException(String msg)
|
||||
{
|
||||
return new ActiveMQSecurityException(msg);
|
||||
}
|
||||
},
|
||||
ADDRESS_EXISTS(107)
|
||||
{
|
||||
@Override
|
||||
public ActiveMQException createException(String msg)
|
||||
{
|
||||
return new ActiveMQAddressExistsException(msg);
|
||||
}
|
||||
},
|
||||
INCOMPATIBLE_CLIENT_SERVER_VERSIONS(108)
|
||||
{
|
||||
@Override
|
||||
public ActiveMQException createException(String msg)
|
||||
{
|
||||
return new ActiveMQIncompatibleClientServerException(msg);
|
||||
}
|
||||
},
|
||||
LARGE_MESSAGE_ERROR_BODY(110)
|
||||
{
|
||||
@Override
|
||||
public ActiveMQException createException(String msg)
|
||||
{
|
||||
return new ActiveMQLargeMessageException(msg);
|
||||
}
|
||||
},
|
||||
TRANSACTION_ROLLED_BACK(111)
|
||||
{
|
||||
@Override
|
||||
public ActiveMQException createException(String msg)
|
||||
{
|
||||
return new ActiveMQTransactionRolledBackException(msg);
|
||||
}
|
||||
},
|
||||
SESSION_CREATION_REJECTED(112)
|
||||
{
|
||||
@Override
|
||||
public ActiveMQException createException(String msg)
|
||||
{
|
||||
return new ActiveMQSessionCreationException(msg);
|
||||
}
|
||||
},
|
||||
DUPLICATE_ID_REJECTED(113)
|
||||
{
|
||||
@Override
|
||||
public ActiveMQException createException(String msg)
|
||||
{
|
||||
return new ActiveMQDuplicateIdException(msg);
|
||||
}
|
||||
},
|
||||
DUPLICATE_METADATA(114)
|
||||
{
|
||||
@Override
|
||||
public ActiveMQException createException(String msg)
|
||||
{
|
||||
return new ActiveMQDuplicateMetaDataException(msg);
|
||||
}
|
||||
},
|
||||
TRANSACTION_OUTCOME_UNKNOWN(115)
|
||||
{
|
||||
@Override
|
||||
public ActiveMQException createException(String msg)
|
||||
{
|
||||
return new ActiveMQTransactionOutcomeUnknownException(msg);
|
||||
}
|
||||
},
|
||||
ALREADY_REPLICATING(116)
|
||||
{
|
||||
@Override
|
||||
public ActiveMQException createException(String msg)
|
||||
{
|
||||
return new ActiveMQAlreadyReplicatingException(msg);
|
||||
}
|
||||
},
|
||||
INTERCEPTOR_REJECTED_PACKET(117)
|
||||
{
|
||||
@Override
|
||||
public ActiveMQException createException(String msg)
|
||||
{
|
||||
return new ActiveMQInterceptorRejectedPacketException(msg);
|
||||
}
|
||||
},
|
||||
INVALID_TRANSIENT_QUEUE_USE(118)
|
||||
{
|
||||
@Override
|
||||
public ActiveMQException createException(String msg)
|
||||
{
|
||||
return new ActiveMQInvalidTransientQueueUseException(msg);
|
||||
}
|
||||
},
|
||||
|
||||
GENERIC_EXCEPTION(999),
|
||||
NATIVE_ERROR_INTERNAL(200),
|
||||
NATIVE_ERROR_INVALID_BUFFER(201),
|
||||
NATIVE_ERROR_NOT_ALIGNED(202),
|
||||
NATIVE_ERROR_CANT_INITIALIZE_AIO(203),
|
||||
NATIVE_ERROR_CANT_RELEASE_AIO(204),
|
||||
NATIVE_ERROR_CANT_OPEN_CLOSE_FILE(205),
|
||||
NATIVE_ERROR_CANT_ALLOCATE_QUEUE(206),
|
||||
NATIVE_ERROR_PREALLOCATE_FILE(208),
|
||||
NATIVE_ERROR_ALLOCATE_MEMORY(209),
|
||||
ADDRESS_FULL(210)
|
||||
{
|
||||
@Override
|
||||
public ActiveMQException createException(String msg)
|
||||
{
|
||||
return new ActiveMQAddressFullException(msg);
|
||||
}
|
||||
},
|
||||
LARGE_MESSAGE_INTERRUPTED(211)
|
||||
{
|
||||
@Override
|
||||
public ActiveMQException createException(String msg)
|
||||
{
|
||||
return new ActiveMQLargeMessageInterruptedException(msg);
|
||||
}
|
||||
},
|
||||
CLUSTER_SECURITY_EXCEPTION(212)
|
||||
{
|
||||
@Override
|
||||
public ActiveMQException createException(String msg)
|
||||
{
|
||||
return new ActiveMQClusterSecurityException(msg);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
private static final Map<Integer, ActiveMQExceptionType> TYPE_MAP;
|
||||
|
||||
static
|
||||
{
|
||||
HashMap<Integer, ActiveMQExceptionType> map = new HashMap<Integer, ActiveMQExceptionType>();
|
||||
for (ActiveMQExceptionType type : EnumSet.allOf(ActiveMQExceptionType.class))
|
||||
{
|
||||
map.put(type.getCode(), type);
|
||||
}
|
||||
TYPE_MAP = Collections.unmodifiableMap(map);
|
||||
}
|
||||
|
||||
private final int code;
|
||||
|
||||
ActiveMQExceptionType(int code)
|
||||
{
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public int getCode()
|
||||
{
|
||||
return code;
|
||||
}
|
||||
|
||||
public ActiveMQException createException(String msg)
|
||||
{
|
||||
return new ActiveMQException(msg + ", code:" + this);
|
||||
}
|
||||
|
||||
public static ActiveMQException createException(int code, String msg)
|
||||
{
|
||||
return getType(code).createException(msg);
|
||||
}
|
||||
|
||||
public static ActiveMQExceptionType getType(int code)
|
||||
{
|
||||
ActiveMQExceptionType type = TYPE_MAP.get(code);
|
||||
if (type != null)
|
||||
return type;
|
||||
return ActiveMQExceptionType.GENERIC_EXCEPTION;
|
||||
}
|
||||
}
|
@ -11,29 +11,29 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
import static org.hornetq.api.core.HornetQExceptionType.IO_ERROR;
|
||||
import static org.apache.activemq.api.core.ActiveMQExceptionType.IO_ERROR;
|
||||
|
||||
/**
|
||||
* Unexpected I/O error occurred on the server.
|
||||
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> 4/30/12
|
||||
*/
|
||||
public final class HornetQIOErrorException extends HornetQException
|
||||
public final class ActiveMQIOErrorException extends ActiveMQException
|
||||
{
|
||||
private static final long serialVersionUID = 797277117077787396L;
|
||||
|
||||
public HornetQIOErrorException()
|
||||
public ActiveMQIOErrorException()
|
||||
{
|
||||
super(IO_ERROR);
|
||||
}
|
||||
|
||||
public HornetQIOErrorException(String msg)
|
||||
public ActiveMQIOErrorException(String msg)
|
||||
{
|
||||
super(IO_ERROR, msg);
|
||||
}
|
||||
|
||||
public HornetQIOErrorException(String msg, Throwable cause)
|
||||
public ActiveMQIOErrorException(String msg, Throwable cause)
|
||||
{
|
||||
super(IO_ERROR, msg, cause);
|
||||
}
|
@ -11,25 +11,25 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
import static org.hornetq.api.core.HornetQExceptionType.ILLEGAL_STATE;
|
||||
import static org.apache.activemq.api.core.ActiveMQExceptionType.ILLEGAL_STATE;
|
||||
|
||||
/**
|
||||
* A HornetQ resource is not in a legal state (e.g. calling ClientConsumer.receive() if a
|
||||
* MessageHandler is set).
|
||||
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> 5/2/12
|
||||
*/
|
||||
public final class HornetQIllegalStateException extends HornetQException
|
||||
public final class ActiveMQIllegalStateException extends ActiveMQException
|
||||
{
|
||||
private static final long serialVersionUID = -4480125401057788511L;
|
||||
|
||||
public HornetQIllegalStateException()
|
||||
public ActiveMQIllegalStateException()
|
||||
{
|
||||
super(ILLEGAL_STATE);
|
||||
}
|
||||
|
||||
public HornetQIllegalStateException(String message)
|
||||
public ActiveMQIllegalStateException(String message)
|
||||
{
|
||||
super(ILLEGAL_STATE, message);
|
||||
}
|
@ -11,9 +11,9 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
import static org.hornetq.api.core.HornetQExceptionType.INCOMPATIBLE_CLIENT_SERVER_VERSIONS;
|
||||
import static org.apache.activemq.api.core.ActiveMQExceptionType.INCOMPATIBLE_CLIENT_SERVER_VERSIONS;
|
||||
|
||||
/**
|
||||
* The server version and the client version are incompatible.
|
||||
@ -21,16 +21,16 @@ import static org.hornetq.api.core.HornetQExceptionType.INCOMPATIBLE_CLIENT_SERV
|
||||
* Normally this means you are trying to use a newer client on an older server.
|
||||
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
|
||||
*/
|
||||
public final class HornetQIncompatibleClientServerException extends HornetQException
|
||||
public final class ActiveMQIncompatibleClientServerException extends ActiveMQException
|
||||
{
|
||||
private static final long serialVersionUID = -1662999230291452298L;
|
||||
|
||||
public HornetQIncompatibleClientServerException()
|
||||
public ActiveMQIncompatibleClientServerException()
|
||||
{
|
||||
super(INCOMPATIBLE_CLIENT_SERVER_VERSIONS);
|
||||
}
|
||||
|
||||
public HornetQIncompatibleClientServerException(String msg)
|
||||
public ActiveMQIncompatibleClientServerException(String msg)
|
||||
{
|
||||
super(INCOMPATIBLE_CLIENT_SERVER_VERSIONS, msg);
|
||||
}
|
@ -11,26 +11,26 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
import static org.hornetq.api.core.HornetQExceptionType.INTERCEPTOR_REJECTED_PACKET;
|
||||
import static org.apache.activemq.api.core.ActiveMQExceptionType.INTERCEPTOR_REJECTED_PACKET;
|
||||
|
||||
/**
|
||||
* An outgoing interceptor returned false.
|
||||
* @see org.hornetq.api.core.client.ServerLocator#addOutgoingInterceptor(org.hornetq.api.core.Interceptor)
|
||||
* @see org.apache.activemq.api.core.client.ServerLocator#addOutgoingInterceptor(org.apache.activemq.api.core.Interceptor)
|
||||
* @author Justin Bertram
|
||||
*/
|
||||
// XXX I doubt any reader will make much sense of this Javadoc's text.
|
||||
public final class HornetQInterceptorRejectedPacketException extends HornetQException
|
||||
public final class ActiveMQInterceptorRejectedPacketException extends ActiveMQException
|
||||
{
|
||||
private static final long serialVersionUID = -5798841227645281815L;
|
||||
|
||||
public HornetQInterceptorRejectedPacketException()
|
||||
public ActiveMQInterceptorRejectedPacketException()
|
||||
{
|
||||
super(INTERCEPTOR_REJECTED_PACKET);
|
||||
}
|
||||
|
||||
public HornetQInterceptorRejectedPacketException(String msg)
|
||||
public ActiveMQInterceptorRejectedPacketException(String msg)
|
||||
{
|
||||
super(INTERCEPTOR_REJECTED_PACKET, msg);
|
||||
}
|
@ -11,34 +11,34 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
import static org.hornetq.api.core.HornetQExceptionType.INTERNAL_ERROR;
|
||||
import static org.apache.activemq.api.core.ActiveMQExceptionType.INTERNAL_ERROR;
|
||||
|
||||
/**
|
||||
* Internal error which prevented HornetQ from performing an important operation.
|
||||
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> 4/30/12
|
||||
*/
|
||||
public final class HornetQInternalErrorException extends HornetQException
|
||||
public final class ActiveMQInternalErrorException extends ActiveMQException
|
||||
{
|
||||
private static final long serialVersionUID = -5987814047521530695L;
|
||||
|
||||
public HornetQInternalErrorException()
|
||||
public ActiveMQInternalErrorException()
|
||||
{
|
||||
super(INTERNAL_ERROR);
|
||||
}
|
||||
|
||||
public HornetQInternalErrorException(String msg)
|
||||
public ActiveMQInternalErrorException(String msg)
|
||||
{
|
||||
super(INTERNAL_ERROR, msg);
|
||||
}
|
||||
|
||||
public HornetQInternalErrorException(String message, Exception e)
|
||||
public ActiveMQInternalErrorException(String message, Exception e)
|
||||
{
|
||||
super(INTERNAL_ERROR, message, e);
|
||||
}
|
||||
|
||||
public HornetQInternalErrorException(String message, Throwable t)
|
||||
public ActiveMQInternalErrorException(String message, Throwable t)
|
||||
{
|
||||
super(INTERNAL_ERROR, message, t);
|
||||
}
|
@ -10,17 +10,17 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
/**
|
||||
* When an interruption happens, we will just throw a non-checked exception.
|
||||
* @author clebertsuconic
|
||||
*/
|
||||
public final class HornetQInterruptedException extends RuntimeException
|
||||
public final class ActiveMQInterruptedException extends RuntimeException
|
||||
{
|
||||
private static final long serialVersionUID = -5744690023549671221L;
|
||||
|
||||
public HornetQInterruptedException(Throwable cause)
|
||||
public ActiveMQInterruptedException(Throwable cause)
|
||||
{
|
||||
super(cause);
|
||||
}
|
@ -11,24 +11,24 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
import static org.hornetq.api.core.HornetQExceptionType.INVALID_FILTER_EXPRESSION;
|
||||
import static org.apache.activemq.api.core.ActiveMQExceptionType.INVALID_FILTER_EXPRESSION;
|
||||
|
||||
/**
|
||||
* A filter expression was found to be invalid.
|
||||
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> 4/30/12
|
||||
*/
|
||||
public final class HornetQInvalidFilterExpressionException extends HornetQException
|
||||
public final class ActiveMQInvalidFilterExpressionException extends ActiveMQException
|
||||
{
|
||||
private static final long serialVersionUID = 7188625553939665128L;
|
||||
|
||||
public HornetQInvalidFilterExpressionException()
|
||||
public ActiveMQInvalidFilterExpressionException()
|
||||
{
|
||||
super(INVALID_FILTER_EXPRESSION);
|
||||
}
|
||||
|
||||
public HornetQInvalidFilterExpressionException(String msg)
|
||||
public ActiveMQInvalidFilterExpressionException(String msg)
|
||||
{
|
||||
super(INVALID_FILTER_EXPRESSION, msg);
|
||||
}
|
@ -11,24 +11,24 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
import static org.hornetq.api.core.HornetQExceptionType.INVALID_TRANSIENT_QUEUE_USE;
|
||||
import static org.apache.activemq.api.core.ActiveMQExceptionType.INVALID_TRANSIENT_QUEUE_USE;
|
||||
|
||||
/**
|
||||
* An operation failed because a queue exists on the server.
|
||||
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> 4/30/12
|
||||
*/
|
||||
public final class HornetQInvalidTransientQueueUseException extends HornetQException
|
||||
public final class ActiveMQInvalidTransientQueueUseException extends ActiveMQException
|
||||
{
|
||||
private static final long serialVersionUID = -405552292451883063L;
|
||||
|
||||
public HornetQInvalidTransientQueueUseException()
|
||||
public ActiveMQInvalidTransientQueueUseException()
|
||||
{
|
||||
super(INVALID_TRANSIENT_QUEUE_USE);
|
||||
}
|
||||
|
||||
public HornetQInvalidTransientQueueUseException(String msg)
|
||||
public ActiveMQInvalidTransientQueueUseException(String msg)
|
||||
{
|
||||
super(INVALID_TRANSIENT_QUEUE_USE, msg);
|
||||
}
|
@ -11,24 +11,24 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
import static org.hornetq.api.core.HornetQExceptionType.LARGE_MESSAGE_ERROR_BODY;
|
||||
import static org.apache.activemq.api.core.ActiveMQExceptionType.LARGE_MESSAGE_ERROR_BODY;
|
||||
|
||||
/**
|
||||
* A problem occurred while manipulating the body of a large message.
|
||||
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> 5/2/12
|
||||
*/
|
||||
public final class HornetQLargeMessageException extends HornetQException
|
||||
public final class ActiveMQLargeMessageException extends ActiveMQException
|
||||
{
|
||||
private static final long serialVersionUID = 1087867463974768491L;
|
||||
|
||||
public HornetQLargeMessageException()
|
||||
public ActiveMQLargeMessageException()
|
||||
{
|
||||
super(LARGE_MESSAGE_ERROR_BODY);
|
||||
}
|
||||
|
||||
public HornetQLargeMessageException(String msg)
|
||||
public ActiveMQLargeMessageException(String msg)
|
||||
{
|
||||
super(LARGE_MESSAGE_ERROR_BODY, msg);
|
||||
}
|
@ -11,25 +11,25 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
|
||||
import static org.hornetq.api.core.HornetQExceptionType.LARGE_MESSAGE_INTERRUPTED;
|
||||
import static org.apache.activemq.api.core.ActiveMQExceptionType.LARGE_MESSAGE_INTERRUPTED;
|
||||
|
||||
/**
|
||||
* @author Clebert
|
||||
*/
|
||||
// XXX
|
||||
public class HornetQLargeMessageInterruptedException extends HornetQException
|
||||
public class ActiveMQLargeMessageInterruptedException extends ActiveMQException
|
||||
{
|
||||
private static final long serialVersionUID = 0;
|
||||
|
||||
public HornetQLargeMessageInterruptedException(String message)
|
||||
public ActiveMQLargeMessageInterruptedException(String message)
|
||||
{
|
||||
super(LARGE_MESSAGE_INTERRUPTED, message);
|
||||
}
|
||||
|
||||
public HornetQLargeMessageInterruptedException()
|
||||
public ActiveMQLargeMessageInterruptedException()
|
||||
{
|
||||
super(LARGE_MESSAGE_INTERRUPTED);
|
||||
}
|
@ -11,7 +11,7 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
|
||||
/**
|
||||
@ -19,17 +19,17 @@ package org.hornetq.api.core;
|
||||
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> 5/4/12
|
||||
*/
|
||||
// XXX
|
||||
public final class HornetQNativeIOError extends HornetQException
|
||||
public final class ActiveMQNativeIOError extends ActiveMQException
|
||||
{
|
||||
private static final long serialVersionUID = 2355120980683293085L;
|
||||
|
||||
public HornetQNativeIOError()
|
||||
public ActiveMQNativeIOError()
|
||||
{
|
||||
super(HornetQExceptionType.NATIVE_ERROR_CANT_INITIALIZE_AIO);
|
||||
super(ActiveMQExceptionType.NATIVE_ERROR_CANT_INITIALIZE_AIO);
|
||||
}
|
||||
|
||||
public HornetQNativeIOError(String msg)
|
||||
public ActiveMQNativeIOError(String msg)
|
||||
{
|
||||
super(HornetQExceptionType.NATIVE_ERROR_CANT_INITIALIZE_AIO, msg);
|
||||
super(ActiveMQExceptionType.NATIVE_ERROR_CANT_INITIALIZE_AIO, msg);
|
||||
}
|
||||
}
|
@ -11,24 +11,24 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
import static org.hornetq.api.core.HornetQExceptionType.QUEUE_DOES_NOT_EXIST;
|
||||
import static org.apache.activemq.api.core.ActiveMQExceptionType.QUEUE_DOES_NOT_EXIST;
|
||||
|
||||
/**
|
||||
* An operation failed because a queue does not exist on the server.
|
||||
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> 4/30/12
|
||||
*/
|
||||
public final class HornetQNonExistentQueueException extends HornetQException
|
||||
public final class ActiveMQNonExistentQueueException extends ActiveMQException
|
||||
{
|
||||
private static final long serialVersionUID = -8199298881947523607L;
|
||||
|
||||
public HornetQNonExistentQueueException()
|
||||
public ActiveMQNonExistentQueueException()
|
||||
{
|
||||
super(QUEUE_DOES_NOT_EXIST);
|
||||
}
|
||||
|
||||
public HornetQNonExistentQueueException(String msg)
|
||||
public ActiveMQNonExistentQueueException(String msg)
|
||||
{
|
||||
super(QUEUE_DOES_NOT_EXIST, msg);
|
||||
}
|
@ -11,24 +11,24 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
import static org.hornetq.api.core.HornetQExceptionType.NOT_CONNECTED;
|
||||
import static org.apache.activemq.api.core.ActiveMQExceptionType.NOT_CONNECTED;
|
||||
|
||||
/**
|
||||
* A client is not able to connect to HornetQ server.
|
||||
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> 4/30/12
|
||||
*/
|
||||
public final class HornetQNotConnectedException extends HornetQException
|
||||
public final class ActiveMQNotConnectedException extends ActiveMQException
|
||||
{
|
||||
private static final long serialVersionUID = -3489189971813613325L;
|
||||
|
||||
public HornetQNotConnectedException(String message)
|
||||
public ActiveMQNotConnectedException(String message)
|
||||
{
|
||||
super(NOT_CONNECTED, message);
|
||||
}
|
||||
|
||||
public HornetQNotConnectedException()
|
||||
public ActiveMQNotConnectedException()
|
||||
{
|
||||
super(NOT_CONNECTED);
|
||||
}
|
@ -11,25 +11,25 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
import static org.hornetq.api.core.HornetQExceptionType.OBJECT_CLOSED;
|
||||
import static org.apache.activemq.api.core.ActiveMQExceptionType.OBJECT_CLOSED;
|
||||
|
||||
/**
|
||||
* A client operation failed because the calling resource (ClientSession, ClientProducer, etc.) is
|
||||
* closed.
|
||||
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> 4/30/12
|
||||
*/
|
||||
public final class HornetQObjectClosedException extends HornetQException
|
||||
public final class ActiveMQObjectClosedException extends ActiveMQException
|
||||
{
|
||||
private static final long serialVersionUID = 809024052184914812L;
|
||||
|
||||
public HornetQObjectClosedException()
|
||||
public ActiveMQObjectClosedException()
|
||||
{
|
||||
super(OBJECT_CLOSED);
|
||||
}
|
||||
|
||||
public HornetQObjectClosedException(String msg)
|
||||
public ActiveMQObjectClosedException(String msg)
|
||||
{
|
||||
super(OBJECT_CLOSED, msg);
|
||||
}
|
@ -10,20 +10,20 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
/**
|
||||
* A PropertyConversionException is thrown by {@code org.hornetq.api.core.Message} methods when a
|
||||
* A PropertyConversionException is thrown by {@code org.apache.activemq.api.core.Message} methods when a
|
||||
* property can not be converted to the expected type.
|
||||
* @author <a href="mailto:jmesnil@redhat.com">Jeff Mesnil</a>
|
||||
* @see org.hornetq.api.core.Message
|
||||
* @see org.apache.activemq.api.core.Message
|
||||
*/
|
||||
public final class HornetQPropertyConversionException extends RuntimeException
|
||||
public final class ActiveMQPropertyConversionException extends RuntimeException
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = -3010008708334904332L;
|
||||
|
||||
public HornetQPropertyConversionException(final String message)
|
||||
public ActiveMQPropertyConversionException(final String message)
|
||||
{
|
||||
super(message);
|
||||
}
|
@ -11,24 +11,24 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
import static org.hornetq.api.core.HornetQExceptionType.QUEUE_EXISTS;
|
||||
import static org.apache.activemq.api.core.ActiveMQExceptionType.QUEUE_EXISTS;
|
||||
|
||||
/**
|
||||
* An operation failed because a queue exists on the server.
|
||||
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> 4/30/12
|
||||
*/
|
||||
public final class HornetQQueueExistsException extends HornetQException
|
||||
public final class ActiveMQQueueExistsException extends ActiveMQException
|
||||
{
|
||||
private static final long serialVersionUID = -405552292451883063L;
|
||||
|
||||
public HornetQQueueExistsException()
|
||||
public ActiveMQQueueExistsException()
|
||||
{
|
||||
super(QUEUE_EXISTS);
|
||||
}
|
||||
|
||||
public HornetQQueueExistsException(String msg)
|
||||
public ActiveMQQueueExistsException(String msg)
|
||||
{
|
||||
super(QUEUE_EXISTS, msg);
|
||||
}
|
@ -11,24 +11,24 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
import static org.hornetq.api.core.HornetQExceptionType.SECURITY_EXCEPTION;
|
||||
import static org.apache.activemq.api.core.ActiveMQExceptionType.SECURITY_EXCEPTION;
|
||||
|
||||
/**
|
||||
* A security problem occurred (authentication issues, permission issues,...)
|
||||
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> 5/2/12
|
||||
*/
|
||||
public final class HornetQSecurityException extends HornetQException
|
||||
public final class ActiveMQSecurityException extends ActiveMQException
|
||||
{
|
||||
private static final long serialVersionUID = 3291210307590756881L;
|
||||
|
||||
public HornetQSecurityException()
|
||||
public ActiveMQSecurityException()
|
||||
{
|
||||
super(SECURITY_EXCEPTION);
|
||||
}
|
||||
|
||||
public HornetQSecurityException(String msg)
|
||||
public ActiveMQSecurityException(String msg)
|
||||
{
|
||||
super(SECURITY_EXCEPTION, msg);
|
||||
}
|
@ -11,25 +11,25 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
import static org.hornetq.api.core.HornetQExceptionType.SESSION_CREATION_REJECTED;
|
||||
import static org.apache.activemq.api.core.ActiveMQExceptionType.SESSION_CREATION_REJECTED;
|
||||
|
||||
/**
|
||||
* The creation of a session was rejected by the server (e.g. if the server is starting and has not
|
||||
* finish to be initialized.
|
||||
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> 5/2/12
|
||||
*/
|
||||
public final class HornetQSessionCreationException extends HornetQException
|
||||
public final class ActiveMQSessionCreationException extends ActiveMQException
|
||||
{
|
||||
private static final long serialVersionUID = -4486139158452585895L;
|
||||
|
||||
public HornetQSessionCreationException()
|
||||
public ActiveMQSessionCreationException()
|
||||
{
|
||||
super(SESSION_CREATION_REJECTED);
|
||||
}
|
||||
|
||||
public HornetQSessionCreationException(String msg)
|
||||
public ActiveMQSessionCreationException(String msg)
|
||||
{
|
||||
super(SESSION_CREATION_REJECTED, msg);
|
||||
}
|
@ -11,24 +11,24 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
import static org.hornetq.api.core.HornetQExceptionType.TRANSACTION_OUTCOME_UNKNOWN;
|
||||
import static org.apache.activemq.api.core.ActiveMQExceptionType.TRANSACTION_OUTCOME_UNKNOWN;
|
||||
|
||||
/**
|
||||
* The outcome of a transaction is unknown.
|
||||
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> 5/2/12
|
||||
*/
|
||||
public final class HornetQTransactionOutcomeUnknownException extends HornetQException
|
||||
public final class ActiveMQTransactionOutcomeUnknownException extends ActiveMQException
|
||||
{
|
||||
private static final long serialVersionUID = 7940794286427650558L;
|
||||
|
||||
public HornetQTransactionOutcomeUnknownException()
|
||||
public ActiveMQTransactionOutcomeUnknownException()
|
||||
{
|
||||
super(TRANSACTION_OUTCOME_UNKNOWN);
|
||||
}
|
||||
|
||||
public HornetQTransactionOutcomeUnknownException(String msg)
|
||||
public ActiveMQTransactionOutcomeUnknownException(String msg)
|
||||
{
|
||||
super(TRANSACTION_OUTCOME_UNKNOWN, msg);
|
||||
}
|
@ -11,24 +11,24 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
import static org.hornetq.api.core.HornetQExceptionType.TRANSACTION_ROLLED_BACK;
|
||||
import static org.apache.activemq.api.core.ActiveMQExceptionType.TRANSACTION_ROLLED_BACK;
|
||||
|
||||
/**
|
||||
* A transaction was rolled back.
|
||||
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> 5/2/12
|
||||
*/
|
||||
public final class HornetQTransactionRolledBackException extends HornetQException
|
||||
public final class ActiveMQTransactionRolledBackException extends ActiveMQException
|
||||
{
|
||||
private static final long serialVersionUID = 5823412198677126300L;
|
||||
|
||||
public HornetQTransactionRolledBackException()
|
||||
public ActiveMQTransactionRolledBackException()
|
||||
{
|
||||
super(TRANSACTION_ROLLED_BACK);
|
||||
}
|
||||
|
||||
public HornetQTransactionRolledBackException(String msg)
|
||||
public ActiveMQTransactionRolledBackException(String msg)
|
||||
{
|
||||
super(TRANSACTION_ROLLED_BACK, msg);
|
||||
}
|
@ -11,24 +11,24 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
import static org.hornetq.api.core.HornetQExceptionType.UNBLOCKED;
|
||||
import static org.apache.activemq.api.core.ActiveMQExceptionType.UNBLOCKED;
|
||||
|
||||
/**
|
||||
* A blocking call from a client was unblocked during failover.
|
||||
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> 4/30/12
|
||||
*/
|
||||
public final class HornetQUnBlockedException extends HornetQException
|
||||
public final class ActiveMQUnBlockedException extends ActiveMQException
|
||||
{
|
||||
private static final long serialVersionUID = -4507889261891160608L;
|
||||
|
||||
public HornetQUnBlockedException()
|
||||
public ActiveMQUnBlockedException()
|
||||
{
|
||||
super(UNBLOCKED);
|
||||
}
|
||||
|
||||
public HornetQUnBlockedException(String msg)
|
||||
public ActiveMQUnBlockedException(String msg)
|
||||
{
|
||||
super(UNBLOCKED, msg);
|
||||
}
|
@ -11,24 +11,24 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
import static org.hornetq.api.core.HornetQExceptionType.UNSUPPORTED_PACKET;
|
||||
import static org.apache.activemq.api.core.ActiveMQExceptionType.UNSUPPORTED_PACKET;
|
||||
|
||||
/**
|
||||
* A packet of unsupported type was received by HornetQ PacketHandler.
|
||||
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> 4/30/12
|
||||
*/
|
||||
public final class HornetQUnsupportedPacketException extends HornetQException
|
||||
public final class ActiveMQUnsupportedPacketException extends ActiveMQException
|
||||
{
|
||||
private static final long serialVersionUID = -7074681529482463675L;
|
||||
|
||||
public HornetQUnsupportedPacketException()
|
||||
public ActiveMQUnsupportedPacketException()
|
||||
{
|
||||
super(UNSUPPORTED_PACKET);
|
||||
}
|
||||
|
||||
public HornetQUnsupportedPacketException(String msg)
|
||||
public ActiveMQUnsupportedPacketException(String msg)
|
||||
{
|
||||
super(UNSUPPORTED_PACKET, msg);
|
||||
}
|
@ -11,7 +11,7 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
@ -11,13 +11,13 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.hornetq.utils.DataConstants;
|
||||
import org.apache.activemq.utils.DataConstants;
|
||||
|
||||
/**
|
||||
* A simple String class that can store all characters, and stores as simple {@code byte[]}, this
|
@ -11,23 +11,23 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.core.buffers.impl;
|
||||
package org.apache.activemq.core.buffers.impl;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.Unpooled;
|
||||
import org.hornetq.api.core.HornetQBuffer;
|
||||
import org.hornetq.api.core.SimpleString;
|
||||
import org.hornetq.utils.DataConstants;
|
||||
import org.hornetq.utils.UTF8Util;
|
||||
import org.apache.activemq.api.core.ActiveMQBuffer;
|
||||
import org.apache.activemq.api.core.SimpleString;
|
||||
import org.apache.activemq.utils.DataConstants;
|
||||
import org.apache.activemq.utils.UTF8Util;
|
||||
|
||||
/**
|
||||
* A ChannelBufferWrapper
|
||||
*
|
||||
* @author Tim Fox
|
||||
*/
|
||||
public class ChannelBufferWrapper implements HornetQBuffer
|
||||
public class ChannelBufferWrapper implements ActiveMQBuffer
|
||||
{
|
||||
protected ByteBuf buffer; // NO_UCD (use final)
|
||||
private final boolean releasable;
|
||||
@ -215,12 +215,12 @@ public class ChannelBufferWrapper implements HornetQBuffer
|
||||
buffer.clear();
|
||||
}
|
||||
|
||||
public HornetQBuffer copy()
|
||||
public ActiveMQBuffer copy()
|
||||
{
|
||||
return new ChannelBufferWrapper(buffer.copy(), releasable);
|
||||
}
|
||||
|
||||
public HornetQBuffer copy(final int index, final int length)
|
||||
public ActiveMQBuffer copy(final int index, final int length)
|
||||
{
|
||||
return new ChannelBufferWrapper(buffer.copy(index, length), releasable);
|
||||
}
|
||||
@ -230,7 +230,7 @@ public class ChannelBufferWrapper implements HornetQBuffer
|
||||
buffer.discardReadBytes();
|
||||
}
|
||||
|
||||
public HornetQBuffer duplicate()
|
||||
public ActiveMQBuffer duplicate()
|
||||
{
|
||||
return new ChannelBufferWrapper(buffer.duplicate(), releasable);
|
||||
}
|
||||
@ -255,17 +255,17 @@ public class ChannelBufferWrapper implements HornetQBuffer
|
||||
buffer.getBytes(index, dst);
|
||||
}
|
||||
|
||||
public void getBytes(final int index, final HornetQBuffer dst, final int dstIndex, final int length)
|
||||
public void getBytes(final int index, final ActiveMQBuffer dst, final int dstIndex, final int length)
|
||||
{
|
||||
buffer.getBytes(index, dst.byteBuf(), dstIndex, length);
|
||||
}
|
||||
|
||||
public void getBytes(final int index, final HornetQBuffer dst, final int length)
|
||||
public void getBytes(final int index, final ActiveMQBuffer dst, final int length)
|
||||
{
|
||||
buffer.getBytes(index, dst.byteBuf(), length);
|
||||
}
|
||||
|
||||
public void getBytes(final int index, final HornetQBuffer dst)
|
||||
public void getBytes(final int index, final ActiveMQBuffer dst)
|
||||
{
|
||||
buffer.getBytes(index, dst.byteBuf());
|
||||
}
|
||||
@ -355,22 +355,22 @@ public class ChannelBufferWrapper implements HornetQBuffer
|
||||
buffer.readBytes(dst);
|
||||
}
|
||||
|
||||
public void readBytes(final HornetQBuffer dst, final int dstIndex, final int length)
|
||||
public void readBytes(final ActiveMQBuffer dst, final int dstIndex, final int length)
|
||||
{
|
||||
buffer.readBytes(dst.byteBuf(), dstIndex, length);
|
||||
}
|
||||
|
||||
public void readBytes(final HornetQBuffer dst, final int length)
|
||||
public void readBytes(final ActiveMQBuffer dst, final int length)
|
||||
{
|
||||
buffer.readBytes(dst.byteBuf(), length);
|
||||
}
|
||||
|
||||
public void readBytes(final HornetQBuffer dst)
|
||||
public void readBytes(final ActiveMQBuffer dst)
|
||||
{
|
||||
buffer.readBytes(dst.byteBuf());
|
||||
}
|
||||
|
||||
public HornetQBuffer readBytes(final int length)
|
||||
public ActiveMQBuffer readBytes(final int length)
|
||||
{
|
||||
return new ChannelBufferWrapper(buffer.readBytes(length), releasable);
|
||||
}
|
||||
@ -415,7 +415,7 @@ public class ChannelBufferWrapper implements HornetQBuffer
|
||||
return buffer.readShort();
|
||||
}
|
||||
|
||||
public HornetQBuffer readSlice(final int length)
|
||||
public ActiveMQBuffer readSlice(final int length)
|
||||
{
|
||||
return new ChannelBufferWrapper(buffer.readSlice(length), releasable);
|
||||
}
|
||||
@ -465,17 +465,17 @@ public class ChannelBufferWrapper implements HornetQBuffer
|
||||
buffer.setBytes(index, src);
|
||||
}
|
||||
|
||||
public void setBytes(final int index, final HornetQBuffer src, final int srcIndex, final int length)
|
||||
public void setBytes(final int index, final ActiveMQBuffer src, final int srcIndex, final int length)
|
||||
{
|
||||
buffer.setBytes(index, src.byteBuf(), srcIndex, length);
|
||||
}
|
||||
|
||||
public void setBytes(final int index, final HornetQBuffer src, final int length)
|
||||
public void setBytes(final int index, final ActiveMQBuffer src, final int length)
|
||||
{
|
||||
buffer.setBytes(index, src.byteBuf(), length);
|
||||
}
|
||||
|
||||
public void setBytes(final int index, final HornetQBuffer src)
|
||||
public void setBytes(final int index, final ActiveMQBuffer src)
|
||||
{
|
||||
buffer.setBytes(index, src.byteBuf());
|
||||
}
|
||||
@ -520,12 +520,12 @@ public class ChannelBufferWrapper implements HornetQBuffer
|
||||
buffer.skipBytes(length);
|
||||
}
|
||||
|
||||
public HornetQBuffer slice()
|
||||
public ActiveMQBuffer slice()
|
||||
{
|
||||
return new ChannelBufferWrapper(buffer.slice(), releasable);
|
||||
}
|
||||
|
||||
public HornetQBuffer slice(final int index, final int length)
|
||||
public ActiveMQBuffer slice(final int index, final int length)
|
||||
{
|
||||
return new ChannelBufferWrapper(buffer.slice(index, length), releasable);
|
||||
}
|
||||
@ -570,12 +570,12 @@ public class ChannelBufferWrapper implements HornetQBuffer
|
||||
buffer.writeBytes(src);
|
||||
}
|
||||
|
||||
public void writeBytes(final HornetQBuffer src, final int srcIndex, final int length)
|
||||
public void writeBytes(final ActiveMQBuffer src, final int srcIndex, final int length)
|
||||
{
|
||||
buffer.writeBytes(src.byteBuf(), srcIndex, length);
|
||||
}
|
||||
|
||||
public void writeBytes(final HornetQBuffer src, final int length)
|
||||
public void writeBytes(final ActiveMQBuffer src, final int length)
|
||||
{
|
||||
buffer.writeBytes(src.byteBuf(), length);
|
||||
}
|
@ -1,31 +1,31 @@
|
||||
/*
|
||||
* 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.hornetq.core.server;
|
||||
|
||||
/**
|
||||
* A HornetQComponent
|
||||
*
|
||||
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
|
||||
* @version <tt>$Revision: 2796 $</tt>
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface HornetQComponent
|
||||
{
|
||||
void start() throws Exception;
|
||||
|
||||
void stop() throws Exception;
|
||||
|
||||
boolean isStarted();
|
||||
}
|
||||
/*
|
||||
* Copyright 2005-2014 Red Hat, Inc.
|
||||
* Red Hat licenses this file to you under the Apache License, version
|
||||
* 2.0 (the "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.core.server;
|
||||
|
||||
/**
|
||||
* A HornetQComponent
|
||||
*
|
||||
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
|
||||
* @version <tt>$Revision: 2796 $</tt>
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface HornetQComponent
|
||||
{
|
||||
void start() throws Exception;
|
||||
|
||||
void stop() throws Exception;
|
||||
|
||||
boolean isStarted();
|
||||
}
|
@ -10,7 +10,7 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.utils;
|
||||
package org.apache.activemq.utils;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.StandardCharsets;
|
@ -11,7 +11,7 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.utils;
|
||||
package org.apache.activemq.utils;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.UnpooledByteBufAllocator;
|
@ -10,7 +10,7 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.utils;
|
||||
package org.apache.activemq.utils;
|
||||
|
||||
import java.net.URL;
|
||||
|
@ -10,7 +10,7 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.utils;
|
||||
package org.apache.activemq.utils;
|
||||
|
||||
import java.util.AbstractSet;
|
||||
import java.util.Iterator;
|
@ -10,7 +10,7 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.utils;
|
||||
package org.apache.activemq.utils;
|
||||
|
||||
import java.util.Set;
|
||||
|
@ -10,7 +10,7 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.utils;
|
||||
package org.apache.activemq.utils;
|
||||
|
||||
/**
|
||||
*
|
@ -10,7 +10,7 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.utils;
|
||||
package org.apache.activemq.utils;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.security.InvalidKeyException;
|
@ -10,7 +10,7 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.utils;
|
||||
package org.apache.activemq.utils;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.IOException;
|
||||
@ -23,7 +23,7 @@ public class FactoryFinder
|
||||
/**
|
||||
* The strategy that the FactoryFinder uses to find load and instantiate Objects
|
||||
* can be changed out by calling the
|
||||
* {@link org.hornetq.utils.FactoryFinder#setObjectFactory(org.hornetq.utils.FactoryFinder.ObjectFactory)}
|
||||
* {@link org.apache.activemq.utils.FactoryFinder#setObjectFactory(org.apache.activemq.utils.FactoryFinder.ObjectFactory)}
|
||||
* method with a custom implementation of ObjectFactory.
|
||||
* <p/>
|
||||
* The default ObjectFactory is typically changed out when running in a specialized container
|
@ -10,7 +10,7 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.utils;
|
||||
package org.apache.activemq.utils;
|
||||
|
||||
import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
@ -10,10 +10,10 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.utils;
|
||||
package org.apache.activemq.utils;
|
||||
|
||||
|
||||
import org.hornetq.api.core.HornetQIllegalStateException;
|
||||
import org.apache.activemq.api.core.ActiveMQIllegalStateException;
|
||||
import org.jboss.logging.annotations.Cause;
|
||||
import org.jboss.logging.annotations.Message;
|
||||
import org.jboss.logging.annotations.MessageBundle;
|
||||
@ -35,7 +35,7 @@ public interface HornetQUtilBundle
|
||||
HornetQUtilBundle BUNDLE = Messages.getBundle(HornetQUtilBundle.class);
|
||||
|
||||
@Message(id = 209000, value = "invalid property: {0}" , format = Message.Format.MESSAGE_FORMAT)
|
||||
HornetQIllegalStateException invalidProperty(String part);
|
||||
ActiveMQIllegalStateException invalidProperty(String part);
|
||||
|
||||
@Message(id = 209001, value = "Invalid type: {0}", format = Message.Format.MESSAGE_FORMAT)
|
||||
IllegalStateException invalidType(Byte type);
|
@ -10,7 +10,7 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.utils;
|
||||
package org.apache.activemq.utils;
|
||||
|
||||
import org.jboss.logging.BasicLogger;
|
||||
import org.jboss.logging.Logger;
|
@ -10,15 +10,15 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.utils;
|
||||
package org.apache.activemq.utils;
|
||||
|
||||
import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.hornetq.api.core.HornetQException;
|
||||
import org.hornetq.api.core.HornetQExceptionType;
|
||||
import org.apache.activemq.api.core.ActiveMQException;
|
||||
import org.apache.activemq.api.core.ActiveMQExceptionType;
|
||||
|
||||
/**
|
||||
* A PasswordMarkingUtil
|
||||
@ -38,7 +38,7 @@ public class PasswordMaskingUtil
|
||||
*
|
||||
* Where only <full qualified class name> is required. key/value pairs are optional
|
||||
*/
|
||||
public static SensitiveDataCodec<String> getCodec(String codecDesc) throws HornetQException
|
||||
public static SensitiveDataCodec<String> getCodec(String codecDesc) throws ActiveMQException
|
||||
{
|
||||
SensitiveDataCodec<String> codecInstance = null;
|
||||
|
||||
@ -46,7 +46,7 @@ public class PasswordMaskingUtil
|
||||
String[] parts = codecDesc.split(";");
|
||||
|
||||
if (parts.length < 1)
|
||||
throw new HornetQException(HornetQExceptionType.ILLEGAL_STATE, "Invalid PasswordCodec value: " + codecDesc);
|
||||
throw new ActiveMQException(ActiveMQExceptionType.ILLEGAL_STATE, "Invalid PasswordCodec value: " + codecDesc);
|
||||
|
||||
final String codecClassName = parts[0];
|
||||
|
@ -10,7 +10,7 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.utils;
|
||||
package org.apache.activemq.utils;
|
||||
|
||||
/**
|
||||
* @author Clebert Suconic
|
@ -10,7 +10,7 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.utils;
|
||||
package org.apache.activemq.utils;
|
||||
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
@ -10,7 +10,7 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.utils;
|
||||
package org.apache.activemq.utils;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.locks.AbstractQueuedSynchronizer;
|
@ -10,7 +10,7 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.utils;
|
||||
package org.apache.activemq.utils;
|
||||
|
||||
import java.util.Map;
|
||||
|
@ -10,7 +10,7 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.utils;
|
||||
package org.apache.activemq.utils;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.Collections;
|
||||
@ -20,21 +20,21 @@ import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import org.hornetq.api.core.HornetQBuffer;
|
||||
import org.hornetq.api.core.HornetQPropertyConversionException;
|
||||
import org.hornetq.api.core.SimpleString;
|
||||
import org.apache.activemq.api.core.ActiveMQBuffer;
|
||||
import org.apache.activemq.api.core.ActiveMQPropertyConversionException;
|
||||
import org.apache.activemq.api.core.SimpleString;
|
||||
|
||||
import static org.hornetq.utils.DataConstants.BOOLEAN;
|
||||
import static org.hornetq.utils.DataConstants.BYTE;
|
||||
import static org.hornetq.utils.DataConstants.BYTES;
|
||||
import static org.hornetq.utils.DataConstants.CHAR;
|
||||
import static org.hornetq.utils.DataConstants.DOUBLE;
|
||||
import static org.hornetq.utils.DataConstants.FLOAT;
|
||||
import static org.hornetq.utils.DataConstants.INT;
|
||||
import static org.hornetq.utils.DataConstants.LONG;
|
||||
import static org.hornetq.utils.DataConstants.NULL;
|
||||
import static org.hornetq.utils.DataConstants.SHORT;
|
||||
import static org.hornetq.utils.DataConstants.STRING;
|
||||
import static org.apache.activemq.utils.DataConstants.BOOLEAN;
|
||||
import static org.apache.activemq.utils.DataConstants.BYTE;
|
||||
import static org.apache.activemq.utils.DataConstants.BYTES;
|
||||
import static org.apache.activemq.utils.DataConstants.CHAR;
|
||||
import static org.apache.activemq.utils.DataConstants.DOUBLE;
|
||||
import static org.apache.activemq.utils.DataConstants.FLOAT;
|
||||
import static org.apache.activemq.utils.DataConstants.INT;
|
||||
import static org.apache.activemq.utils.DataConstants.LONG;
|
||||
import static org.apache.activemq.utils.DataConstants.NULL;
|
||||
import static org.apache.activemq.utils.DataConstants.SHORT;
|
||||
import static org.apache.activemq.utils.DataConstants.STRING;
|
||||
|
||||
/**
|
||||
* Property Value Conversion.
|
||||
@ -168,7 +168,7 @@ public final class TypedProperties
|
||||
return doGetProperty(key);
|
||||
}
|
||||
|
||||
public Boolean getBooleanProperty(final SimpleString key) throws HornetQPropertyConversionException
|
||||
public Boolean getBooleanProperty(final SimpleString key) throws ActiveMQPropertyConversionException
|
||||
{
|
||||
Object value = doGetProperty(key);
|
||||
if (value == null)
|
||||
@ -185,11 +185,11 @@ public final class TypedProperties
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new HornetQPropertyConversionException("Invalid conversion");
|
||||
throw new ActiveMQPropertyConversionException("Invalid conversion");
|
||||
}
|
||||
}
|
||||
|
||||
public Byte getByteProperty(final SimpleString key) throws HornetQPropertyConversionException
|
||||
public Byte getByteProperty(final SimpleString key) throws ActiveMQPropertyConversionException
|
||||
{
|
||||
Object value = doGetProperty(key);
|
||||
if (value == null)
|
||||
@ -206,11 +206,11 @@ public final class TypedProperties
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new HornetQPropertyConversionException("Invalid conversion");
|
||||
throw new ActiveMQPropertyConversionException("Invalid conversion");
|
||||
}
|
||||
}
|
||||
|
||||
public Character getCharProperty(final SimpleString key) throws HornetQPropertyConversionException
|
||||
public Character getCharProperty(final SimpleString key) throws ActiveMQPropertyConversionException
|
||||
{
|
||||
Object value = doGetProperty(key);
|
||||
if (value == null)
|
||||
@ -224,11 +224,11 @@ public final class TypedProperties
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new HornetQPropertyConversionException("Invalid conversion");
|
||||
throw new ActiveMQPropertyConversionException("Invalid conversion");
|
||||
}
|
||||
}
|
||||
|
||||
public byte[] getBytesProperty(final SimpleString key) throws HornetQPropertyConversionException
|
||||
public byte[] getBytesProperty(final SimpleString key) throws ActiveMQPropertyConversionException
|
||||
{
|
||||
Object value = doGetProperty(key);
|
||||
if (value == null)
|
||||
@ -241,11 +241,11 @@ public final class TypedProperties
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new HornetQPropertyConversionException("Invalid conversion");
|
||||
throw new ActiveMQPropertyConversionException("Invalid conversion");
|
||||
}
|
||||
}
|
||||
|
||||
public Double getDoubleProperty(final SimpleString key) throws HornetQPropertyConversionException
|
||||
public Double getDoubleProperty(final SimpleString key) throws ActiveMQPropertyConversionException
|
||||
{
|
||||
Object value = doGetProperty(key);
|
||||
if (value == null)
|
||||
@ -266,11 +266,11 @@ public final class TypedProperties
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new HornetQPropertyConversionException("Invalid conversion");
|
||||
throw new ActiveMQPropertyConversionException("Invalid conversion");
|
||||
}
|
||||
}
|
||||
|
||||
public Integer getIntProperty(final SimpleString key) throws HornetQPropertyConversionException
|
||||
public Integer getIntProperty(final SimpleString key) throws ActiveMQPropertyConversionException
|
||||
{
|
||||
Object value = doGetProperty(key);
|
||||
if (value == null)
|
||||
@ -295,11 +295,11 @@ public final class TypedProperties
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new HornetQPropertyConversionException("Invalid conversion");
|
||||
throw new ActiveMQPropertyConversionException("Invalid conversion");
|
||||
}
|
||||
}
|
||||
|
||||
public Long getLongProperty(final SimpleString key) throws HornetQPropertyConversionException
|
||||
public Long getLongProperty(final SimpleString key) throws ActiveMQPropertyConversionException
|
||||
{
|
||||
Object value = doGetProperty(key);
|
||||
if (value == null)
|
||||
@ -328,11 +328,11 @@ public final class TypedProperties
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new HornetQPropertyConversionException("Invalid conversion");
|
||||
throw new ActiveMQPropertyConversionException("Invalid conversion");
|
||||
}
|
||||
}
|
||||
|
||||
public Short getShortProperty(final SimpleString key) throws HornetQPropertyConversionException
|
||||
public Short getShortProperty(final SimpleString key) throws ActiveMQPropertyConversionException
|
||||
{
|
||||
Object value = doGetProperty(key);
|
||||
if (value == null)
|
||||
@ -353,11 +353,11 @@ public final class TypedProperties
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new HornetQPropertyConversionException("Invalid Conversion.");
|
||||
throw new ActiveMQPropertyConversionException("Invalid Conversion.");
|
||||
}
|
||||
}
|
||||
|
||||
public Float getFloatProperty(final SimpleString key) throws HornetQPropertyConversionException
|
||||
public Float getFloatProperty(final SimpleString key) throws ActiveMQPropertyConversionException
|
||||
{
|
||||
Object value = doGetProperty(key);
|
||||
if (value == null)
|
||||
@ -370,10 +370,10 @@ public final class TypedProperties
|
||||
{
|
||||
return Float.parseFloat(((SimpleString) value).toString());
|
||||
}
|
||||
throw new HornetQPropertyConversionException("Invalid conversion: " + key);
|
||||
throw new ActiveMQPropertyConversionException("Invalid conversion: " + key);
|
||||
}
|
||||
|
||||
public SimpleString getSimpleStringProperty(final SimpleString key) throws HornetQPropertyConversionException
|
||||
public SimpleString getSimpleStringProperty(final SimpleString key) throws ActiveMQPropertyConversionException
|
||||
{
|
||||
Object value = doGetProperty(key);
|
||||
|
||||
@ -418,7 +418,7 @@ public final class TypedProperties
|
||||
{
|
||||
return new SimpleString(value.toString());
|
||||
}
|
||||
throw new HornetQPropertyConversionException("Invalid conversion");
|
||||
throw new ActiveMQPropertyConversionException("Invalid conversion");
|
||||
}
|
||||
|
||||
public Object removeProperty(final SimpleString key)
|
||||
@ -451,7 +451,7 @@ public final class TypedProperties
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void decode(final HornetQBuffer buffer)
|
||||
public synchronized void decode(final ActiveMQBuffer buffer)
|
||||
{
|
||||
byte b = buffer.readByte();
|
||||
|
||||
@ -554,7 +554,7 @@ public final class TypedProperties
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void encode(final HornetQBuffer buffer)
|
||||
public synchronized void encode(final ActiveMQBuffer buffer)
|
||||
{
|
||||
if (properties == null)
|
||||
{
|
||||
@ -741,7 +741,7 @@ public final class TypedProperties
|
||||
{
|
||||
abstract Object getValue();
|
||||
|
||||
abstract void write(HornetQBuffer buffer);
|
||||
abstract void write(ActiveMQBuffer buffer);
|
||||
|
||||
abstract int encodeSize();
|
||||
|
||||
@ -765,7 +765,7 @@ public final class TypedProperties
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(final HornetQBuffer buffer)
|
||||
public void write(final ActiveMQBuffer buffer)
|
||||
{
|
||||
buffer.writeByte(DataConstants.NULL);
|
||||
}
|
||||
@ -787,7 +787,7 @@ public final class TypedProperties
|
||||
this.val = val;
|
||||
}
|
||||
|
||||
public BooleanValue(final HornetQBuffer buffer)
|
||||
public BooleanValue(final ActiveMQBuffer buffer)
|
||||
{
|
||||
val = buffer.readBoolean();
|
||||
}
|
||||
@ -799,7 +799,7 @@ public final class TypedProperties
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(final HornetQBuffer buffer)
|
||||
public void write(final ActiveMQBuffer buffer)
|
||||
{
|
||||
buffer.writeByte(DataConstants.BOOLEAN);
|
||||
buffer.writeBoolean(val);
|
||||
@ -822,7 +822,7 @@ public final class TypedProperties
|
||||
this.val = val;
|
||||
}
|
||||
|
||||
public ByteValue(final HornetQBuffer buffer)
|
||||
public ByteValue(final ActiveMQBuffer buffer)
|
||||
{
|
||||
val = buffer.readByte();
|
||||
}
|
||||
@ -834,7 +834,7 @@ public final class TypedProperties
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(final HornetQBuffer buffer)
|
||||
public void write(final ActiveMQBuffer buffer)
|
||||
{
|
||||
buffer.writeByte(DataConstants.BYTE);
|
||||
buffer.writeByte(val);
|
||||
@ -856,7 +856,7 @@ public final class TypedProperties
|
||||
this.val = val;
|
||||
}
|
||||
|
||||
public BytesValue(final HornetQBuffer buffer)
|
||||
public BytesValue(final ActiveMQBuffer buffer)
|
||||
{
|
||||
int len = buffer.readInt();
|
||||
val = new byte[len];
|
||||
@ -870,7 +870,7 @@ public final class TypedProperties
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(final HornetQBuffer buffer)
|
||||
public void write(final ActiveMQBuffer buffer)
|
||||
{
|
||||
buffer.writeByte(DataConstants.BYTES);
|
||||
buffer.writeInt(val.length);
|
||||
@ -894,7 +894,7 @@ public final class TypedProperties
|
||||
this.val = val;
|
||||
}
|
||||
|
||||
public ShortValue(final HornetQBuffer buffer)
|
||||
public ShortValue(final ActiveMQBuffer buffer)
|
||||
{
|
||||
val = buffer.readShort();
|
||||
}
|
||||
@ -906,7 +906,7 @@ public final class TypedProperties
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(final HornetQBuffer buffer)
|
||||
public void write(final ActiveMQBuffer buffer)
|
||||
{
|
||||
buffer.writeByte(DataConstants.SHORT);
|
||||
buffer.writeShort(val);
|
||||
@ -928,7 +928,7 @@ public final class TypedProperties
|
||||
this.val = val;
|
||||
}
|
||||
|
||||
public IntValue(final HornetQBuffer buffer)
|
||||
public IntValue(final ActiveMQBuffer buffer)
|
||||
{
|
||||
val = buffer.readInt();
|
||||
}
|
||||
@ -940,7 +940,7 @@ public final class TypedProperties
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(final HornetQBuffer buffer)
|
||||
public void write(final ActiveMQBuffer buffer)
|
||||
{
|
||||
buffer.writeByte(DataConstants.INT);
|
||||
buffer.writeInt(val);
|
||||
@ -962,7 +962,7 @@ public final class TypedProperties
|
||||
this.val = val;
|
||||
}
|
||||
|
||||
public LongValue(final HornetQBuffer buffer)
|
||||
public LongValue(final ActiveMQBuffer buffer)
|
||||
{
|
||||
val = buffer.readLong();
|
||||
}
|
||||
@ -974,7 +974,7 @@ public final class TypedProperties
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(final HornetQBuffer buffer)
|
||||
public void write(final ActiveMQBuffer buffer)
|
||||
{
|
||||
buffer.writeByte(DataConstants.LONG);
|
||||
buffer.writeLong(val);
|
||||
@ -996,7 +996,7 @@ public final class TypedProperties
|
||||
this.val = val;
|
||||
}
|
||||
|
||||
public FloatValue(final HornetQBuffer buffer)
|
||||
public FloatValue(final ActiveMQBuffer buffer)
|
||||
{
|
||||
val = Float.intBitsToFloat(buffer.readInt());
|
||||
}
|
||||
@ -1008,7 +1008,7 @@ public final class TypedProperties
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(final HornetQBuffer buffer)
|
||||
public void write(final ActiveMQBuffer buffer)
|
||||
{
|
||||
buffer.writeByte(DataConstants.FLOAT);
|
||||
buffer.writeInt(Float.floatToIntBits(val));
|
||||
@ -1031,7 +1031,7 @@ public final class TypedProperties
|
||||
this.val = val;
|
||||
}
|
||||
|
||||
public DoubleValue(final HornetQBuffer buffer)
|
||||
public DoubleValue(final ActiveMQBuffer buffer)
|
||||
{
|
||||
val = Double.longBitsToDouble(buffer.readLong());
|
||||
}
|
||||
@ -1043,7 +1043,7 @@ public final class TypedProperties
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(final HornetQBuffer buffer)
|
||||
public void write(final ActiveMQBuffer buffer)
|
||||
{
|
||||
buffer.writeByte(DataConstants.DOUBLE);
|
||||
buffer.writeLong(Double.doubleToLongBits(val));
|
||||
@ -1065,7 +1065,7 @@ public final class TypedProperties
|
||||
this.val = val;
|
||||
}
|
||||
|
||||
public CharValue(final HornetQBuffer buffer)
|
||||
public CharValue(final ActiveMQBuffer buffer)
|
||||
{
|
||||
val = (char) buffer.readShort();
|
||||
}
|
||||
@ -1077,7 +1077,7 @@ public final class TypedProperties
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(final HornetQBuffer buffer)
|
||||
public void write(final ActiveMQBuffer buffer)
|
||||
{
|
||||
buffer.writeByte(DataConstants.CHAR);
|
||||
buffer.writeShort((short) val);
|
||||
@ -1099,7 +1099,7 @@ public final class TypedProperties
|
||||
this.val = val;
|
||||
}
|
||||
|
||||
public StringValue(final HornetQBuffer buffer)
|
||||
public StringValue(final ActiveMQBuffer buffer)
|
||||
{
|
||||
val = buffer.readSimpleString();
|
||||
}
|
||||
@ -1111,7 +1111,7 @@ public final class TypedProperties
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(final HornetQBuffer buffer)
|
||||
public void write(final ActiveMQBuffer buffer)
|
||||
{
|
||||
buffer.writeByte(DataConstants.STRING);
|
||||
buffer.writeSimpleString(val);
|
||||
@ -1206,7 +1206,7 @@ public final class TypedProperties
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new HornetQPropertyConversionException(value.getClass() + " is not a valid property type");
|
||||
throw new ActiveMQPropertyConversionException(value.getClass() + " is not a valid property type");
|
||||
}
|
||||
}
|
||||
}
|
@ -10,11 +10,11 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.utils;
|
||||
package org.apache.activemq.utils;
|
||||
|
||||
import java.lang.ref.SoftReference;
|
||||
|
||||
import org.hornetq.api.core.HornetQBuffer;
|
||||
import org.apache.activemq.api.core.ActiveMQBuffer;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -40,7 +40,7 @@ public final class UTF8Util
|
||||
private static final ThreadLocal<SoftReference<StringUtilBuffer>> currenBuffer =
|
||||
new ThreadLocal<SoftReference<StringUtilBuffer>>();
|
||||
|
||||
public static void saveUTF(final HornetQBuffer out, final String str)
|
||||
public static void saveUTF(final ActiveMQBuffer out, final String str)
|
||||
{
|
||||
StringUtilBuffer buffer = UTF8Util.getThreadLocalBuffer();
|
||||
|
||||
@ -106,7 +106,7 @@ public final class UTF8Util
|
||||
}
|
||||
}
|
||||
|
||||
public static String readUTF(final HornetQBuffer input)
|
||||
public static String readUTF(final ActiveMQBuffer input)
|
||||
{
|
||||
StringUtilBuffer buffer = UTF8Util.getThreadLocalBuffer();
|
||||
|
@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.utils;
|
||||
package org.apache.activemq.utils;
|
||||
|
||||
|
||||
/**
|
@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.utils;
|
||||
package org.apache.activemq.utils;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.net.NetworkInterface;
|
||||
@ -31,7 +31,7 @@ import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.hornetq.api.core.SimpleString;
|
||||
import org.apache.activemq.api.core.SimpleString;
|
||||
|
||||
public final class UUIDGenerator
|
||||
{
|
@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.utils;
|
||||
package org.apache.activemq.utils;
|
||||
|
||||
import java.util.Random;
|
||||
|
@ -11,7 +11,7 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.utils;
|
||||
package org.apache.activemq.utils;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
@ -10,12 +10,12 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.utils;
|
||||
package org.apache.activemq.utils;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.hornetq.api.core.Pair;
|
||||
import org.apache.activemq.api.core.Pair;
|
||||
|
||||
|
||||
public class PairTest extends Assert
|
@ -10,7 +10,7 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.utils;
|
||||
package org.apache.activemq.utils;
|
||||
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.Executor;
|
115
activemq-core-client/pom.xml
Normal file
115
activemq-core-client/pom.xml
Normal file
@ -0,0 +1,115 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.apache.activemq</groupId>
|
||||
<artifactId>activemq-pom</artifactId>
|
||||
<version>6.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>activemq-core-client</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>ActiveMQ6 Core Client</name>
|
||||
|
||||
<properties>
|
||||
<hornetq.basedir>${project.basedir}/..</hornetq.basedir>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.jboss.logging</groupId>
|
||||
<artifactId>jboss-logging-processor</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jgroups</groupId>
|
||||
<artifactId>jgroups</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.activemq</groupId>
|
||||
<artifactId>activemq-commons</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.activemq</groupId>
|
||||
<artifactId>activemq-selector</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.activemq</groupId>
|
||||
<artifactId>activemq-journal</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-all</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>release</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>2.9</version>
|
||||
<configuration>
|
||||
<doclet>org.jboss.apiviz.APIviz</doclet>
|
||||
<docletArtifact>
|
||||
<groupId>org.jboss.apiviz</groupId>
|
||||
<artifactId>apiviz</artifactId>
|
||||
<version>1.3.2.GA</version>
|
||||
</docletArtifact>
|
||||
<useStandardDocletOptions>true</useStandardDocletOptions>
|
||||
<minmemory>128m</minmemory>
|
||||
<maxmemory>512m</maxmemory>
|
||||
<quiet>false</quiet>
|
||||
<aggregate>true</aggregate>
|
||||
<excludePackageNames>org.apache.activemq.core:org.apache.activemq.utils</excludePackageNames>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>javadocs</id>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>test</phase>
|
||||
<goals>
|
||||
<goal>test-jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
File diff suppressed because it is too large
Load Diff
@ -10,7 +10,7 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
@ -10,7 +10,7 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
@ -11,7 +11,7 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
@ -10,17 +10,17 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import org.hornetq.api.config.HornetQDefaultConfiguration;
|
||||
import org.apache.activemq.api.config.ActiveMQDefaultConfiguration;
|
||||
|
||||
|
||||
/**
|
||||
* The basic configuration used to determine how the server will broadcast members
|
||||
* This is analogous to {@link org.hornetq.api.core.DiscoveryGroupConfiguration}
|
||||
* This is analogous to {@link org.apache.activemq.api.core.DiscoveryGroupConfiguration}
|
||||
*
|
||||
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
|
||||
* @author <a href="mailto:hgao@redhat.com">Howard Gao</a>
|
||||
@ -32,7 +32,7 @@ public final class BroadcastGroupConfiguration implements Serializable
|
||||
|
||||
private String name = null;
|
||||
|
||||
private long broadcastPeriod = HornetQDefaultConfiguration.getDefaultBroadcastPeriod();
|
||||
private long broadcastPeriod = ActiveMQDefaultConfiguration.getDefaultBroadcastPeriod();
|
||||
|
||||
private BroadcastEndpointFactoryConfiguration endpointFactoryConfiguration = null;
|
||||
|
@ -10,15 +10,15 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.hornetq.api.core.client.HornetQClient;
|
||||
import org.hornetq.utils.UUIDGenerator;
|
||||
import org.apache.activemq.api.core.client.HornetQClient;
|
||||
import org.apache.activemq.utils.UUIDGenerator;
|
||||
|
||||
/**
|
||||
* This file represents how we are using Discovery.
|
@ -11,12 +11,12 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
/**
|
||||
* This interface is needed for making a DiscoveryGroupConfiguration backward
|
||||
* compatible with version 2.2 clients. It is used to extract from new
|
||||
* {@link org.hornetq.api.core.BroadcastEndpointFactoryConfiguration} the four
|
||||
* {@link org.apache.activemq.api.core.BroadcastEndpointFactoryConfiguration} the four
|
||||
* UDP attributes in order to form a version 2.2 DiscoveryGroupConfiguration
|
||||
* in time of serialization.
|
||||
*
|
@ -10,7 +10,7 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
/**
|
||||
* Constants representing pre-defined message attributes that can be referenced in HornetQ core
|
@ -10,17 +10,17 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
import org.hornetq.core.protocol.core.Packet;
|
||||
import org.hornetq.spi.core.protocol.RemotingConnection;
|
||||
import org.apache.activemq.core.protocol.core.Packet;
|
||||
import org.apache.activemq.spi.core.protocol.RemotingConnection;
|
||||
|
||||
/**
|
||||
* This is class is a simple way to intercepting calls on HornetQ client and servers.
|
||||
* <p>
|
||||
* To add an interceptor to HornetQ server, you have to modify the server configuration file
|
||||
* {@literal hornetq-configuration.xml}.<br>
|
||||
* To add it to a client, use {@link org.hornetq.api.core.client.ServerLocator#addIncomingInterceptor(Interceptor)}
|
||||
* To add it to a client, use {@link org.apache.activemq.api.core.client.ServerLocator#addIncomingInterceptor(Interceptor)}
|
||||
*
|
||||
* @author clebert.suconic@jboss.com
|
||||
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
|
||||
@ -34,7 +34,7 @@ public interface Interceptor
|
||||
* @param connection the connection the packet was received on
|
||||
* @return {@code true} to process the next interceptor and handle the packet,
|
||||
* {@code false} to abort processing of the packet
|
||||
* @throws HornetQException
|
||||
* @throws ActiveMQException
|
||||
*/
|
||||
boolean intercept(Packet packet, RemotingConnection connection) throws HornetQException;
|
||||
boolean intercept(Packet packet, RemotingConnection connection) throws ActiveMQException;
|
||||
}
|
@ -10,7 +10,7 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
@ -10,12 +10,12 @@
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package org.hornetq.api.core;
|
||||
package org.apache.activemq.api.core;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.hornetq.utils.UUID;
|
||||
import org.apache.activemq.utils.UUID;
|
||||
|
||||
|
||||
/**
|
||||
@ -44,7 +44,7 @@ import org.hornetq.utils.UUID;
|
||||
* </pre>
|
||||
* <p>
|
||||
* If conversion is not allowed (for example calling {@code getFloatProperty} on a property set a
|
||||
* {@code boolean}), a {@link HornetQPropertyConversionException} will be thrown.
|
||||
* {@code boolean}), a {@link ActiveMQPropertyConversionException} will be thrown.
|
||||
*
|
||||
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
|
||||
* @author <a href="mailto:clebert.suconic@jboss.com">ClebertSuconic</a>
|
||||
@ -198,7 +198,7 @@ public interface Message
|
||||
/**
|
||||
* Returns the message body as a HornetQBuffer
|
||||
*/
|
||||
HornetQBuffer getBodyBuffer();
|
||||
ActiveMQBuffer getBodyBuffer();
|
||||
|
||||
/**
|
||||
* Writes the input byte array to the message body HornetQBuffer
|
||||
@ -214,7 +214,7 @@ public interface Message
|
||||
* Returns a <em>copy</em> of the message body as a HornetQBuffer. Any modification
|
||||
* of this buffer should not impact the underlying buffer.
|
||||
*/
|
||||
HornetQBuffer getBodyBufferCopy();
|
||||
ActiveMQBuffer getBodyBufferCopy();
|
||||
|
||||
// Properties
|
||||
// -----------------------------------------------------------------
|
||||
@ -371,15 +371,15 @@ public interface Message
|
||||
*
|
||||
* @param key property name
|
||||
* @param value property value
|
||||
* @throws HornetQPropertyConversionException if the value is not one of the accepted property
|
||||
* @throws ActiveMQPropertyConversionException if the value is not one of the accepted property
|
||||
* types.
|
||||
*/
|
||||
Message putObjectProperty(SimpleString key, Object value) throws HornetQPropertyConversionException;
|
||||
Message putObjectProperty(SimpleString key, Object value) throws ActiveMQPropertyConversionException;
|
||||
|
||||
/**
|
||||
* @see #putObjectProperty(SimpleString, Object)
|
||||
*/
|
||||
Message putObjectProperty(String key, Object value) throws HornetQPropertyConversionException;
|
||||
Message putObjectProperty(String key, Object value) throws ActiveMQPropertyConversionException;
|
||||
|
||||
/**
|
||||
* Removes the property corresponding to the specified key.
|
||||
@ -410,62 +410,62 @@ public interface Message
|
||||
/**
|
||||
* Returns the property corresponding to the specified key as a Boolean.
|
||||
*
|
||||
* @throws HornetQPropertyConversionException if the value can not be converted to a Boolean
|
||||
* @throws ActiveMQPropertyConversionException if the value can not be converted to a Boolean
|
||||
*/
|
||||
Boolean getBooleanProperty(SimpleString key) throws HornetQPropertyConversionException;
|
||||
Boolean getBooleanProperty(SimpleString key) throws ActiveMQPropertyConversionException;
|
||||
|
||||
/**
|
||||
* @see #getBooleanProperty(SimpleString)
|
||||
*/
|
||||
Boolean getBooleanProperty(String key) throws HornetQPropertyConversionException;
|
||||
Boolean getBooleanProperty(String key) throws ActiveMQPropertyConversionException;
|
||||
|
||||
/**
|
||||
* Returns the property corresponding to the specified key as a Byte.
|
||||
*
|
||||
* @throws HornetQPropertyConversionException if the value can not be converted to a Byte
|
||||
* @throws ActiveMQPropertyConversionException if the value can not be converted to a Byte
|
||||
*/
|
||||
Byte getByteProperty(SimpleString key) throws HornetQPropertyConversionException;
|
||||
Byte getByteProperty(SimpleString key) throws ActiveMQPropertyConversionException;
|
||||
|
||||
/**
|
||||
* @see #getByteProperty(SimpleString)
|
||||
*/
|
||||
Byte getByteProperty(String key) throws HornetQPropertyConversionException;
|
||||
Byte getByteProperty(String key) throws ActiveMQPropertyConversionException;
|
||||
|
||||
/**
|
||||
* Returns the property corresponding to the specified key as a Double.
|
||||
*
|
||||
* @throws HornetQPropertyConversionException if the value can not be converted to a Double
|
||||
* @throws ActiveMQPropertyConversionException if the value can not be converted to a Double
|
||||
*/
|
||||
Double getDoubleProperty(SimpleString key) throws HornetQPropertyConversionException;
|
||||
Double getDoubleProperty(SimpleString key) throws ActiveMQPropertyConversionException;
|
||||
|
||||
/**
|
||||
* @see #getDoubleProperty(SimpleString)
|
||||
*/
|
||||
Double getDoubleProperty(String key) throws HornetQPropertyConversionException;
|
||||
Double getDoubleProperty(String key) throws ActiveMQPropertyConversionException;
|
||||
|
||||
/**
|
||||
* Returns the property corresponding to the specified key as an Integer.
|
||||
*
|
||||
* @throws HornetQPropertyConversionException if the value can not be converted to an Integer
|
||||
* @throws ActiveMQPropertyConversionException if the value can not be converted to an Integer
|
||||
*/
|
||||
Integer getIntProperty(SimpleString key) throws HornetQPropertyConversionException;
|
||||
Integer getIntProperty(SimpleString key) throws ActiveMQPropertyConversionException;
|
||||
|
||||
/**
|
||||
* @see #getIntProperty(SimpleString)
|
||||
*/
|
||||
Integer getIntProperty(String key) throws HornetQPropertyConversionException;
|
||||
Integer getIntProperty(String key) throws ActiveMQPropertyConversionException;
|
||||
|
||||
/**
|
||||
* Returns the property corresponding to the specified key as a Long.
|
||||
*
|
||||
* @throws HornetQPropertyConversionException if the value can not be converted to a Long
|
||||
* @throws ActiveMQPropertyConversionException if the value can not be converted to a Long
|
||||
*/
|
||||
Long getLongProperty(SimpleString key) throws HornetQPropertyConversionException;
|
||||
Long getLongProperty(SimpleString key) throws ActiveMQPropertyConversionException;
|
||||
|
||||
/**
|
||||
* @see #getLongProperty(SimpleString)
|
||||
*/
|
||||
Long getLongProperty(String key) throws HornetQPropertyConversionException;
|
||||
Long getLongProperty(String key) throws ActiveMQPropertyConversionException;
|
||||
|
||||
/**
|
||||
* Returns the property corresponding to the specified key
|
||||
@ -480,62 +480,62 @@ public interface Message
|
||||
/**
|
||||
* Returns the property corresponding to the specified key as a Short.
|
||||
*
|
||||
* @throws HornetQPropertyConversionException if the value can not be converted to a Short
|
||||
* @throws ActiveMQPropertyConversionException if the value can not be converted to a Short
|
||||
*/
|
||||
Short getShortProperty(SimpleString key) throws HornetQPropertyConversionException;
|
||||
Short getShortProperty(SimpleString key) throws ActiveMQPropertyConversionException;
|
||||
|
||||
/**
|
||||
* @see #getShortProperty(SimpleString)
|
||||
*/
|
||||
Short getShortProperty(String key) throws HornetQPropertyConversionException;
|
||||
Short getShortProperty(String key) throws ActiveMQPropertyConversionException;
|
||||
|
||||
/**
|
||||
* Returns the property corresponding to the specified key as a Float.
|
||||
*
|
||||
* @throws HornetQPropertyConversionException if the value can not be converted to a Float
|
||||
* @throws ActiveMQPropertyConversionException if the value can not be converted to a Float
|
||||
*/
|
||||
Float getFloatProperty(SimpleString key) throws HornetQPropertyConversionException;
|
||||
Float getFloatProperty(SimpleString key) throws ActiveMQPropertyConversionException;
|
||||
|
||||
/**
|
||||
* @see #getFloatProperty(SimpleString)
|
||||
*/
|
||||
Float getFloatProperty(String key) throws HornetQPropertyConversionException;
|
||||
Float getFloatProperty(String key) throws ActiveMQPropertyConversionException;
|
||||
|
||||
/**
|
||||
* Returns the property corresponding to the specified key as a String.
|
||||
*
|
||||
* @throws HornetQPropertyConversionException if the value can not be converted to a String
|
||||
* @throws ActiveMQPropertyConversionException if the value can not be converted to a String
|
||||
*/
|
||||
String getStringProperty(SimpleString key) throws HornetQPropertyConversionException;
|
||||
String getStringProperty(SimpleString key) throws ActiveMQPropertyConversionException;
|
||||
|
||||
/**
|
||||
* @see #getStringProperty(SimpleString)
|
||||
*/
|
||||
String getStringProperty(String key) throws HornetQPropertyConversionException;
|
||||
String getStringProperty(String key) throws ActiveMQPropertyConversionException;
|
||||
|
||||
/**
|
||||
* Returns the property corresponding to the specified key as a SimpleString.
|
||||
*
|
||||
* @throws HornetQPropertyConversionException if the value can not be converted to a SimpleString
|
||||
* @throws ActiveMQPropertyConversionException if the value can not be converted to a SimpleString
|
||||
*/
|
||||
SimpleString getSimpleStringProperty(SimpleString key) throws HornetQPropertyConversionException;
|
||||
SimpleString getSimpleStringProperty(SimpleString key) throws ActiveMQPropertyConversionException;
|
||||
|
||||
/**
|
||||
* @see #getSimpleStringProperty(SimpleString)
|
||||
*/
|
||||
SimpleString getSimpleStringProperty(String key) throws HornetQPropertyConversionException;
|
||||
SimpleString getSimpleStringProperty(String key) throws ActiveMQPropertyConversionException;
|
||||
|
||||
/**
|
||||
* Returns the property corresponding to the specified key as a byte[].
|
||||
*
|
||||
* @throws HornetQPropertyConversionException if the value can not be converted to a byte[]
|
||||
* @throws ActiveMQPropertyConversionException if the value can not be converted to a byte[]
|
||||
*/
|
||||
byte[] getBytesProperty(SimpleString key) throws HornetQPropertyConversionException;
|
||||
byte[] getBytesProperty(SimpleString key) throws ActiveMQPropertyConversionException;
|
||||
|
||||
/**
|
||||
* @see #getBytesProperty(SimpleString)
|
||||
*/
|
||||
byte[] getBytesProperty(String key) throws HornetQPropertyConversionException;
|
||||
byte[] getBytesProperty(String key) throws ActiveMQPropertyConversionException;
|
||||
|
||||
/**
|
||||
* Returns all the names of the properties for this message.
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user