From do-not-reply at jboss.org Wed May 25 13:32:13 2011 Content-Type: multipart/mixed; boundary="===============0928234423246016140==" MIME-Version: 1.0 From: do-not-reply at jboss.org To: hornetq-commits at lists.jboss.org Subject: [hornetq-commits] JBoss hornetq SVN: r10729 - in branches/HORNETQ-698_SplitJournal: hornetq-commons/src/main/java/org/hornetq/core and 3 other directories. Date: Wed, 25 May 2011 13:32:13 -0400 Message-ID: <201105251732.p4PHWDnL030554@svn01.web.mwc.hst.phx2.redhat.com> --===============0928234423246016140== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: borges Date: 2011-05-25 13:32:12 -0400 (Wed, 25 May 2011) New Revision: 10729 Added: branches/HORNETQ-698_SplitJournal/hornetq-commons/src/main/java/org/horn= etq/api/core/HornetQException.java branches/HORNETQ-698_SplitJournal/hornetq-commons/src/main/java/org/horn= etq/core/server/ branches/HORNETQ-698_SplitJournal/hornetq-commons/src/main/java/org/horn= etq/core/server/HornetQComponent.java Removed: branches/HORNETQ-698_SplitJournal/hornetq-journal/src/main/java/org/horn= etq/api/core/HornetQException.java branches/HORNETQ-698_SplitJournal/hornetq-journal/src/main/java/org/horn= etq/core/server/HornetQComponent.java Log: Move HQException and HQComponent around Copied: branches/HORNETQ-698_SplitJournal/hornetq-commons/src/main/java/org= /hornetq/api/core/HornetQException.java (from rev 10728, branches/HORNETQ-6= 98_SplitJournal/hornetq-journal/src/main/java/org/hornetq/api/core/HornetQE= xception.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/HORNETQ-698_SplitJournal/hornetq-commons/src/main/java/org/hor= netq/api/core/HornetQException.java (rev 0) +++ branches/HORNETQ-698_SplitJournal/hornetq-commons/src/main/java/org/hor= netq/api/core/HornetQException.java 2011-05-25 17:32:12 UTC (rev 10729) @@ -0,0 +1,226 @@ +/* + * Copyright 2009 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.api.core; + +/** + * = + * HornetQException is the root exception for HornetQ API. = + * = + * @author Tim Fox + * + */ +public class HornetQException extends Exception +{ + private static final long serialVersionUID =3D -4802014152804997417L; + + // Error codes ------------------------------------------------- + + /** + * Internal error which prevented HornetQ to perform. + */ + public static final int INTERNAL_ERROR =3D 000; + + /** + * A packet of unsupported type was received by HornetQ PacketHandler. + */ + public static final int UNSUPPORTED_PACKET =3D 001; + + /** + * A client is not able to connect to HornetQ server. + */ + public static final int NOT_CONNECTED =3D 002; + + /** + * A client timed out will connecting to HornetQ server. + */ + public static final int CONNECTION_TIMEDOUT =3D 003; + + /** + * A client was disconnected from HornetQ server when the server has sh= ut down. + */ + public static final int DISCONNECTED =3D 004; + + /** + * A blocking call from a client was unblocked during failover. + */ + public static final int UNBLOCKED =3D 005; + + /** + * Unexpected I/O error occured on the server. + */ + public static final int IO_ERROR =3D 006; + + /** + * An operation failed because a queue does not exist on the server. + */ + public static final int QUEUE_DOES_NOT_EXIST =3D 100; + + /** + * An operation failed because a queue exists on the server. + */ + public static final int QUEUE_EXISTS =3D 101; + + /** + * A client operation failed because the calling resource + * (ClientSession, ClientProducer, etc.) is closed. + */ + public static final int OBJECT_CLOSED =3D 102; + + /** + * An filter expression has not been validated + */ + public static final int INVALID_FILTER_EXPRESSION =3D 103; + + /** + * A HornetQ resource is not in a legal state (e.g. calling = + * ClientConsumer.receive() if a MessageHandler is set) + */ + public static final int ILLEGAL_STATE =3D 104; + + /** + * A security problem occured (authentication issues, permission issues= ,...) + */ + public static final int SECURITY_EXCEPTION =3D 105; + + /** + * An operation failed because an address does not exist on the server. + */ + public static final int ADDRESS_DOES_NOT_EXIST =3D 106; + + /** + * An operation failed because an address exists on the server. + */ + public static final int ADDRESS_EXISTS =3D 107; + + /** + * A incompatibility between HornetQ versions on the client and the ser= ver has been detected + */ + public static final int INCOMPATIBLE_CLIENT_SERVER_VERSIONS =3D 108; + + /** + * An operation failed because a session exists on the server. + */ + public static final int SESSION_EXISTS =3D 109; + + /** + * An problem occurred while manipulating the body of a large message. + */ + public static final int LARGE_MESSAGE_ERROR_BODY =3D 110; + + /** + * A transaction was rolled back. + */ + public static final int TRANSACTION_ROLLED_BACK =3D 111; + + /** + * The creation of a session was rejected by the server (e.g. if the + * server is starting and has not finish to be initialized) + */ + public static final int SESSION_CREATION_REJECTED =3D 112; + = + /** + * A DuplicateID was rejected. + */ + public static final int DUPLICATE_ID_REJECTED =3D 113; + + = + // Native Error codes ---------------------------------------------- + + /** + * A internal error occured in the AIO native code + */ + public static final int NATIVE_ERROR_INTERNAL =3D 200; + + /** + * A buffer is invalid in the AIO native code + */ + public static final int NATIVE_ERROR_INVALID_BUFFER =3D 201; + + /** + * Alignment error in the AIO native code + */ + public static final int NATIVE_ERROR_NOT_ALIGNED =3D 202; + + /** + * AIO has not been properly initialized + */ + public static final int NATIVE_ERROR_CANT_INITIALIZE_AIO =3D 203; + + /** + * AIO has not been properly released + */ + public static final int NATIVE_ERROR_CANT_RELEASE_AIO =3D 204; + + /** + * A closed file has not be properly reopened + */ + public static final int NATIVE_ERROR_CANT_OPEN_CLOSE_FILE =3D 205; + + /** + * An error occured while allocating a queue in AIO native code + */ + public static final int NATIVE_ERROR_CANT_ALLOCATE_QUEUE =3D 206; + + /** + * An error occured while pre-allocating a file in AIO native code + */ + public static final int NATIVE_ERROR_PREALLOCATE_FILE =3D 208; + + /** + * An error occurred while allocating memory in the AIO native code + */ + public static final int NATIVE_ERROR_ALLOCATE_MEMORY =3D 209; + + /** + * AIO is full + */ + public static final int NATIVE_ERROR_AIO_FULL =3D 211; + + private int code; + + public HornetQException() + { + } + + public HornetQException(final int code) + { + this.code =3D code; + } + + public HornetQException(final int code, final String msg) + { + super(msg); + + this.code =3D code; + } + + public HornetQException(final int code, final String msg, final Throwab= le cause) + { + super(msg, cause); + + this.code =3D code; + } + + public int getCode() + { + return code; + } + + @Override + public String toString() + { + return "HornetQException[errorCode=3D" + code + " message=3D" + getM= essage() + "]"; + } + +} Copied: branches/HORNETQ-698_SplitJournal/hornetq-commons/src/main/java/org= /hornetq/core/server/HornetQComponent.java (from rev 10728, branches/HORNET= Q-698_SplitJournal/hornetq-journal/src/main/java/org/hornetq/core/server/Ho= rnetQComponent.java) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/HORNETQ-698_SplitJournal/hornetq-commons/src/main/java/org/hor= netq/core/server/HornetQComponent.java (rev 0) +++ branches/HORNETQ-698_SplitJournal/hornetq-commons/src/main/java/org/hor= netq/core/server/HornetQComponent.java 2011-05-25 17:32:12 UTC (rev 10729) @@ -0,0 +1,32 @@ +/* + * Copyright 2009 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 Tim Fox + * @version $Revision: 2796 $ + * + * $Id: HornetQComponent.java 2796 2007-06-25 22:24:41Z timfox $ + * + */ +public interface HornetQComponent +{ + void start() throws Exception; + + void stop() throws Exception; + + boolean isStarted(); +} Deleted: branches/HORNETQ-698_SplitJournal/hornetq-journal/src/main/java/or= g/hornetq/api/core/HornetQException.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/HORNETQ-698_SplitJournal/hornetq-journal/src/main/java/org/hor= netq/api/core/HornetQException.java 2011-05-25 17:31:09 UTC (rev 10728) +++ branches/HORNETQ-698_SplitJournal/hornetq-journal/src/main/java/org/hor= netq/api/core/HornetQException.java 2011-05-25 17:32:12 UTC (rev 10729) @@ -1,226 +0,0 @@ -/* - * Copyright 2009 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.api.core; - -/** - * = - * HornetQException is the root exception for HornetQ API. = - * = - * @author Tim Fox - * - */ -public class HornetQException extends Exception -{ - private static final long serialVersionUID =3D -4802014152804997417L; - - // Error codes ------------------------------------------------- - - /** - * Internal error which prevented HornetQ to perform. - */ - public static final int INTERNAL_ERROR =3D 000; - - /** - * A packet of unsupported type was received by HornetQ PacketHandler. - */ - public static final int UNSUPPORTED_PACKET =3D 001; - - /** - * A client is not able to connect to HornetQ server. - */ - public static final int NOT_CONNECTED =3D 002; - - /** - * A client timed out will connecting to HornetQ server. - */ - public static final int CONNECTION_TIMEDOUT =3D 003; - - /** - * A client was disconnected from HornetQ server when the server has sh= ut down. - */ - public static final int DISCONNECTED =3D 004; - - /** - * A blocking call from a client was unblocked during failover. - */ - public static final int UNBLOCKED =3D 005; - - /** - * Unexpected I/O error occured on the server. - */ - public static final int IO_ERROR =3D 006; - - /** - * An operation failed because a queue does not exist on the server. - */ - public static final int QUEUE_DOES_NOT_EXIST =3D 100; - - /** - * An operation failed because a queue exists on the server. - */ - public static final int QUEUE_EXISTS =3D 101; - - /** - * A client operation failed because the calling resource - * (ClientSession, ClientProducer, etc.) is closed. - */ - public static final int OBJECT_CLOSED =3D 102; - - /** - * An filter expression has not been validated - */ - public static final int INVALID_FILTER_EXPRESSION =3D 103; - - /** - * A HornetQ resource is not in a legal state (e.g. calling = - * ClientConsumer.receive() if a MessageHandler is set) - */ - public static final int ILLEGAL_STATE =3D 104; - - /** - * A security problem occured (authentication issues, permission issues= ,...) - */ - public static final int SECURITY_EXCEPTION =3D 105; - - /** - * An operation failed because an address does not exist on the server. - */ - public static final int ADDRESS_DOES_NOT_EXIST =3D 106; - - /** - * An operation failed because an address exists on the server. - */ - public static final int ADDRESS_EXISTS =3D 107; - - /** - * A incompatibility between HornetQ versions on the client and the ser= ver has been detected - */ - public static final int INCOMPATIBLE_CLIENT_SERVER_VERSIONS =3D 108; - - /** - * An operation failed because a session exists on the server. - */ - public static final int SESSION_EXISTS =3D 109; - - /** - * An problem occurred while manipulating the body of a large message. - */ - public static final int LARGE_MESSAGE_ERROR_BODY =3D 110; - - /** - * A transaction was rolled back. - */ - public static final int TRANSACTION_ROLLED_BACK =3D 111; - - /** - * The creation of a session was rejected by the server (e.g. if the - * server is starting and has not finish to be initialized) - */ - public static final int SESSION_CREATION_REJECTED =3D 112; - = - /** - * A DuplicateID was rejected. - */ - public static final int DUPLICATE_ID_REJECTED =3D 113; - - = - // Native Error codes ---------------------------------------------- - - /** - * A internal error occured in the AIO native code - */ - public static final int NATIVE_ERROR_INTERNAL =3D 200; - - /** - * A buffer is invalid in the AIO native code - */ - public static final int NATIVE_ERROR_INVALID_BUFFER =3D 201; - - /** - * Alignment error in the AIO native code - */ - public static final int NATIVE_ERROR_NOT_ALIGNED =3D 202; - - /** - * AIO has not been properly initialized - */ - public static final int NATIVE_ERROR_CANT_INITIALIZE_AIO =3D 203; - - /** - * AIO has not been properly released - */ - public static final int NATIVE_ERROR_CANT_RELEASE_AIO =3D 204; - - /** - * A closed file has not be properly reopened - */ - public static final int NATIVE_ERROR_CANT_OPEN_CLOSE_FILE =3D 205; - - /** - * An error occured while allocating a queue in AIO native code - */ - public static final int NATIVE_ERROR_CANT_ALLOCATE_QUEUE =3D 206; - - /** - * An error occured while pre-allocating a file in AIO native code - */ - public static final int NATIVE_ERROR_PREALLOCATE_FILE =3D 208; - - /** - * An error occurred while allocating memory in the AIO native code - */ - public static final int NATIVE_ERROR_ALLOCATE_MEMORY =3D 209; - - /** - * AIO is full - */ - public static final int NATIVE_ERROR_AIO_FULL =3D 211; - - private int code; - - public HornetQException() - { - } - - public HornetQException(final int code) - { - this.code =3D code; - } - - public HornetQException(final int code, final String msg) - { - super(msg); - - this.code =3D code; - } - - public HornetQException(final int code, final String msg, final Throwab= le cause) - { - super(msg, cause); - - this.code =3D code; - } - - public int getCode() - { - return code; - } - - @Override - public String toString() - { - return "HornetQException[errorCode=3D" + code + " message=3D" + getM= essage() + "]"; - } - -} Deleted: branches/HORNETQ-698_SplitJournal/hornetq-journal/src/main/java/or= g/hornetq/core/server/HornetQComponent.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/HORNETQ-698_SplitJournal/hornetq-journal/src/main/java/org/hor= netq/core/server/HornetQComponent.java 2011-05-25 17:31:09 UTC (rev 10728) +++ branches/HORNETQ-698_SplitJournal/hornetq-journal/src/main/java/org/hor= netq/core/server/HornetQComponent.java 2011-05-25 17:32:12 UTC (rev 10729) @@ -1,32 +0,0 @@ -/* - * Copyright 2009 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 Tim Fox - * @version $Revision: 2796 $ - * - * $Id: HornetQComponent.java 2796 2007-06-25 22:24:41Z timfox $ - * - */ -public interface HornetQComponent -{ - void start() throws Exception; - - void stop() throws Exception; - - boolean isStarted(); -} --===============0928234423246016140==--