summaryrefslogtreecommitdiff
path: root/java/common/src
diff options
context:
space:
mode:
authorArnaud Simon <arnaudsimon@apache.org>2007-07-23 14:54:31 +0000
committerArnaud Simon <arnaudsimon@apache.org>2007-07-23 14:54:31 +0000
commit1c0caf7012a262baab59720d779977f5dade5fd2 (patch)
treed8beec5a1b540c59510c4fd3c8fe65f2bc7bb77a /java/common/src
parentd48ff4aa6b5e30a1fbae712b8ba00a87c11751d0 (diff)
downloadqpid-python-1c0caf7012a262baab59720d779977f5dade5fd2.tar.gz
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@558760 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/common/src')
-rw-r--r--java/common/src/main/java/org/apache/qpid/nclient/FieldTable.java28
-rw-r--r--java/common/src/main/java/org/apache/qpid/nclient/exception/QpidException.java48
-rw-r--r--java/common/src/main/java/org/apache/qpid/nclient/qpidapi/Connection.java81
-rw-r--r--java/common/src/main/java/org/apache/qpid/nclient/qpidapi/CreateReceiverOption.java16
-rw-r--r--java/common/src/main/java/org/apache/qpid/nclient/qpidapi/DeclareExchangeOption.java17
-rw-r--r--java/common/src/main/java/org/apache/qpid/nclient/qpidapi/DeleteExchangeOption.java12
-rw-r--r--java/common/src/main/java/org/apache/qpid/nclient/qpidapi/DeleteQueueOption.java13
-rw-r--r--java/common/src/main/java/org/apache/qpid/nclient/qpidapi/DtxSession.java43
-rw-r--r--java/common/src/main/java/org/apache/qpid/nclient/qpidapi/Message.java126
-rw-r--r--java/common/src/main/java/org/apache/qpid/nclient/qpidapi/MessageListener.java36
-rw-r--r--java/common/src/main/java/org/apache/qpid/nclient/qpidapi/MessageReceiver.java95
-rw-r--r--java/common/src/main/java/org/apache/qpid/nclient/qpidapi/MessageSender.java44
-rw-r--r--java/common/src/main/java/org/apache/qpid/nclient/qpidapi/Resource.java54
-rw-r--r--java/common/src/main/java/org/apache/qpid/nclient/qpidapi/Session.java247
-rw-r--r--java/common/src/main/java/org/apache/qpid/nclient/qpidapi/declareQueueOption.java17
15 files changed, 0 insertions, 877 deletions
diff --git a/java/common/src/main/java/org/apache/qpid/nclient/FieldTable.java b/java/common/src/main/java/org/apache/qpid/nclient/FieldTable.java
deleted file mode 100644
index d79794e98d..0000000000
--- a/java/common/src/main/java/org/apache/qpid/nclient/FieldTable.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF 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.qpid.nclient;
-
-/**
- * Created by Arnaud Simon
- * Date: 23-Jul-2007
- * Time: 09:47:32
- */
-public interface FieldTable
-{
-}
diff --git a/java/common/src/main/java/org/apache/qpid/nclient/exception/QpidException.java b/java/common/src/main/java/org/apache/qpid/nclient/exception/QpidException.java
deleted file mode 100644
index cacac98cc0..0000000000
--- a/java/common/src/main/java/org/apache/qpid/nclient/exception/QpidException.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF 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.qpid.nclient.exception;
-
-/**
- * Created by Arnaud Simon
- * Date: 20-Jul-2007
- * Time: 10:56:55
- */
-public class QpidException extends Exception
-{
- /**
- * This exception error code.
- * <p> This error code is used for internationalisation purpose.
- * <p> This error code is set from the AMQP ones.
- * <TODO> So we may want to use the AMQP error code directly.
- */
- String _errorCode;
-
- /**
- * Constructor for a Qpid Exception.
- * <p> This is the only provided constructor and the parameters have to be set to null when
- * they are unknown.
- * @param message A description of the reason of this exception .
- * @param errorCode A string specifyin the error code of this exception.
- * @param cause The linked Execption.
- */
- public QpidException(String message, String errorCode, Throwable cause)
- {
- super(message, cause);
- _errorCode = errorCode;
- }
-}
diff --git a/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/Connection.java b/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/Connection.java
deleted file mode 100644
index fd59b95c0f..0000000000
--- a/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/Connection.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF 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.qpid.nclient.qpidapi;
-
-import org.apache.qpid.nclient.exception.QpidException;
-
-import java.net.URL;
-
-/**
- * This represents a physical connection to a broker.
- * <p/>
- * Created by Arnaud Simon
- * Date: 20-Jul-2007
- * Time: 09:34:15
- */
-public interface Connection
-{
- /**
- * Establish the connection with the broker identified by the provided URL.
- *
- * @param url The URL of the broker.
- * @throws QpidException If the communication layer fails to connect with the broker.
- */
- public void connect(URL url)
- throws
- QpidException;
-
- /**
- * Close this connection.
- *
- * @throws QpidException if the communication layer fails to close the connection.
- */
- public void close()
- throws
- QpidException;
-
-
- /**
- * Create a session for this connection.
- * <p> The retuned session is suspended
- * (i.e. this session is not attached with an underlying channel)
- *
- * @param expiryInSeconds Expiry time expressed in seconds, if the value is <= 0 then the session does not expire.
- * @return A Newly created (suspended) session.
- * @throws QpidException If the connection fails to create a session due to some internal error.
- */
- public Session createSession(int expiryInSeconds)
- throws
- QpidException;
-
- /**
- * Create a DtxSession for this connection.
- * <p> A Dtx Session must be used when resources have to be manipulated as
- * part of a global transaction.
- * <p> The retuned DtxSession is suspended
- * (i.e. this session is not attached with an underlying channel)
- *
- * @param expiryInSeconds Expiry time expressed in seconds, if the value is <= 0 then the session does not expire.
- * @return A Newly created (suspended) DtxSession.
- * @throws QpidException If the connection fails to create a DtxSession due to some internal error.
- */
- public DtxSession createDTXSession(int expiryInSeconds)
- throws
- QpidException;
-}
diff --git a/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/CreateReceiverOption.java b/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/CreateReceiverOption.java
deleted file mode 100644
index 4d8315c33b..0000000000
--- a/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/CreateReceiverOption.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.apache.qpid.nclient.qpidapi;
-
-/**
- * Enumeration of the options available when creating a receiver
- *
- * Created by Arnaud Simon
- * Date: 20-Jul-2007
- * Time: 09:43:31
- */
-public enum CreateReceiverOption
-{
- NO_LOCAL,
- EXCLUSIVE,
- NO_ACQUIRE,
- CONFIRME;
-}
diff --git a/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/DeclareExchangeOption.java b/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/DeclareExchangeOption.java
deleted file mode 100644
index 8674792252..0000000000
--- a/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/DeclareExchangeOption.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package org.apache.qpid.nclient.qpidapi;
-
-/**
- * Enumeration of the options available when declaring an exchange
- *
- * Created by Arnaud Simon
- * Date: 20-Jul-2007
- * Time: 09:44:52
- */
-public enum DeclareExchangeOption
-{
- AUTO_DELETE,
- DURABLE,
- INTERNAL,
- NOWAIT,
- PASSIVE;
-}
diff --git a/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/DeleteExchangeOption.java b/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/DeleteExchangeOption.java
deleted file mode 100644
index 188d665c8c..0000000000
--- a/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/DeleteExchangeOption.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package org.apache.qpid.nclient.qpidapi;
-
-/**
- * Created by Arnaud Simon
- * Date: 23-Jul-2007
- * Time: 12:55:55
- */
-public enum DeleteExchangeOption
-{
- IF_UNUSED,
- NOWAIT;
-}
diff --git a/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/DeleteQueueOption.java b/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/DeleteQueueOption.java
deleted file mode 100644
index 0062218a70..0000000000
--- a/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/DeleteQueueOption.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package org.apache.qpid.nclient.qpidapi;
-
-/**
- * Created by Arnaud Simon
- * Date: 23-Jul-2007
- * Time: 12:44:43
- */
-public enum DeleteQueueOption
-{
- IF_EMPTY,
- IF_UNUSED,
- NO_WAIT;
-}
diff --git a/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/DtxSession.java b/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/DtxSession.java
deleted file mode 100644
index c361fdcf82..0000000000
--- a/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/DtxSession.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF 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.qpid.nclient.qpidapi;
-
-import org.apache.qpid.nclient.exception.QpidException;
-
-/**
- * This session’s resources are control under the scope of a distributed transaction.
- *
- * Created by Arnaud Simon
- * Date: 20-Jul-2007
- * Time: 09:39:11
- */
-public interface DtxSession extends Session
-{
-
- /**
- * Get the XA resource associated with this session.
- *
- * @return this session XA resource.
- * @throws QpidException If the session fails to retrieve its associated XA resource
- * due to some error.
- */
- public javax.transaction.xa.XAResource getDTXResource()
- throws
- QpidException;
-}
diff --git a/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/Message.java b/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/Message.java
deleted file mode 100644
index 6974d0cae2..0000000000
--- a/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/Message.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF 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.qpid.nclient.qpidapi;
-
-
-import org.apache.qpid.nclient.FieldTable;
-import org.apache.qpid.nclient.exception.QpidException;
-
-import java.nio.ByteBuffer;
-
-/**
- * A message is sent and received by resources. It is composed of a set of header and a payload.
- * <p/>
- * Created by Arnaud Simon
- * Date: 20-Jul-2007
- * Time: 09:40:49
- */
-public interface Message
-{
- /**
- * Get this message auto-allocated messageID.
- *
- * @return This message ID.
- */
- public long getMessageID();
-
- /**
- * Set this message headers
- * <p> Previous headers are reset.
- *
- * @param headers The message headers as a field table.
- * @see FieldTable
- */
- public void setHeaders(FieldTable headers);
-
- /**
- * Access to this message headers.
- *
- * @return This message headers as a field table.
- */
- public FieldTable getHeaders();
-
- /**
- * Set this message payload.
- *
- * @param buffer This message payload.
- */
- public void setBody(ByteBuffer buffer);
-
- /**
- * Access this message body.
- *
- * @return The payload of this message.
- */
- public ByteBuffer getBody();
-
- /**
- * Acknowledge the receipt of this message.
- * <p>The message must have been previously acquired either by receiving it in
- * pre-acquire mode or by explicitly acquiring it.
- *
- * @throws QpidException If the acknowledgement of the message fails due to some error.
- * @throws IllegalStateException If this messages is not acquired.
- */
- public void acknowledge()
- throws
- QpidException,
- IllegalStateException;
-
- /**
- * Acknowledge the receipt of an acquired messages which IDs are within
- * the interval [this.messageID, message.messageID]
- *
- * @param message The last message to be acknowledged.
- * @throws QpidException If the acknowledgement of this set of messages fails due to some error.
- * @throws IllegalStateException If some messages are not acquired.
- */
- public void acknowledge(Message message)
- throws
- QpidException,
- IllegalStateException;
-
- /**
- * Reject a previously acquired message.
- * <p> A rejected message will not be delivered to any receiver
- * and may be either discarded or moved to the broker dead letter queue.
- *
- * @throws QpidException If this message cannot be rejected dus to some error
- * @throws IllegalStateException If this message is not acquired.
- */
- public void reject()
- throws
- QpidException,
- IllegalStateException;
-
- /**
- * Try to acquire this message hence releasing it form the queue. This means that once acknowledged,
- * this message will not be delivered to any other receiver.
- * <p> As this message may have been consumed by another receiver, message acquisition can fail.
- * The outcome of the acquisition is returned as a Boolean.
- *
- * @return True if the message is successfully acquired, False otherwise.
- * @throws QpidException If this message cannot be acquired dus to some error
- * @throws IllegalStateException If this message has already been acquired.
- */
- public boolean acquire()
- throws
- QpidException,
- IllegalStateException;
-}
diff --git a/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/MessageListener.java b/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/MessageListener.java
deleted file mode 100644
index d607d0a3c2..0000000000
--- a/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/MessageListener.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF 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.qpid.nclient.qpidapi;
-
-/**
- * MessageListeners are used to asynchronously receive messages.
- *
- * Created by Arnaud Simon
- * Date: 2o-Jul-2007
- * Time: 09:42:52
- */
-public interface MessageListener
-{
- /**
- * Deliver a message to the listener.
- *
- * @param message The message delivered to the listner.
- */
- public void onMessage(Message message);
-}
diff --git a/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/MessageReceiver.java b/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/MessageReceiver.java
deleted file mode 100644
index 6592857b2e..0000000000
--- a/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/MessageReceiver.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF 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.qpid.nclient.qpidapi;
-
-import org.apache.qpid.nclient.exception.QpidException;
-
-import java.util.Set;
-
-/**
- * Used to receive messages from a queue
- *
- * <p/>
- * Created by Arnaud Simon
- * Date: 20-Jul-2007
- * Time: 09:42:37
- */
-public interface MessageReceiver extends Resource
-{
- /**
- * Get this receiver options.
- *
- * @return This receiver set of options.
- */
- public Set<CreateReceiverOption> getOptions();
-
- /**
- * Receive a message form this receiver queue.
- * <p> If the timeout is less or equal than 0 then this operation is blocking.
- * Otherwise it blocks until a message arrives, the timeout expires, or this receiver is closed.
- * <p> To receive messages, a receiver must be started.
- *
- * @param timeout The timeout value (in milliseconds).
- * @return A message or null if timeout expires or this receiver is concurrently closed.
- * @throws QpidException If this receiver fails to receive a message due to some error.
- * @throws IllegalStateException If this receiver is closed, not started or a MessageListener is set.
- */
- public Message receive(long timeout)
- throws
- QpidException,
- IllegalStateException;
-
- /**
- * Stop the delivery of messages to this receiver.
- *
- * @throws QpidException If this receiver fails to be stopped due to some error.
- * @throws IllegalStateException If this receiver is closed or already stopped.
- */
- public void stop()
- throws
- QpidException,
- IllegalStateException;
-
- /**
- * Start the delivery of messages to this receiver.
- *
- * @throws QpidException If this receiver fails to be started due to some error.
- * @throws IllegalStateException If this receiver is closed or already started.
- */
- public void start()
- throws
- QpidException,
- IllegalStateException;
-
- /**
- * Set the receiver’s MessageListener.
- * Setting the message listener to null is the equivalent of un-setting the message
- * listener for this receiver.
- * <p> Once a message listener is set, a receiver cannot receive messages through its
- * receive method.
- *
- * @param listener The message listner.
- * @throws QpidException If this receiver fails to set the message listner due to some error.
- * @throws IllegalStateException If this receiver is closed.
- */
- public void setAsynchronous(MessageListener listener)
- throws
- QpidException,
- IllegalStateException;
-}
diff --git a/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/MessageSender.java b/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/MessageSender.java
deleted file mode 100644
index 545c06e67e..0000000000
--- a/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/MessageSender.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF 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.qpid.nclient.qpidapi;
-
-import org.apache.qpid.nclient.exception.QpidException;
-
-/**
- * A sender is used to send message to its queue.
- * <p/>
- * Created by Arnaud Simon
- * Date: 22-Jul-2007
- * Time: 09:41:58
- */
-public interface MessageSender extends Resource
-{
-
- /**
- * Sends a message to this sender queue.
- *
- * @param message The message to be sent
- * @throws QpidException If the sender fails to send the message due to some error.
- * @throws IllegalStateException If this sender was closed or its session suspended.
- */
- public void send(Message message)
- throws
- QpidException,
- IllegalStateException;
-}
diff --git a/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/Resource.java b/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/Resource.java
deleted file mode 100644
index 29965e0045..0000000000
--- a/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/Resource.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF 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.qpid.nclient.qpidapi;
-
-import org.apache.qpid.nclient.exception.QpidException;
-
-/**
- * A Resource is associated with a session and can be independently closed.
- *
- * Created by Arnaud Simon
- * Date: 21-Jul-2007
- * Time: 09:41:30
- */
-public interface Resource
-{
-
- /**
- * Close this resource.
- *
- * @throws QpidException If the session fails to close this resource due to some error
- */
- public void close() throws
- QpidException;
-
- /**
- * Get this resource session.
- *
- * @return This resource's session.
- */
- public Session getSession();
-
- /**
- * Get the queue name to which this resource is tied.
- *
- * @return The queue name of this resource.
- */
- public String getQueueNAme();
-}
diff --git a/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/Session.java b/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/Session.java
deleted file mode 100644
index 24e47a7657..0000000000
--- a/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/Session.java
+++ /dev/null
@@ -1,247 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF 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.qpid.nclient.qpidapi;
-
-import org.apache.qpid.nclient.exception.QpidException;
-
-/**
- * A session is associated with a connection.
- * <p> When created a Session is not attached with an underlying channel. Unsuspended a Session is
- * equivalent to attaching a communication channel that can be used to communicate with the broker.
- * <p/>
- * Created by Arnaud Simon
- * Date: 20-Jul-2007
- * Time: 09:36:24
- */
-public interface Session
-{
- /**
- * Close this session and any associated resources.
- *
- * @throws QpidException If the communication layer fails to close this session or if an internal error happens
- * when closing this session resources. .
- */
- public void close()
- throws
- QpidException;
-
- /**
- * Suspend this session resulting in interrupting the traffic with the broker.
- * When a session is suspend any operation of this session and of the associated resources is unavailable.
- *
- * @throws QpidException If the communication layer fails to suspend this session
- */
- public void suspend()
- throws
- QpidException;
-
- /**
- * Unsuspended a Session is equivalent to attaching a communication channel that can be used to
- * communicate with the broker. All the operations of this session and of the associated resources
- * are made available.
- *
- * @throws QpidException If the communication layer fails to unsuspend this session
- */
- public void unsuspend()
- throws
- QpidException;
-
- /**
- * Create a message sender for sending messages to queue queueName.
- *
- * @param queueName The queue this sender is sending messages.
- * @return A sender for queue queueName
- * @throws QpidException If the session fails to create the sended due to some error
- */
- public MessageSender createSender(String queueName)
- throws
- QpidException;
- //Todo: Do we need to define more specific exception like queue name not valid?
-
- /**
- * Create a message receiver for receiving messages from queue queueName.
- * <p> see available options: {@link CreateReceiverOption}
- * <p> When non of the options are set then the receiver is created with:
- * <ul>
- * <li> no_local = false
- * <li> non exclusive
- * <li> pre-acquire mode
- * <li> no confirmation
- * </ul>
- *
- * @param queueName The queue this receiver is receiving messages from.
- * @param options Set of Options.
- * @return A receiver for queue queueName.
- * @throws QpidException If the session fails to create the receiver due to some error.
- * @see CreateReceiverOption
- */
- public MessageReceiver createReceiver(String queueName, CreateReceiverOption... options)
- throws
- QpidException;
- //Todo: Do we need to define more specific exceptions like queue name not valid?
-
- /**
- * Commit the receipt and the delivery of all messages exchanged by this session resources.
- *
- * @throws QpidException If the session fails to commit due to some error.
- * @throws IllegalStateException If this session is not transacted.
- */
- public void commit()
- throws
- QpidException,
- IllegalStateException;
-
- /**
- * Rollback the receipt and the delivery of all messages exchanged by this session resources.
- *
- * @throws QpidException If the session fails to rollback due to some error.
- * @throws IllegalStateException If this session is not transacted.
- */
- public void rollback()
- throws
- QpidException,
- IllegalStateException;
-
- /**
- * Set this session as transacted.
- * <p> This operation is irreversible.
- *
- * @throws QpidException If the session fail to be transacted due to some error.
- * @throws IllegalStateException If this session is already transacted.
- */
- public void setTransacted()
- throws
- QpidException,
- IllegalStateException;
-
- /**
- * Declare a queue of name queueName
- * <p> see available options: {@link declareQueueOption}
- * <p> When non of the options are set then the receiver is created with:
- * <ul>
- * <li> auto_delete = false
- * <li> non-durable
- * <li> non-exccusive
- * <li> nowait = false
- * <li> not passive
- * </ul>
- *
- * @param queueName The name of the delcared queue.
- * @param options Set of Options.
- * @throws QpidException If the session fails to declare the queue due to some error.
- * @see declareQueueOption
- */
- public void declareQueue(String queueName, declareQueueOption... options)
- throws
- QpidException;
- //Todo: Do we need to define more specific exceptions like queue name already exist?
-
- /**
- * Bind a queue with an exchange.
- *
- * @param queueName The queue to be bound.
- * @param exchangeName The exchange name.
- * @param routingKey The routing key.
- * @param nowait nowait
- * @throws QpidException If the session fails to bind the queue due to some error.
- */
- public void bindQueue(String queueName, String exchangeName, String routingKey, boolean nowait)
- throws
- QpidException;
- //Todo: Do we need to define more specific exceptions like exchange does not exist?
-
- /**
- * Unbind a queue from an exchange.
- *
- * @param queueName The queue to be unbound.
- * @param exchangeName The exchange name.
- * @param routingKey The routing key.
- * @throws QpidException If the session fails to unbind the queue due to some error.
- */
- public void unbindQueue(String queueName, String exchangeName, String routingKey)
- throws
- QpidException;
- //Todo: Do we need to define more specific exceptions like exchange does not exist?
-
- /**
- * Purge a queue. i.e. delete all enqueued messages
- * TODO: Define the exact semantic i.e. are message sent to a dead letter queue?
- *
- * @param queueName The queue to be purged
- * @param nowait nowait
- * @throws QpidException If the session fails to purge the queue due to some error.
- */
- public void purgeQueue(String queueName, boolean nowait)
- throws
- QpidException;
-
- /**
- * Delet a queue.
- * <p> see available options: {@link DeleteQueueOption}
- * <p> When non of the options are set then The queue is immediately deleted even
- * if it still contains messages or if ti is used by another resource.
- *
- * @param queueName The name of the queue to be deleted
- * @param options Set of options
- * @throws QpidException If the session fails to delete the queue due to some error.
- * @see DeleteQueueOption
- */
- public void deleteQueue(String queueName, DeleteQueueOption options)
- throws
- QpidException;
-
- /**
- * Declare an exchange.
- * <p> see available options: {@link DeclareExchangeOption}
- * <p> When non of the options are set then the exchange is declared with:
- * <ul>
- * <li> auto_delete = false
- * <li> non-durable
- * <li> internal = false
- * <li> nowait = false
- * <li> not passive
- * </ul>
- *
- * @param exchangeName The exchange name.
- * @param exchangeClass The fully qualified name of the exchange class.
- * @param options Set of options.
- * @throws QpidException If the session fails to declare the exchange due to some error.
- * @see DeclareExchangeOption
- */
- public void declareExchange(String exchangeName, String exchangeClass, DeclareExchangeOption... options)
- throws
- QpidException;
- //Todo: Do we need to define more specific exceptions like exchange already exist?
-
- /**
- * Delete an exchange.
- * <p> see available options: {@link DeclareExchangeOption}
- * <p> When non of the options are set then the exchange
- * Immediately deleted even if it is used by another resources.
- *
- * @param exchangeName The name of exchange to be deleted.
- * @param options Set of options.
- * @throws QpidException If the session fails to delete the exchange due to some error.
- * @see DeleteExchangeOption
- */
- public void deleteExchange(String exchangeName, DeleteExchangeOption... options)
- throws
- QpidException;
- //Todo: Do we need to define more specific exceptions like exchange does not exist?
-}
diff --git a/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/declareQueueOption.java b/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/declareQueueOption.java
deleted file mode 100644
index 5eb3b7927a..0000000000
--- a/java/common/src/main/java/org/apache/qpid/nclient/qpidapi/declareQueueOption.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package org.apache.qpid.nclient.qpidapi;
-
-/**
- * Enumeration of the options available when declaring a queue
- *
- * Created by Arnaud Simon
- * Date: 23-Jul-2007
- * Time: 09:44:36
- */
-public enum declareQueueOption
-{
- AUTO_DELETE,
- DURABLE,
- EXCLUSIVE,
- NOWAIT,
- PASSIVE;
-}