You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2007/04/08 21:34:28 UTC
svn commit: r526597 - in
/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport:
Response.h Transport.h
Author: tabish
Date: Sun Apr 8 12:34:27 2007
New Revision: 526597
URL: http://svn.apache.org/viewvc?view=rev&rev=526597
Log:
Adding additional Documentation
Modified:
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/Response.h
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/Transport.h
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/Response.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/Response.h?view=diff&rev=526597&r1=526596&r2=526597
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/Response.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/Response.h Sun Apr 8 12:34:27 2007
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
+
#ifndef ACTIVEMQ_TRANSPORT_RESPONSE_H_
#define ACTIVEMQ_TRANSPORT_RESPONSE_H_
@@ -22,12 +22,18 @@
namespace activemq{
namespace transport{
-
+
+ /**
+ * Defines the interface for Response Commands from the Broker, all
+ * responses must implement this interface in order to work in the
+ * transport layer. Responses are mapped to the Command they are
+ * linked to by a Correlation Id that is set by the Sedning Transport.
+ */
class Response : public Command{
public:
-
+
virtual ~Response(void) {}
-
+
/**
* Gets the Correlation Id that is associated with this message
* @return the Correlation Id
@@ -39,9 +45,9 @@
* @param corrId
*/
virtual void setCorrelationId( int corrId ) = 0;
-
+
};
-
+
}}
#endif /*ACTIVEMQ_TRANSPORT_RESPONSE_H_*/
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/Transport.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/Transport.h?view=diff&rev=526597&r1=526596&r2=526597
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/Transport.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/Transport.h Sun Apr 8 12:34:27 2007
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
+
#ifndef ACTIVEMQ_TRANSPORT_TRANSPORT_H_
#define ACTIVEMQ_TRANSPORT_TRANSPORT_H_
@@ -29,18 +29,23 @@
namespace activemq{
namespace transport{
-
+
// Forward declarations.
class CommandListener;
class CommandReader;
class CommandWriter;
class TransportExceptionListener;
-
+
/**
* Interface for a transport layer for command objects. Callers can
* send oneway messages or make synchronous requests. Non-response
* messages will be delivered to the specified listener object upon
- * receipt.
+ * receipt. A user of the Transport can set an exception listener
+ * to be notified of errors that occurs in Threads that the Transport
+ * layer runs. Since a Transport doesn't know the Wire Format of the
+ * Commands it reads and writes, its up to the managing object to
+ * provide object(s) that implement the CommandReader and CommandWriter
+ * interfaces.
*/
class Transport
:
@@ -48,9 +53,9 @@
public cms::Closeable
{
public:
-
+
virtual ~Transport(){}
-
+
/**
* Sends a one-way command. Does not wait for any response from the
* broker.
@@ -60,10 +65,10 @@
* @throws UnsupportedOperationException if this method is not implemented
* by this transport.
*/
- virtual void oneway( Command* command )
- throw( CommandIOException,
+ virtual void oneway( Command* command )
+ throw( CommandIOException,
exceptions::UnsupportedOperationException ) = 0;
-
+
/**
* Sends the given command to the broker and then waits for the response.
* @param command the command to be sent.
@@ -73,36 +78,36 @@
* @throws UnsupportedOperationException if this method is not implemented
* by this transport.
*/
- virtual Response* request( Command* command )
- throw( CommandIOException,
+ virtual Response* request( Command* command )
+ throw( CommandIOException,
exceptions::UnsupportedOperationException ) = 0;
-
+
/**
* Assigns the command listener for non-response commands.
* @param listener the listener.
*/
virtual void setCommandListener( CommandListener* listener ) = 0;
-
+
/**
* Sets the command reader.
* @param reader the object that will be used for reading command objects.
*/
virtual void setCommandReader( CommandReader* reader ) = 0;
-
+
/**
* Sets the command writer.
* @param writer the object that will be used for writing command objects.
*/
virtual void setCommandWriter( CommandWriter* writer ) = 0;
-
+
/**
* Sets the observer of asynchronous exceptions from this transport.
* @param listener the listener of transport exceptions.
*/
- virtual void setTransportExceptionListener(
+ virtual void setTransportExceptionListener(
TransportExceptionListener* listener ) = 0;
};
-
+
}}
#endif /*ACTIVEMQ_TRANSPORT_TRANSPORT_H_*/