mirror of https://github.com/apache/activemq.git
set the eol style to native
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@419370 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9f7dcf7139
commit
1c0d2eb886
|
@ -1,62 +1,62 @@
|
|||
/*
|
||||
* Copyright 2006 The Apache Software Foundation or its licensors, as
|
||||
* applicable.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
#ifndef _CMS_BYTESMESSAGE_H_
|
||||
#define _CMS_BYTESMESSAGE_H_
|
||||
|
||||
#include <cms/Message.h>
|
||||
|
||||
namespace cms{
|
||||
|
||||
class BytesMessage : public Message{
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
virtual ~BytesMessage(){}
|
||||
|
||||
/**
|
||||
* sets the bytes given to the message body.
|
||||
* @param Byte Buffer to copy
|
||||
* @param Number of bytes in Buffer to copy
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual void setBodyBytes(
|
||||
const unsigned char* buffer, const unsigned long numBytes )
|
||||
throw( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Gets the bytes that are contained in this message, user should
|
||||
* copy this data into a user allocated buffer. Call
|
||||
* <code>getBodyLength</code> to determine the number of bytes
|
||||
* to expect.
|
||||
* @return const pointer to a byte buffer
|
||||
*/
|
||||
virtual const unsigned char* getBodyBytes(void) const = 0;
|
||||
|
||||
/**
|
||||
* Returns the number of bytes contained in the body of this message.
|
||||
* @return number of bytes.
|
||||
*/
|
||||
virtual unsigned long getBodyLength(void) const = 0;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
#endif /*_CMS_BYTESMESSAGE_H_*/
|
||||
/*
|
||||
* Copyright 2006 The Apache Software Foundation or its licensors, as
|
||||
* applicable.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
#ifndef _CMS_BYTESMESSAGE_H_
|
||||
#define _CMS_BYTESMESSAGE_H_
|
||||
|
||||
#include <cms/Message.h>
|
||||
|
||||
namespace cms{
|
||||
|
||||
class BytesMessage : public Message{
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
virtual ~BytesMessage(){}
|
||||
|
||||
/**
|
||||
* sets the bytes given to the message body.
|
||||
* @param Byte Buffer to copy
|
||||
* @param Number of bytes in Buffer to copy
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual void setBodyBytes(
|
||||
const unsigned char* buffer, const unsigned long numBytes )
|
||||
throw( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Gets the bytes that are contained in this message, user should
|
||||
* copy this data into a user allocated buffer. Call
|
||||
* <code>getBodyLength</code> to determine the number of bytes
|
||||
* to expect.
|
||||
* @return const pointer to a byte buffer
|
||||
*/
|
||||
virtual const unsigned char* getBodyBytes(void) const = 0;
|
||||
|
||||
/**
|
||||
* Returns the number of bytes contained in the body of this message.
|
||||
* @return number of bytes.
|
||||
*/
|
||||
virtual unsigned long getBodyLength(void) const = 0;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
#endif /*_CMS_BYTESMESSAGE_H_*/
|
||||
|
|
|
@ -1,76 +1,76 @@
|
|||
/*
|
||||
* Copyright 2006 The Apache Software Foundation or its licensors, as
|
||||
* applicable.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
#ifndef _CMS_CONNECTION_H_
|
||||
#define _CMS_CONNECTION_H_
|
||||
|
||||
#include <cms/Startable.h>
|
||||
#include <cms/Stoppable.h>
|
||||
#include <cms/Closeable.h>
|
||||
#include <cms/Session.h>
|
||||
|
||||
namespace cms
|
||||
{
|
||||
class ExceptionListener;
|
||||
|
||||
class Connection :
|
||||
public Startable,
|
||||
public Stoppable,
|
||||
public Closeable
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
virtual ~Connection(void) {}
|
||||
|
||||
/**
|
||||
* Creates a new Session to work for this Connection
|
||||
*/
|
||||
virtual Session* createSession(void) throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Creates a new Session to work for this Connection using the
|
||||
* specified acknowledgment mode
|
||||
* @param the Acknowledgement Mode to use.
|
||||
*/
|
||||
virtual Session* createSession(Session::AcknowledgeMode ackMode)
|
||||
throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Get the Client Id for this session
|
||||
*/
|
||||
virtual std::string getClientId(void) const = 0;
|
||||
|
||||
/**
|
||||
* Gets the registered Exception Listener for this connection
|
||||
* @return pointer to an exception listnener or NULL
|
||||
*/
|
||||
virtual ExceptionListener* getExceptionListener(void) const = 0;
|
||||
|
||||
/**
|
||||
* Sets the registed Exception Listener for this connection
|
||||
* @param pointer to and <code>ExceptionListener</code>
|
||||
*/
|
||||
virtual void setExceptionListener(ExceptionListener* listener) = 0;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /*_CMS_CONNECTION_H_*/
|
||||
/*
|
||||
* Copyright 2006 The Apache Software Foundation or its licensors, as
|
||||
* applicable.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
#ifndef _CMS_CONNECTION_H_
|
||||
#define _CMS_CONNECTION_H_
|
||||
|
||||
#include <cms/Startable.h>
|
||||
#include <cms/Stoppable.h>
|
||||
#include <cms/Closeable.h>
|
||||
#include <cms/Session.h>
|
||||
|
||||
namespace cms
|
||||
{
|
||||
class ExceptionListener;
|
||||
|
||||
class Connection :
|
||||
public Startable,
|
||||
public Stoppable,
|
||||
public Closeable
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
virtual ~Connection(void) {}
|
||||
|
||||
/**
|
||||
* Creates a new Session to work for this Connection
|
||||
*/
|
||||
virtual Session* createSession(void) throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Creates a new Session to work for this Connection using the
|
||||
* specified acknowledgment mode
|
||||
* @param the Acknowledgement Mode to use.
|
||||
*/
|
||||
virtual Session* createSession(Session::AcknowledgeMode ackMode)
|
||||
throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Get the Client Id for this session
|
||||
*/
|
||||
virtual std::string getClientId(void) const = 0;
|
||||
|
||||
/**
|
||||
* Gets the registered Exception Listener for this connection
|
||||
* @return pointer to an exception listnener or NULL
|
||||
*/
|
||||
virtual ExceptionListener* getExceptionListener(void) const = 0;
|
||||
|
||||
/**
|
||||
* Sets the registed Exception Listener for this connection
|
||||
* @param pointer to and <code>ExceptionListener</code>
|
||||
*/
|
||||
virtual void setExceptionListener(ExceptionListener* listener) = 0;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /*_CMS_CONNECTION_H_*/
|
||||
|
|
|
@ -1,61 +1,61 @@
|
|||
/*
|
||||
* Copyright 2006 The Apache Software Foundation or its licensors, as
|
||||
* applicable.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
#ifndef _CMS_CONNECTIONFACTORY_H_
|
||||
#define _CMS_CONNECTIONFACTORY_H_
|
||||
|
||||
#include <cms/Connection.h>
|
||||
#include <cms/CMSException.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace cms
|
||||
{
|
||||
|
||||
class ConnectionFactory
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
virtual ~ConnectionFactory(void) {}
|
||||
|
||||
/**
|
||||
* Creates a connection with the default user identity. The
|
||||
* connection is created in stopped mode. No messages will be
|
||||
* delivered until the Connection.start method is explicitly
|
||||
* called.
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual Connection* createConnection(void) throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Creates a connection with the specified user identity. The
|
||||
* connection is created in stopped mode. No messages will be
|
||||
* delivered until the Connection.start method is explicitly called.
|
||||
* @throw CMSException.
|
||||
*/
|
||||
virtual Connection* createConnection(const std::string& username,
|
||||
const std::string& password,
|
||||
const std::string& clientId)
|
||||
throw ( CMSException ) = 0;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /*_CMS_CONNECTIONFACTORY_H_*/
|
||||
/*
|
||||
* Copyright 2006 The Apache Software Foundation or its licensors, as
|
||||
* applicable.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
#ifndef _CMS_CONNECTIONFACTORY_H_
|
||||
#define _CMS_CONNECTIONFACTORY_H_
|
||||
|
||||
#include <cms/Connection.h>
|
||||
#include <cms/CMSException.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace cms
|
||||
{
|
||||
|
||||
class ConnectionFactory
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
virtual ~ConnectionFactory(void) {}
|
||||
|
||||
/**
|
||||
* Creates a connection with the default user identity. The
|
||||
* connection is created in stopped mode. No messages will be
|
||||
* delivered until the Connection.start method is explicitly
|
||||
* called.
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual Connection* createConnection(void) throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Creates a connection with the specified user identity. The
|
||||
* connection is created in stopped mode. No messages will be
|
||||
* delivered until the Connection.start method is explicitly called.
|
||||
* @throw CMSException.
|
||||
*/
|
||||
virtual Connection* createConnection(const std::string& username,
|
||||
const std::string& password,
|
||||
const std::string& clientId)
|
||||
throw ( CMSException ) = 0;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /*_CMS_CONNECTIONFACTORY_H_*/
|
||||
|
|
|
@ -1,82 +1,82 @@
|
|||
/*
|
||||
* Copyright 2006 The Apache Software Foundation or its licensors, as
|
||||
* applicable.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
#ifndef _CMS_DESTINATION_H_
|
||||
#define _CMS_DESTINATION_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace cms{
|
||||
|
||||
/**
|
||||
* A Destination object encapsulates a provider-specific address.
|
||||
*/
|
||||
class Destination{
|
||||
public:
|
||||
|
||||
enum DestinationType
|
||||
{
|
||||
TOPIC,
|
||||
QUEUE,
|
||||
TEMPORARY_TOPIC,
|
||||
TEMPORARY_QUEUE
|
||||
};
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
virtual ~Destination(void){}
|
||||
|
||||
/**
|
||||
* Retrieve the Destination Type for this Destination
|
||||
* @return The Destination Type
|
||||
*/
|
||||
virtual DestinationType getDestinationType(void) const = 0;
|
||||
|
||||
/**
|
||||
* Converts the Destination Name into a String
|
||||
* @return string name
|
||||
*/
|
||||
virtual std::string toString(void) const = 0;
|
||||
|
||||
/**
|
||||
* Converts the Destination to a String value representing the
|
||||
* Provider specific name fot this destination, which is not
|
||||
* necessarily equal to the User Supplied name of the Destination
|
||||
* @return Provider specific Name
|
||||
*/
|
||||
virtual std::string toProviderString(void) const = 0;
|
||||
|
||||
/**
|
||||
* Creates a new instance of this destination type that is a
|
||||
* copy of this one, and returns it.
|
||||
* @returns cloned copy of this object
|
||||
*/
|
||||
virtual cms::Destination* clone(void) const = 0;
|
||||
|
||||
/*
|
||||
* Copyright 2006 The Apache Software Foundation or its licensors, as
|
||||
* applicable.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
#ifndef _CMS_DESTINATION_H_
|
||||
#define _CMS_DESTINATION_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace cms{
|
||||
|
||||
/**
|
||||
* A Destination object encapsulates a provider-specific address.
|
||||
*/
|
||||
class Destination{
|
||||
public:
|
||||
|
||||
enum DestinationType
|
||||
{
|
||||
TOPIC,
|
||||
QUEUE,
|
||||
TEMPORARY_TOPIC,
|
||||
TEMPORARY_QUEUE
|
||||
};
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
virtual ~Destination(void){}
|
||||
|
||||
/**
|
||||
* Retrieve the Destination Type for this Destination
|
||||
* @return The Destination Type
|
||||
*/
|
||||
virtual DestinationType getDestinationType(void) const = 0;
|
||||
|
||||
/**
|
||||
* Converts the Destination Name into a String
|
||||
* @return string name
|
||||
*/
|
||||
virtual std::string toString(void) const = 0;
|
||||
|
||||
/**
|
||||
* Converts the Destination to a String value representing the
|
||||
* Provider specific name fot this destination, which is not
|
||||
* necessarily equal to the User Supplied name of the Destination
|
||||
* @return Provider specific Name
|
||||
*/
|
||||
virtual std::string toProviderString(void) const = 0;
|
||||
|
||||
/**
|
||||
* Creates a new instance of this destination type that is a
|
||||
* copy of this one, and returns it.
|
||||
* @returns cloned copy of this object
|
||||
*/
|
||||
virtual cms::Destination* clone(void) const = 0;
|
||||
|
||||
/**
|
||||
* Copies the contents of the given Destinastion object to this one.
|
||||
* @param source The source Destination object.
|
||||
*/
|
||||
virtual void copy( const cms::Destination& source ) = 0;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
#endif /*_CMS_DESTINATION_H_*/
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
#endif /*_CMS_DESTINATION_H_*/
|
||||
|
|
|
@ -1,44 +1,44 @@
|
|||
/*
|
||||
* Copyright 2006 The Apache Software Foundation or its licensors, as
|
||||
* applicable.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
#ifndef _CMS_EXCEPTIONLISTENER_H_
|
||||
#define _CMS_EXCEPTIONLISTENER_H_
|
||||
|
||||
#include <cms/CMSException.h>
|
||||
|
||||
namespace cms{
|
||||
|
||||
class ExceptionListener
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
virtual ~ExceptionListener(void) {}
|
||||
|
||||
/**
|
||||
* Called when an exception occurs.
|
||||
* @param Exception Object that occurred.
|
||||
*/
|
||||
virtual void onException(const cms::CMSException& ex) = 0;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /*_CMS_EXCEPTIONLISTENER_H_*/
|
||||
/*
|
||||
* Copyright 2006 The Apache Software Foundation or its licensors, as
|
||||
* applicable.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
#ifndef _CMS_EXCEPTIONLISTENER_H_
|
||||
#define _CMS_EXCEPTIONLISTENER_H_
|
||||
|
||||
#include <cms/CMSException.h>
|
||||
|
||||
namespace cms{
|
||||
|
||||
class ExceptionListener
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
virtual ~ExceptionListener(void) {}
|
||||
|
||||
/**
|
||||
* Called when an exception occurs.
|
||||
* @param Exception Object that occurred.
|
||||
*/
|
||||
virtual void onException(const cms::CMSException& ex) = 0;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /*_CMS_EXCEPTIONLISTENER_H_*/
|
||||
|
|
|
@ -1,190 +1,190 @@
|
|||
/*
|
||||
* Copyright 2006 The Apache Software Foundation or its licensors, as
|
||||
* applicable.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
#ifndef _CMS_MESSAGE_H_
|
||||
#define _CMS_MESSAGE_H_
|
||||
|
||||
#include <activemq/util/Properties.h>
|
||||
|
||||
#include <cms/Destination.h>
|
||||
#include <cms/CMSException.h>
|
||||
|
||||
namespace cms{
|
||||
|
||||
/**
|
||||
* Root of all messages.
|
||||
*/
|
||||
class Message{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Enumeration value for Message Delivery Mode
|
||||
*/
|
||||
enum DeliveryMode
|
||||
{
|
||||
PERSISTANT,
|
||||
NONPERSISTANT
|
||||
};
|
||||
|
||||
public:
|
||||
|
||||
virtual ~Message(void){}
|
||||
|
||||
/**
|
||||
* Clonse this message exactly, returns a new instance that the
|
||||
* caller is required to delete.
|
||||
* @return new copy of this message
|
||||
*/
|
||||
virtual Message* clone(void) const = 0;
|
||||
|
||||
/**
|
||||
* Acknowledges all consumed messages of the session
|
||||
* of this consumed message.
|
||||
*/
|
||||
virtual void acknowledge(void) const throw( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Retrieves a reference to the properties object owned
|
||||
* by this message
|
||||
* @return A Properties Object reference
|
||||
*/
|
||||
virtual activemq::util::Properties& getProperties(void) = 0;
|
||||
virtual const activemq::util::Properties& getProperties(void) const = 0;
|
||||
|
||||
/**
|
||||
* Get the Correlation Id for this message
|
||||
* @return string representation of the correlation Id
|
||||
*/
|
||||
virtual const char* getCMSCorrelationId(void) const = 0;
|
||||
|
||||
/**
|
||||
* Sets the Correlation Id used by this message
|
||||
* @param String representing the correlation id.
|
||||
*/
|
||||
virtual void setCMSCorrelationId(const std::string& correlationId) = 0;
|
||||
|
||||
/**
|
||||
* Sets the DeliveryMode for this message
|
||||
* @return DeliveryMode enumerated value.
|
||||
*/
|
||||
virtual DeliveryMode getCMSDeliveryMode(void) const = 0;
|
||||
|
||||
/**
|
||||
* Sets the DeliveryMode for this message
|
||||
* @param DeliveryMode enumerated value.
|
||||
*/
|
||||
virtual void setCMSDeliveryMode(DeliveryMode mode) = 0;
|
||||
|
||||
/**
|
||||
* Gets the Destination for this Message, returns a
|
||||
* @return Destination object
|
||||
*/
|
||||
virtual const Destination& getCMSDestination(void) const = 0;
|
||||
|
||||
/**
|
||||
* Sets the Destination for this message
|
||||
* @param Destination Object
|
||||
*/
|
||||
virtual void setCMSDestination(const Destination& destination) = 0;
|
||||
|
||||
/**
|
||||
* Gets the Expiration Time for this Message
|
||||
* @return time value
|
||||
*/
|
||||
virtual long getCMSExpiration(void) const = 0;
|
||||
|
||||
/**
|
||||
* Sets the Expiration Time for this message
|
||||
* @param time value
|
||||
*/
|
||||
virtual void setCMSExpiration(long expireTime) = 0;
|
||||
|
||||
/**
|
||||
* Gets the CMS Message Id for this Message
|
||||
* @return time value
|
||||
*/
|
||||
virtual const char* getCMSMessageId(void) const = 0;
|
||||
|
||||
/**
|
||||
* Sets the CMS Message Id for this message
|
||||
* @param time value
|
||||
*/
|
||||
virtual void setCMSMessageId(const std::string& id) = 0;
|
||||
|
||||
/**
|
||||
* Gets the Priority Value for this Message
|
||||
* @return priority value
|
||||
*/
|
||||
virtual int getCMSPriority(void) const = 0;
|
||||
|
||||
/**
|
||||
* Sets the Priority Value for this message
|
||||
* @param priority value
|
||||
*/
|
||||
virtual void setCMSPriority(int priority) = 0;
|
||||
|
||||
/**
|
||||
* Gets the Redelivered Flag for this Message
|
||||
* @return redelivered value
|
||||
*/
|
||||
virtual bool getCMSRedelivered(void) const = 0;
|
||||
|
||||
/**
|
||||
* Sets the Redelivered Flag for this message
|
||||
* @param redelivered value
|
||||
*/
|
||||
virtual void setCMSRedelivered(bool redelivered) = 0;
|
||||
|
||||
/**
|
||||
* Gets the CMS Reply To Address for this Message
|
||||
* @return Reply To Value
|
||||
*/
|
||||
virtual const char* getCMSReplyTo(void) const = 0;
|
||||
|
||||
/**
|
||||
* Sets the CMS Reply To Address for this message
|
||||
* @param Reply To value
|
||||
*/
|
||||
virtual void setCMSReplyTo(const std::string& id) = 0;
|
||||
|
||||
/**
|
||||
* Gets the Time Stamp for this Message
|
||||
* @return time stamp value
|
||||
*/
|
||||
virtual long getCMSTimeStamp(void) const = 0;
|
||||
|
||||
/**
|
||||
* Sets the Time Stamp for this message
|
||||
* @param time stamp value
|
||||
*/
|
||||
virtual void setCMSTimeStamp(long timeStamp) = 0;
|
||||
|
||||
/**
|
||||
* Gets the CMS Message Type for this Message
|
||||
* @return type value
|
||||
*/
|
||||
virtual const char* getCMSMessageType(void) const = 0;
|
||||
|
||||
/**
|
||||
* Sets the CMS Message Type for this message
|
||||
* @param type value
|
||||
*/
|
||||
virtual void setCMSMessageType(const std::string& type) = 0;
|
||||
};
|
||||
}
|
||||
|
||||
#endif /*_CMS_MESSAGE_H_*/
|
||||
/*
|
||||
* Copyright 2006 The Apache Software Foundation or its licensors, as
|
||||
* applicable.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
#ifndef _CMS_MESSAGE_H_
|
||||
#define _CMS_MESSAGE_H_
|
||||
|
||||
#include <activemq/util/Properties.h>
|
||||
|
||||
#include <cms/Destination.h>
|
||||
#include <cms/CMSException.h>
|
||||
|
||||
namespace cms{
|
||||
|
||||
/**
|
||||
* Root of all messages.
|
||||
*/
|
||||
class Message{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Enumeration value for Message Delivery Mode
|
||||
*/
|
||||
enum DeliveryMode
|
||||
{
|
||||
PERSISTANT,
|
||||
NONPERSISTANT
|
||||
};
|
||||
|
||||
public:
|
||||
|
||||
virtual ~Message(void){}
|
||||
|
||||
/**
|
||||
* Clonse this message exactly, returns a new instance that the
|
||||
* caller is required to delete.
|
||||
* @return new copy of this message
|
||||
*/
|
||||
virtual Message* clone(void) const = 0;
|
||||
|
||||
/**
|
||||
* Acknowledges all consumed messages of the session
|
||||
* of this consumed message.
|
||||
*/
|
||||
virtual void acknowledge(void) const throw( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Retrieves a reference to the properties object owned
|
||||
* by this message
|
||||
* @return A Properties Object reference
|
||||
*/
|
||||
virtual activemq::util::Properties& getProperties(void) = 0;
|
||||
virtual const activemq::util::Properties& getProperties(void) const = 0;
|
||||
|
||||
/**
|
||||
* Get the Correlation Id for this message
|
||||
* @return string representation of the correlation Id
|
||||
*/
|
||||
virtual const char* getCMSCorrelationId(void) const = 0;
|
||||
|
||||
/**
|
||||
* Sets the Correlation Id used by this message
|
||||
* @param String representing the correlation id.
|
||||
*/
|
||||
virtual void setCMSCorrelationId(const std::string& correlationId) = 0;
|
||||
|
||||
/**
|
||||
* Sets the DeliveryMode for this message
|
||||
* @return DeliveryMode enumerated value.
|
||||
*/
|
||||
virtual DeliveryMode getCMSDeliveryMode(void) const = 0;
|
||||
|
||||
/**
|
||||
* Sets the DeliveryMode for this message
|
||||
* @param DeliveryMode enumerated value.
|
||||
*/
|
||||
virtual void setCMSDeliveryMode(DeliveryMode mode) = 0;
|
||||
|
||||
/**
|
||||
* Gets the Destination for this Message, returns a
|
||||
* @return Destination object
|
||||
*/
|
||||
virtual const Destination& getCMSDestination(void) const = 0;
|
||||
|
||||
/**
|
||||
* Sets the Destination for this message
|
||||
* @param Destination Object
|
||||
*/
|
||||
virtual void setCMSDestination(const Destination& destination) = 0;
|
||||
|
||||
/**
|
||||
* Gets the Expiration Time for this Message
|
||||
* @return time value
|
||||
*/
|
||||
virtual long getCMSExpiration(void) const = 0;
|
||||
|
||||
/**
|
||||
* Sets the Expiration Time for this message
|
||||
* @param time value
|
||||
*/
|
||||
virtual void setCMSExpiration(long expireTime) = 0;
|
||||
|
||||
/**
|
||||
* Gets the CMS Message Id for this Message
|
||||
* @return time value
|
||||
*/
|
||||
virtual const char* getCMSMessageId(void) const = 0;
|
||||
|
||||
/**
|
||||
* Sets the CMS Message Id for this message
|
||||
* @param time value
|
||||
*/
|
||||
virtual void setCMSMessageId(const std::string& id) = 0;
|
||||
|
||||
/**
|
||||
* Gets the Priority Value for this Message
|
||||
* @return priority value
|
||||
*/
|
||||
virtual int getCMSPriority(void) const = 0;
|
||||
|
||||
/**
|
||||
* Sets the Priority Value for this message
|
||||
* @param priority value
|
||||
*/
|
||||
virtual void setCMSPriority(int priority) = 0;
|
||||
|
||||
/**
|
||||
* Gets the Redelivered Flag for this Message
|
||||
* @return redelivered value
|
||||
*/
|
||||
virtual bool getCMSRedelivered(void) const = 0;
|
||||
|
||||
/**
|
||||
* Sets the Redelivered Flag for this message
|
||||
* @param redelivered value
|
||||
*/
|
||||
virtual void setCMSRedelivered(bool redelivered) = 0;
|
||||
|
||||
/**
|
||||
* Gets the CMS Reply To Address for this Message
|
||||
* @return Reply To Value
|
||||
*/
|
||||
virtual const char* getCMSReplyTo(void) const = 0;
|
||||
|
||||
/**
|
||||
* Sets the CMS Reply To Address for this message
|
||||
* @param Reply To value
|
||||
*/
|
||||
virtual void setCMSReplyTo(const std::string& id) = 0;
|
||||
|
||||
/**
|
||||
* Gets the Time Stamp for this Message
|
||||
* @return time stamp value
|
||||
*/
|
||||
virtual long getCMSTimeStamp(void) const = 0;
|
||||
|
||||
/**
|
||||
* Sets the Time Stamp for this message
|
||||
* @param time stamp value
|
||||
*/
|
||||
virtual void setCMSTimeStamp(long timeStamp) = 0;
|
||||
|
||||
/**
|
||||
* Gets the CMS Message Type for this Message
|
||||
* @return type value
|
||||
*/
|
||||
virtual const char* getCMSMessageType(void) const = 0;
|
||||
|
||||
/**
|
||||
* Sets the CMS Message Type for this message
|
||||
* @param type value
|
||||
*/
|
||||
virtual void setCMSMessageType(const std::string& type) = 0;
|
||||
};
|
||||
}
|
||||
|
||||
#endif /*_CMS_MESSAGE_H_*/
|
||||
|
|
|
@ -1,83 +1,83 @@
|
|||
/*
|
||||
* Copyright 2006 The Apache Software Foundation or its licensors, as
|
||||
* applicable.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
#ifndef _CMS_MESSAGECONSUMER_H_
|
||||
#define _CMS_MESSAGECONSUMER_H_
|
||||
|
||||
#include <cms/MessageListener.h>
|
||||
#include <cms/Message.h>
|
||||
|
||||
namespace cms
|
||||
{
|
||||
|
||||
class MessageConsumer
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
virtual ~MessageConsumer(void) {}
|
||||
|
||||
/**
|
||||
* Synchronously Receive a Message
|
||||
* @return new message
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual Message* receive(void) throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Synchronously Receive a Message, time out after defined interval.
|
||||
* Returns null if nothing read.
|
||||
* @return new message
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual Message* receive(int millisecs) throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Receive a Message, does not wait if there isn't a new message
|
||||
* to read, returns NULL if nothing read.
|
||||
* @return new message
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual Message* receiveNoWait(void) throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Sets the MessageListener that this class will send notifs on
|
||||
* @param MessageListener interface pointer
|
||||
*/
|
||||
virtual void setMessageListener(MessageListener* listener) = 0;
|
||||
|
||||
/**
|
||||
* Gets the MessageListener that this class will send notifs on
|
||||
* @param MessageListener interface pointer
|
||||
*/
|
||||
virtual MessageListener* getMessageListener(void) const = 0;
|
||||
|
||||
/**
|
||||
* Gets this message consumer's message selector expression.
|
||||
* @return This Consumer's selector expression or "".
|
||||
* @throws cms::CMSException
|
||||
*/
|
||||
virtual std::string getMessageSelector(void) const
|
||||
throw ( cms::CMSException ) = 0;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /*_CMS_MESSAGECONSUMER_H_*/
|
||||
/*
|
||||
* Copyright 2006 The Apache Software Foundation or its licensors, as
|
||||
* applicable.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
#ifndef _CMS_MESSAGECONSUMER_H_
|
||||
#define _CMS_MESSAGECONSUMER_H_
|
||||
|
||||
#include <cms/MessageListener.h>
|
||||
#include <cms/Message.h>
|
||||
|
||||
namespace cms
|
||||
{
|
||||
|
||||
class MessageConsumer
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
virtual ~MessageConsumer(void) {}
|
||||
|
||||
/**
|
||||
* Synchronously Receive a Message
|
||||
* @return new message
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual Message* receive(void) throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Synchronously Receive a Message, time out after defined interval.
|
||||
* Returns null if nothing read.
|
||||
* @return new message
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual Message* receive(int millisecs) throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Receive a Message, does not wait if there isn't a new message
|
||||
* to read, returns NULL if nothing read.
|
||||
* @return new message
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual Message* receiveNoWait(void) throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Sets the MessageListener that this class will send notifs on
|
||||
* @param MessageListener interface pointer
|
||||
*/
|
||||
virtual void setMessageListener(MessageListener* listener) = 0;
|
||||
|
||||
/**
|
||||
* Gets the MessageListener that this class will send notifs on
|
||||
* @param MessageListener interface pointer
|
||||
*/
|
||||
virtual MessageListener* getMessageListener(void) const = 0;
|
||||
|
||||
/**
|
||||
* Gets this message consumer's message selector expression.
|
||||
* @return This Consumer's selector expression or "".
|
||||
* @throws cms::CMSException
|
||||
*/
|
||||
virtual std::string getMessageSelector(void) const
|
||||
throw ( cms::CMSException ) = 0;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /*_CMS_MESSAGECONSUMER_H_*/
|
||||
|
|
|
@ -1,52 +1,52 @@
|
|||
/*
|
||||
* Copyright 2006 The Apache Software Foundation or its licensors, as
|
||||
* applicable.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
#ifndef _CMS_MESSAGELISTENER_H_
|
||||
#define _CMS_MESSAGELISTENER_H_
|
||||
|
||||
//#include <cms/Message.h>
|
||||
|
||||
namespace cms{
|
||||
|
||||
class Message;
|
||||
|
||||
class MessageListener{
|
||||
public:
|
||||
|
||||
virtual ~MessageListener(void){}
|
||||
|
||||
/**
|
||||
* Called asynchronously when a new message is received, the message
|
||||
* reference can be to any othe Message types. a dynamic cast is used
|
||||
* to find out what type of message this is. The lifetime of this
|
||||
* object is only garunteed to be for life of the onMessage function
|
||||
* after this returns the message may no longer exists. User should
|
||||
* copy the data or clone the message if they wish to keep something
|
||||
* around about this message.
|
||||
*
|
||||
* It is considered a programming error for this method to throw and
|
||||
* exception.
|
||||
*
|
||||
* @param Message object reference
|
||||
*/
|
||||
virtual void onMessage( const Message& message ) = 0;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /*_CMS_MESSAGELISTENER_H_*/
|
||||
/*
|
||||
* Copyright 2006 The Apache Software Foundation or its licensors, as
|
||||
* applicable.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
#ifndef _CMS_MESSAGELISTENER_H_
|
||||
#define _CMS_MESSAGELISTENER_H_
|
||||
|
||||
//#include <cms/Message.h>
|
||||
|
||||
namespace cms{
|
||||
|
||||
class Message;
|
||||
|
||||
class MessageListener{
|
||||
public:
|
||||
|
||||
virtual ~MessageListener(void){}
|
||||
|
||||
/**
|
||||
* Called asynchronously when a new message is received, the message
|
||||
* reference can be to any othe Message types. a dynamic cast is used
|
||||
* to find out what type of message this is. The lifetime of this
|
||||
* object is only garunteed to be for life of the onMessage function
|
||||
* after this returns the message may no longer exists. User should
|
||||
* copy the data or clone the message if they wish to keep something
|
||||
* around about this message.
|
||||
*
|
||||
* It is considered a programming error for this method to throw and
|
||||
* exception.
|
||||
*
|
||||
* @param Message object reference
|
||||
*/
|
||||
virtual void onMessage( const Message& message ) = 0;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /*_CMS_MESSAGELISTENER_H_*/
|
||||
|
|
|
@ -1,120 +1,120 @@
|
|||
/*
|
||||
* Copyright 2006 The Apache Software Foundation or its licensors, as
|
||||
* applicable.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
#ifndef _CMS_MESSAGEPRODUCER_H_
|
||||
#define _CMS_MESSAGEPRODUCER_H_
|
||||
|
||||
#include <cms/Message.h>
|
||||
#include <cms/Destination.h>
|
||||
#include <cms/CMSException.h>
|
||||
|
||||
namespace cms
|
||||
{
|
||||
/**
|
||||
* defines the <code>MEssageProducer</code> interface that is used
|
||||
* by all MessageProducer derivations. This class defines the JMS
|
||||
* spec'd interface for a MessageProducer.
|
||||
*/
|
||||
class MessageProducer
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
virtual ~MessageProducer(void) {}
|
||||
|
||||
/**
|
||||
* Sends the message to the default producer destination.
|
||||
* @param a Message Object Pointer
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual void send(Message& message) throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Sends the message to the designated destination.
|
||||
* @param a Message Object Pointer
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual void send(const Destination& destination,
|
||||
Message& message) throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Sets the delivery mode for this Producer
|
||||
* @param The DeliveryMode
|
||||
*/
|
||||
virtual void setDeliveryMode(Message::DeliveryMode mode) = 0;
|
||||
|
||||
/**
|
||||
* Gets the delivery mode for this Producer
|
||||
* @return The DeliveryMode
|
||||
*/
|
||||
virtual Message::DeliveryMode getDeliveryMode(void) const = 0;
|
||||
|
||||
/**
|
||||
* Sets if Message Ids are disbled for this Producer
|
||||
* @param boolean indicating enable / disable (true / false)
|
||||
*/
|
||||
virtual void setDisableMessageId(bool value) = 0;
|
||||
|
||||
/**
|
||||
* Sets if Message Ids are disbled for this Producer
|
||||
* @param boolean indicating enable / disable (true / false)
|
||||
*/
|
||||
virtual bool getDisableMessageId(void) const = 0;
|
||||
|
||||
/**
|
||||
* Sets if Message Time Stamps are disbled for this Producer
|
||||
* @param boolean indicating enable / disable (true / false)
|
||||
*/
|
||||
virtual void setDisableMessageTimeStamp(bool value) = 0;
|
||||
|
||||
/**
|
||||
* Sets if Message Time Stamps are disbled for this Producer
|
||||
* @param boolean indicating enable / disable (true / false)
|
||||
*/
|
||||
virtual bool getDisableMessageTimeStamp(void) const = 0;
|
||||
|
||||
/**
|
||||
* Sets the Priority that this Producers sends messages at
|
||||
* @param int value for Priority level
|
||||
*/
|
||||
virtual void setPriority(int priority) = 0;
|
||||
|
||||
/**
|
||||
* Gets the Priority level that this producer sends messages at
|
||||
* @return int based priority level
|
||||
*/
|
||||
virtual int getPriority(void) const = 0;
|
||||
|
||||
/**
|
||||
* Sets the Time to Live that this Producers sends messages with
|
||||
* @param int value for time to live
|
||||
*/
|
||||
virtual void setTimeToLive(int time) = 0;
|
||||
|
||||
/**
|
||||
* Gets the Time to Live that this producer sends messages with
|
||||
* @return int based Time to Live
|
||||
*/
|
||||
virtual int getTimeToLive(void) const = 0;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /*_CMS_MESSAGEPRODUCER_H_*/
|
||||
/*
|
||||
* Copyright 2006 The Apache Software Foundation or its licensors, as
|
||||
* applicable.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
#ifndef _CMS_MESSAGEPRODUCER_H_
|
||||
#define _CMS_MESSAGEPRODUCER_H_
|
||||
|
||||
#include <cms/Message.h>
|
||||
#include <cms/Destination.h>
|
||||
#include <cms/CMSException.h>
|
||||
|
||||
namespace cms
|
||||
{
|
||||
/**
|
||||
* defines the <code>MEssageProducer</code> interface that is used
|
||||
* by all MessageProducer derivations. This class defines the JMS
|
||||
* spec'd interface for a MessageProducer.
|
||||
*/
|
||||
class MessageProducer
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
virtual ~MessageProducer(void) {}
|
||||
|
||||
/**
|
||||
* Sends the message to the default producer destination.
|
||||
* @param a Message Object Pointer
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual void send(Message& message) throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Sends the message to the designated destination.
|
||||
* @param a Message Object Pointer
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual void send(const Destination& destination,
|
||||
Message& message) throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Sets the delivery mode for this Producer
|
||||
* @param The DeliveryMode
|
||||
*/
|
||||
virtual void setDeliveryMode(Message::DeliveryMode mode) = 0;
|
||||
|
||||
/**
|
||||
* Gets the delivery mode for this Producer
|
||||
* @return The DeliveryMode
|
||||
*/
|
||||
virtual Message::DeliveryMode getDeliveryMode(void) const = 0;
|
||||
|
||||
/**
|
||||
* Sets if Message Ids are disbled for this Producer
|
||||
* @param boolean indicating enable / disable (true / false)
|
||||
*/
|
||||
virtual void setDisableMessageId(bool value) = 0;
|
||||
|
||||
/**
|
||||
* Sets if Message Ids are disbled for this Producer
|
||||
* @param boolean indicating enable / disable (true / false)
|
||||
*/
|
||||
virtual bool getDisableMessageId(void) const = 0;
|
||||
|
||||
/**
|
||||
* Sets if Message Time Stamps are disbled for this Producer
|
||||
* @param boolean indicating enable / disable (true / false)
|
||||
*/
|
||||
virtual void setDisableMessageTimeStamp(bool value) = 0;
|
||||
|
||||
/**
|
||||
* Sets if Message Time Stamps are disbled for this Producer
|
||||
* @param boolean indicating enable / disable (true / false)
|
||||
*/
|
||||
virtual bool getDisableMessageTimeStamp(void) const = 0;
|
||||
|
||||
/**
|
||||
* Sets the Priority that this Producers sends messages at
|
||||
* @param int value for Priority level
|
||||
*/
|
||||
virtual void setPriority(int priority) = 0;
|
||||
|
||||
/**
|
||||
* Gets the Priority level that this producer sends messages at
|
||||
* @return int based priority level
|
||||
*/
|
||||
virtual int getPriority(void) const = 0;
|
||||
|
||||
/**
|
||||
* Sets the Time to Live that this Producers sends messages with
|
||||
* @param int value for time to live
|
||||
*/
|
||||
virtual void setTimeToLive(int time) = 0;
|
||||
|
||||
/**
|
||||
* Gets the Time to Live that this producer sends messages with
|
||||
* @return int based Time to Live
|
||||
*/
|
||||
virtual int getTimeToLive(void) const = 0;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /*_CMS_MESSAGEPRODUCER_H_*/
|
||||
|
|
|
@ -1,46 +1,46 @@
|
|||
/*
|
||||
* Copyright 2006 The Apache Software Foundation or its licensors, as
|
||||
* applicable.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
#ifndef _CMS_QUEUE_H_
|
||||
#define _CMS_QUEUE_H_
|
||||
|
||||
#include <cms/Destination.h>
|
||||
#include <cms/CMSException.h>
|
||||
|
||||
namespace cms{
|
||||
|
||||
/**
|
||||
* An interface encapsulating a provider-specific queue name.
|
||||
*/
|
||||
class Queue : public Destination{
|
||||
|
||||
public:
|
||||
|
||||
virtual ~Queue(void){}
|
||||
|
||||
/**
|
||||
* Gets the name of this queue.
|
||||
* @return The queue name.
|
||||
*/
|
||||
virtual std::string getQueueName() const
|
||||
throw( CMSException ) = 0;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /*_CMS_QUEUE_H_*/
|
||||
/*
|
||||
* Copyright 2006 The Apache Software Foundation or its licensors, as
|
||||
* applicable.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
#ifndef _CMS_QUEUE_H_
|
||||
#define _CMS_QUEUE_H_
|
||||
|
||||
#include <cms/Destination.h>
|
||||
#include <cms/CMSException.h>
|
||||
|
||||
namespace cms{
|
||||
|
||||
/**
|
||||
* An interface encapsulating a provider-specific queue name.
|
||||
*/
|
||||
class Queue : public Destination{
|
||||
|
||||
public:
|
||||
|
||||
virtual ~Queue(void){}
|
||||
|
||||
/**
|
||||
* Gets the name of this queue.
|
||||
* @return The queue name.
|
||||
*/
|
||||
virtual std::string getQueueName() const
|
||||
throw( CMSException ) = 0;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /*_CMS_QUEUE_H_*/
|
||||
|
|
|
@ -1,232 +1,232 @@
|
|||
/*
|
||||
* Copyright 2006 The Apache Software Foundation or its licensors, as
|
||||
* applicable.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
#ifndef _CMS_SESSION_H_
|
||||
#define _CMS_SESSION_H_
|
||||
|
||||
#include <cms/Closeable.h>
|
||||
#include <cms/Message.h>
|
||||
#include <cms/TextMessage.h>
|
||||
#include <cms/BytesMessage.h>
|
||||
#include <cms/MapMessage.h>
|
||||
#include <cms/MessageProducer.h>
|
||||
#include <cms/MessageConsumer.h>
|
||||
#include <cms/Topic.h>
|
||||
#include <cms/Queue.h>
|
||||
#include <cms/TemporaryTopic.h>
|
||||
#include <cms/TemporaryQueue.h>
|
||||
#include <cms/CMSException.h>
|
||||
|
||||
namespace cms
|
||||
{
|
||||
|
||||
class Session : public Closeable
|
||||
{
|
||||
public:
|
||||
|
||||
enum AcknowledgeMode
|
||||
{
|
||||
/**
|
||||
* With this acknowledgment mode, the session automatically
|
||||
* acknowledges a client's receipt of a message either when
|
||||
* the session has successfully returned from a call to receive
|
||||
* or when the message listener the session has called to
|
||||
* process the message successfully returns.
|
||||
*/
|
||||
AutoAcknowledge,
|
||||
|
||||
/**
|
||||
* With this acknowledgment mode, the session automatically
|
||||
* acknowledges a client's receipt of a message either when
|
||||
* the session has successfully returned from a call to receive
|
||||
* or when the message listener the session has called to
|
||||
* process the message successfully returns. Acknowlegements
|
||||
* may be delayed in this mode to increase performance at
|
||||
* the cost of the message being redelivered this client fails.
|
||||
*/
|
||||
DupsOkAcknowledge,
|
||||
|
||||
/**
|
||||
* With this acknowledgment mode, the client acknowledges a
|
||||
* consumed message by calling the message's acknowledge method.
|
||||
*/
|
||||
ClientAcknowledge,
|
||||
|
||||
/**
|
||||
* Messages will be consumed when the transaction commits.
|
||||
*/
|
||||
Transactional
|
||||
};
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
virtual ~Session(void) {}
|
||||
|
||||
/**
|
||||
* Commits all messages done in this transaction and releases any
|
||||
* locks currently held.
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual void commit(void) throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Rollsback all messages done in this transaction and releases any
|
||||
* locks currently held.
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual void rollback(void) throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Creates a MessageConsumer for the specified destination.
|
||||
* @param the Destination that this consumer receiving messages for.
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual MessageConsumer* createConsumer(
|
||||
Destination& destination )
|
||||
throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Creates a MessageConsumer for the specified destination, using a
|
||||
* message selector.
|
||||
* @param the Destination that this consumer receiving messages for.
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual MessageConsumer* createConsumer(
|
||||
Destination& destination,
|
||||
const std::string& selector )
|
||||
throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Creates a durable subscriber to the specified topic, using a
|
||||
* message selector
|
||||
* @param the topic to subscribe to
|
||||
* @param name used to identify the subscription
|
||||
* @param only messages matching the selector are received
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual MessageConsumer* createDurableConsumer(
|
||||
Topic& destination,
|
||||
const std::string& name,
|
||||
const std::string& selector,
|
||||
bool noLocal = false )
|
||||
throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Creates a MessageProducer to send messages to the specified
|
||||
* destination.
|
||||
* @param the Destination to publish on
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual MessageProducer* createProducer( Destination& destination )
|
||||
throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Creates a queue identity given a Queue name.
|
||||
* @param the name of the new Queue
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual Queue* createQueue( const std::string& queueName )
|
||||
throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Creates a topic identity given a Queue name.
|
||||
* @param the name of the new Topic
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual Topic* createTopic( const std::string& topicName )
|
||||
throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Creates a TemporaryQueue object.
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual TemporaryQueue* createTemporaryQueue(void)
|
||||
throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Creates a TemporaryTopic object.
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual TemporaryTopic* createTemporaryTopic(void)
|
||||
throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Creates a new Message
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual Message* createMessage(void)
|
||||
throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Creates a BytesMessage
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual BytesMessage* createBytesMessage(void)
|
||||
throw ( CMSException) = 0;
|
||||
|
||||
/**
|
||||
* Creates a BytesMessage and sets the paylod to the passed value
|
||||
* @param an array of bytes to set in the message
|
||||
* @param the size of the bytes array, or number of bytes to use
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual BytesMessage* createBytesMessage(
|
||||
const unsigned char* bytes,
|
||||
unsigned long bytesSize )
|
||||
throw ( CMSException) = 0;
|
||||
|
||||
/**
|
||||
* Creates a new TextMessage
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual TextMessage* createTextMessage(void)
|
||||
throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Creates a new TextMessage and set the text to the value given
|
||||
* @param the initial text for the message
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual TextMessage* createTextMessage( const std::string& text )
|
||||
throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Creates a new MapMessage
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual MapMessage* createMapMessage(void)
|
||||
throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Returns the acknowledgement mode of the session.
|
||||
* @return the Sessions Acknowledge Mode
|
||||
*/
|
||||
virtual AcknowledgeMode getAcknowledgeMode(void) const = 0;
|
||||
|
||||
/**
|
||||
* Gets if the Sessions is a Transacted Session
|
||||
* @return transacted true - false.
|
||||
*/
|
||||
virtual bool isTransacted(void) const = 0;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /*_CMS_SESSION_H_*/
|
||||
/*
|
||||
* Copyright 2006 The Apache Software Foundation or its licensors, as
|
||||
* applicable.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
#ifndef _CMS_SESSION_H_
|
||||
#define _CMS_SESSION_H_
|
||||
|
||||
#include <cms/Closeable.h>
|
||||
#include <cms/Message.h>
|
||||
#include <cms/TextMessage.h>
|
||||
#include <cms/BytesMessage.h>
|
||||
#include <cms/MapMessage.h>
|
||||
#include <cms/MessageProducer.h>
|
||||
#include <cms/MessageConsumer.h>
|
||||
#include <cms/Topic.h>
|
||||
#include <cms/Queue.h>
|
||||
#include <cms/TemporaryTopic.h>
|
||||
#include <cms/TemporaryQueue.h>
|
||||
#include <cms/CMSException.h>
|
||||
|
||||
namespace cms
|
||||
{
|
||||
|
||||
class Session : public Closeable
|
||||
{
|
||||
public:
|
||||
|
||||
enum AcknowledgeMode
|
||||
{
|
||||
/**
|
||||
* With this acknowledgment mode, the session automatically
|
||||
* acknowledges a client's receipt of a message either when
|
||||
* the session has successfully returned from a call to receive
|
||||
* or when the message listener the session has called to
|
||||
* process the message successfully returns.
|
||||
*/
|
||||
AutoAcknowledge,
|
||||
|
||||
/**
|
||||
* With this acknowledgment mode, the session automatically
|
||||
* acknowledges a client's receipt of a message either when
|
||||
* the session has successfully returned from a call to receive
|
||||
* or when the message listener the session has called to
|
||||
* process the message successfully returns. Acknowlegements
|
||||
* may be delayed in this mode to increase performance at
|
||||
* the cost of the message being redelivered this client fails.
|
||||
*/
|
||||
DupsOkAcknowledge,
|
||||
|
||||
/**
|
||||
* With this acknowledgment mode, the client acknowledges a
|
||||
* consumed message by calling the message's acknowledge method.
|
||||
*/
|
||||
ClientAcknowledge,
|
||||
|
||||
/**
|
||||
* Messages will be consumed when the transaction commits.
|
||||
*/
|
||||
Transactional
|
||||
};
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
virtual ~Session(void) {}
|
||||
|
||||
/**
|
||||
* Commits all messages done in this transaction and releases any
|
||||
* locks currently held.
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual void commit(void) throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Rollsback all messages done in this transaction and releases any
|
||||
* locks currently held.
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual void rollback(void) throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Creates a MessageConsumer for the specified destination.
|
||||
* @param the Destination that this consumer receiving messages for.
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual MessageConsumer* createConsumer(
|
||||
Destination& destination )
|
||||
throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Creates a MessageConsumer for the specified destination, using a
|
||||
* message selector.
|
||||
* @param the Destination that this consumer receiving messages for.
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual MessageConsumer* createConsumer(
|
||||
Destination& destination,
|
||||
const std::string& selector )
|
||||
throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Creates a durable subscriber to the specified topic, using a
|
||||
* message selector
|
||||
* @param the topic to subscribe to
|
||||
* @param name used to identify the subscription
|
||||
* @param only messages matching the selector are received
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual MessageConsumer* createDurableConsumer(
|
||||
Topic& destination,
|
||||
const std::string& name,
|
||||
const std::string& selector,
|
||||
bool noLocal = false )
|
||||
throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Creates a MessageProducer to send messages to the specified
|
||||
* destination.
|
||||
* @param the Destination to publish on
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual MessageProducer* createProducer( Destination& destination )
|
||||
throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Creates a queue identity given a Queue name.
|
||||
* @param the name of the new Queue
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual Queue* createQueue( const std::string& queueName )
|
||||
throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Creates a topic identity given a Queue name.
|
||||
* @param the name of the new Topic
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual Topic* createTopic( const std::string& topicName )
|
||||
throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Creates a TemporaryQueue object.
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual TemporaryQueue* createTemporaryQueue(void)
|
||||
throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Creates a TemporaryTopic object.
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual TemporaryTopic* createTemporaryTopic(void)
|
||||
throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Creates a new Message
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual Message* createMessage(void)
|
||||
throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Creates a BytesMessage
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual BytesMessage* createBytesMessage(void)
|
||||
throw ( CMSException) = 0;
|
||||
|
||||
/**
|
||||
* Creates a BytesMessage and sets the paylod to the passed value
|
||||
* @param an array of bytes to set in the message
|
||||
* @param the size of the bytes array, or number of bytes to use
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual BytesMessage* createBytesMessage(
|
||||
const unsigned char* bytes,
|
||||
unsigned long bytesSize )
|
||||
throw ( CMSException) = 0;
|
||||
|
||||
/**
|
||||
* Creates a new TextMessage
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual TextMessage* createTextMessage(void)
|
||||
throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Creates a new TextMessage and set the text to the value given
|
||||
* @param the initial text for the message
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual TextMessage* createTextMessage( const std::string& text )
|
||||
throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Creates a new MapMessage
|
||||
* @throws CMSException
|
||||
*/
|
||||
virtual MapMessage* createMapMessage(void)
|
||||
throw ( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Returns the acknowledgement mode of the session.
|
||||
* @return the Sessions Acknowledge Mode
|
||||
*/
|
||||
virtual AcknowledgeMode getAcknowledgeMode(void) const = 0;
|
||||
|
||||
/**
|
||||
* Gets if the Sessions is a Transacted Session
|
||||
* @return transacted true - false.
|
||||
*/
|
||||
virtual bool isTransacted(void) const = 0;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /*_CMS_SESSION_H_*/
|
||||
|
|
|
@ -1,46 +1,46 @@
|
|||
/*
|
||||
* Copyright 2006 The Apache Software Foundation or its licensors, as
|
||||
* applicable.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
#ifndef _CMS_TEMPORARYTOPIC_H_
|
||||
#define _CMS_TEMPORARYTOPIC_H_
|
||||
|
||||
#include <cms/Destination.h>
|
||||
#include <cms/CMSException.h>
|
||||
|
||||
namespace cms{
|
||||
|
||||
/**
|
||||
* An interface encapsulating a provider-specific topic name.
|
||||
*/
|
||||
class TemporaryTopic : public Destination
|
||||
{
|
||||
public:
|
||||
|
||||
virtual ~TemporaryTopic(void) {}
|
||||
|
||||
/**
|
||||
* Gets the name of this topic.
|
||||
* @return The topic name.
|
||||
*/
|
||||
virtual const char* getTopicName(void)
|
||||
const throw( CMSException ) = 0;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /*_CMS_TEMPORARYTOPIC_H_*/
|
||||
/*
|
||||
* Copyright 2006 The Apache Software Foundation or its licensors, as
|
||||
* applicable.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
#ifndef _CMS_TEMPORARYTOPIC_H_
|
||||
#define _CMS_TEMPORARYTOPIC_H_
|
||||
|
||||
#include <cms/Destination.h>
|
||||
#include <cms/CMSException.h>
|
||||
|
||||
namespace cms{
|
||||
|
||||
/**
|
||||
* An interface encapsulating a provider-specific topic name.
|
||||
*/
|
||||
class TemporaryTopic : public Destination
|
||||
{
|
||||
public:
|
||||
|
||||
virtual ~TemporaryTopic(void) {}
|
||||
|
||||
/**
|
||||
* Gets the name of this topic.
|
||||
* @return The topic name.
|
||||
*/
|
||||
virtual const char* getTopicName(void)
|
||||
const throw( CMSException ) = 0;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /*_CMS_TEMPORARYTOPIC_H_*/
|
||||
|
|
|
@ -1,49 +1,49 @@
|
|||
/*
|
||||
* Copyright 2006 The Apache Software Foundation or its licensors, as
|
||||
* applicable.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
#ifndef _CMS_TEXTMESSAGE_H_
|
||||
#define _CMS_TEXTMESSAGE_H_
|
||||
|
||||
#include <cms/Message.h>
|
||||
#include <cms/CMSException.h>
|
||||
|
||||
namespace cms{
|
||||
|
||||
/**
|
||||
* Interface for a text message.
|
||||
*/
|
||||
class TextMessage : public Message{
|
||||
|
||||
public:
|
||||
|
||||
virtual ~TextMessage(){}
|
||||
|
||||
/**
|
||||
* Gets the message character buffer.
|
||||
* @return The message character buffer.
|
||||
*/
|
||||
virtual const char* getText() const throw( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Sets the message contents.
|
||||
* @param msg The message buffer.
|
||||
*/
|
||||
virtual void setText( const char* msg ) throw( CMSException ) = 0;
|
||||
};
|
||||
}
|
||||
|
||||
#endif /*_CMS_TEXTMESSAGE_H_*/
|
||||
/*
|
||||
* Copyright 2006 The Apache Software Foundation or its licensors, as
|
||||
* applicable.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
#ifndef _CMS_TEXTMESSAGE_H_
|
||||
#define _CMS_TEXTMESSAGE_H_
|
||||
|
||||
#include <cms/Message.h>
|
||||
#include <cms/CMSException.h>
|
||||
|
||||
namespace cms{
|
||||
|
||||
/**
|
||||
* Interface for a text message.
|
||||
*/
|
||||
class TextMessage : public Message{
|
||||
|
||||
public:
|
||||
|
||||
virtual ~TextMessage(){}
|
||||
|
||||
/**
|
||||
* Gets the message character buffer.
|
||||
* @return The message character buffer.
|
||||
*/
|
||||
virtual const char* getText() const throw( CMSException ) = 0;
|
||||
|
||||
/**
|
||||
* Sets the message contents.
|
||||
* @param msg The message buffer.
|
||||
*/
|
||||
virtual void setText( const char* msg ) throw( CMSException ) = 0;
|
||||
};
|
||||
}
|
||||
|
||||
#endif /*_CMS_TEXTMESSAGE_H_*/
|
||||
|
|
|
@ -1,46 +1,46 @@
|
|||
/*
|
||||
* Copyright 2006 The Apache Software Foundation or its licensors, as
|
||||
* applicable.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
#ifndef _CMS_TOPIC_
|
||||
#define _CMS_TOPIC_
|
||||
|
||||
#include <cms/Destination.h>
|
||||
#include <cms/CMSException.h>
|
||||
|
||||
namespace cms{
|
||||
|
||||
/**
|
||||
* An interface encapsulating a provider-specific topic name.
|
||||
*/
|
||||
class Topic : public Destination{
|
||||
|
||||
public:
|
||||
|
||||
virtual ~Topic(void) {}
|
||||
|
||||
/**
|
||||
* Gets the name of this topic.
|
||||
* @return The topic name.
|
||||
*/
|
||||
virtual std::string getTopicName(void)
|
||||
const throw( CMSException ) = 0;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /*_CMS_TOPIC_*/
|
||||
/*
|
||||
* Copyright 2006 The Apache Software Foundation or its licensors, as
|
||||
* applicable.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
#ifndef _CMS_TOPIC_
|
||||
#define _CMS_TOPIC_
|
||||
|
||||
#include <cms/Destination.h>
|
||||
#include <cms/CMSException.h>
|
||||
|
||||
namespace cms{
|
||||
|
||||
/**
|
||||
* An interface encapsulating a provider-specific topic name.
|
||||
*/
|
||||
class Topic : public Destination{
|
||||
|
||||
public:
|
||||
|
||||
virtual ~Topic(void) {}
|
||||
|
||||
/**
|
||||
* Gets the name of this topic.
|
||||
* @return The topic name.
|
||||
*/
|
||||
virtual std::string getTopicName(void)
|
||||
const throw( CMSException ) = 0;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /*_CMS_TOPIC_*/
|
||||
|
|
|
@ -1,51 +1,51 @@
|
|||
#ifndef _INTEGRATION_COMMON_ABSTRACTTESTER_H_
|
||||
#define _INTEGRATION_COMMON_ABSTRACTTESTER_H_
|
||||
|
||||
#include "Tester.h"
|
||||
|
||||
#include <activemq/concurrent/Mutex.h>
|
||||
|
||||
#include <cms/ConnectionFactory.h>
|
||||
#include <cms/Connection.h>
|
||||
#include <cms/Session.h>
|
||||
#include <cms/MessageProducer.h>
|
||||
|
||||
namespace integration{
|
||||
namespace common{
|
||||
|
||||
class AbstractTester : public Tester
|
||||
{
|
||||
public:
|
||||
|
||||
AbstractTester( cms::Session::AcknowledgeMode ackMode =
|
||||
cms::Session::AutoAcknowledge );
|
||||
virtual ~AbstractTester();
|
||||
|
||||
virtual void doSleep(void);
|
||||
|
||||
virtual unsigned int produceTextMessages(
|
||||
cms::MessageProducer& producer,
|
||||
unsigned int count );
|
||||
virtual unsigned int produceBytesMessages(
|
||||
cms::MessageProducer& producer,
|
||||
unsigned int count );
|
||||
|
||||
virtual void waitForMessages( unsigned int count );
|
||||
|
||||
virtual void onException( const cms::CMSException& error );
|
||||
virtual void onMessage( const cms::Message& message );
|
||||
|
||||
public:
|
||||
|
||||
cms::ConnectionFactory* connectionFactory;
|
||||
cms::Connection* connection;
|
||||
cms::Session* session;
|
||||
|
||||
unsigned int numReceived;
|
||||
activemq::concurrent::Mutex mutex;
|
||||
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif /*_INTEGRATION_COMMON_ABSTRACTTESTER_H_*/
|
||||
#ifndef _INTEGRATION_COMMON_ABSTRACTTESTER_H_
|
||||
#define _INTEGRATION_COMMON_ABSTRACTTESTER_H_
|
||||
|
||||
#include "Tester.h"
|
||||
|
||||
#include <activemq/concurrent/Mutex.h>
|
||||
|
||||
#include <cms/ConnectionFactory.h>
|
||||
#include <cms/Connection.h>
|
||||
#include <cms/Session.h>
|
||||
#include <cms/MessageProducer.h>
|
||||
|
||||
namespace integration{
|
||||
namespace common{
|
||||
|
||||
class AbstractTester : public Tester
|
||||
{
|
||||
public:
|
||||
|
||||
AbstractTester( cms::Session::AcknowledgeMode ackMode =
|
||||
cms::Session::AutoAcknowledge );
|
||||
virtual ~AbstractTester();
|
||||
|
||||
virtual void doSleep(void);
|
||||
|
||||
virtual unsigned int produceTextMessages(
|
||||
cms::MessageProducer& producer,
|
||||
unsigned int count );
|
||||
virtual unsigned int produceBytesMessages(
|
||||
cms::MessageProducer& producer,
|
||||
unsigned int count );
|
||||
|
||||
virtual void waitForMessages( unsigned int count );
|
||||
|
||||
virtual void onException( const cms::CMSException& error );
|
||||
virtual void onMessage( const cms::Message& message );
|
||||
|
||||
public:
|
||||
|
||||
cms::ConnectionFactory* connectionFactory;
|
||||
cms::Connection* connection;
|
||||
cms::Session* session;
|
||||
|
||||
unsigned int numReceived;
|
||||
activemq::concurrent::Mutex mutex;
|
||||
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif /*_INTEGRATION_COMMON_ABSTRACTTESTER_H_*/
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
#ifndef _INTEGRATION_COMMON_INTEGRATIONCOMMON_H_
|
||||
#define _INTEGRATION_COMMON_INTEGRATIONCOMMON_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace integration{
|
||||
namespace common{
|
||||
|
||||
class IntegrationCommon
|
||||
{
|
||||
public:
|
||||
|
||||
virtual ~IntegrationCommon();
|
||||
|
||||
static const std::string defaultURL;
|
||||
static const int defaultDelay;
|
||||
static const unsigned int defaultMsgCount;
|
||||
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif /*_INTEGRATION_COMMON_INTEGRATIONCOMMON_H_*/
|
||||
#ifndef _INTEGRATION_COMMON_INTEGRATIONCOMMON_H_
|
||||
#define _INTEGRATION_COMMON_INTEGRATIONCOMMON_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace integration{
|
||||
namespace common{
|
||||
|
||||
class IntegrationCommon
|
||||
{
|
||||
public:
|
||||
|
||||
virtual ~IntegrationCommon();
|
||||
|
||||
static const std::string defaultURL;
|
||||
static const int defaultDelay;
|
||||
static const unsigned int defaultMsgCount;
|
||||
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif /*_INTEGRATION_COMMON_INTEGRATIONCOMMON_H_*/
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
#ifndef _INTEGRATION_COMMON_TESTER_H_
|
||||
#define _INTEGRATION_COMMON_TESTER_H_
|
||||
|
||||
#include <cms/MessageListener.h>
|
||||
#include <cms/ExceptionListener.h>
|
||||
|
||||
|
||||
namespace integration{
|
||||
namespace common{
|
||||
|
||||
class Tester : public cms::ExceptionListener,
|
||||
public cms::MessageListener
|
||||
{
|
||||
public:
|
||||
|
||||
virtual ~Tester() {}
|
||||
|
||||
virtual void test(void) = 0;
|
||||
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif /*_INTEGRATION_COMMON_TESTER_H_*/
|
||||
#ifndef _INTEGRATION_COMMON_TESTER_H_
|
||||
#define _INTEGRATION_COMMON_TESTER_H_
|
||||
|
||||
#include <cms/MessageListener.h>
|
||||
#include <cms/ExceptionListener.h>
|
||||
|
||||
|
||||
namespace integration{
|
||||
namespace common{
|
||||
|
||||
class Tester : public cms::ExceptionListener,
|
||||
public cms::MessageListener
|
||||
{
|
||||
public:
|
||||
|
||||
virtual ~Tester() {}
|
||||
|
||||
virtual void test(void) = 0;
|
||||
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif /*_INTEGRATION_COMMON_TESTER_H_*/
|
||||
|
|
|
@ -1,32 +1,32 @@
|
|||
#ifndef _INTEGRATION_TRANSACTIONAL_DURABLETESTER_H_
|
||||
#define _INTEGRATION_TRANSACTIONAL_DURABLETESTER_H_
|
||||
|
||||
#include <integration/common/AbstractTester.h>
|
||||
|
||||
#include <cppunit/TestFixture.h>
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
|
||||
namespace integration{
|
||||
namespace durable{
|
||||
|
||||
class DurableTester : public CppUnit::TestFixture,
|
||||
public common::AbstractTester
|
||||
{
|
||||
CPPUNIT_TEST_SUITE( DurableTester );
|
||||
CPPUNIT_TEST( test );
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
|
||||
DurableTester();
|
||||
virtual ~DurableTester();
|
||||
|
||||
virtual void test(void);
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif /*_INTEGRATION_TRANSACTIONAL_DURABLETESTER_H_*/
|
||||
#ifndef _INTEGRATION_TRANSACTIONAL_DURABLETESTER_H_
|
||||
#define _INTEGRATION_TRANSACTIONAL_DURABLETESTER_H_
|
||||
|
||||
#include <integration/common/AbstractTester.h>
|
||||
|
||||
#include <cppunit/TestFixture.h>
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
|
||||
namespace integration{
|
||||
namespace durable{
|
||||
|
||||
class DurableTester : public CppUnit::TestFixture,
|
||||
public common::AbstractTester
|
||||
{
|
||||
CPPUNIT_TEST_SUITE( DurableTester );
|
||||
CPPUNIT_TEST( test );
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
|
||||
DurableTester();
|
||||
virtual ~DurableTester();
|
||||
|
||||
virtual void test(void);
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif /*_INTEGRATION_TRANSACTIONAL_DURABLETESTER_H_*/
|
||||
|
|
|
@ -1,30 +1,30 @@
|
|||
#ifndef _INTEGRATION_SIMPLE_SIMPLETESTER_H_
|
||||
#define _INTEGRATION_SIMPLE_SIMPLETESTER_H_
|
||||
|
||||
#include <cppunit/TestFixture.h>
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
|
||||
#include <integration/common/AbstractTester.h>
|
||||
|
||||
namespace integration{
|
||||
namespace simple{
|
||||
|
||||
class SimpleTester : public CppUnit::TestFixture,
|
||||
public common::AbstractTester
|
||||
{
|
||||
CPPUNIT_TEST_SUITE( SimpleTester );
|
||||
CPPUNIT_TEST( test );
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
|
||||
SimpleTester();
|
||||
virtual ~SimpleTester();
|
||||
|
||||
virtual void test(void);
|
||||
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif /*_INTEGRATION_SIMPLE_SIMPLETESTER_H_*/
|
||||
#ifndef _INTEGRATION_SIMPLE_SIMPLETESTER_H_
|
||||
#define _INTEGRATION_SIMPLE_SIMPLETESTER_H_
|
||||
|
||||
#include <cppunit/TestFixture.h>
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
|
||||
#include <integration/common/AbstractTester.h>
|
||||
|
||||
namespace integration{
|
||||
namespace simple{
|
||||
|
||||
class SimpleTester : public CppUnit::TestFixture,
|
||||
public common::AbstractTester
|
||||
{
|
||||
CPPUNIT_TEST_SUITE( SimpleTester );
|
||||
CPPUNIT_TEST( test );
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
|
||||
SimpleTester();
|
||||
virtual ~SimpleTester();
|
||||
|
||||
virtual void test(void);
|
||||
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif /*_INTEGRATION_SIMPLE_SIMPLETESTER_H_*/
|
||||
|
|
|
@ -1,32 +1,32 @@
|
|||
#ifndef _INTEGRATION_TRANSACTIONAL_TRANSACTIONTESTER_H_
|
||||
#define _INTEGRATION_TRANSACTIONAL_TRANSACTIONTESTER_H_
|
||||
|
||||
#include <integration/common/AbstractTester.h>
|
||||
|
||||
#include <cppunit/TestFixture.h>
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
|
||||
namespace integration{
|
||||
namespace transactional{
|
||||
|
||||
class TransactionTester : public CppUnit::TestFixture,
|
||||
public common::AbstractTester
|
||||
{
|
||||
CPPUNIT_TEST_SUITE( TransactionTester );
|
||||
CPPUNIT_TEST( test );
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
|
||||
TransactionTester();
|
||||
virtual ~TransactionTester();
|
||||
|
||||
virtual void test(void);
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif /*_INTEGRATION_TRANSACTIONAL_TRANSACTIONTESTER_H_*/
|
||||
#ifndef _INTEGRATION_TRANSACTIONAL_TRANSACTIONTESTER_H_
|
||||
#define _INTEGRATION_TRANSACTIONAL_TRANSACTIONTESTER_H_
|
||||
|
||||
#include <integration/common/AbstractTester.h>
|
||||
|
||||
#include <cppunit/TestFixture.h>
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
|
||||
namespace integration{
|
||||
namespace transactional{
|
||||
|
||||
class TransactionTester : public CppUnit::TestFixture,
|
||||
public common::AbstractTester
|
||||
{
|
||||
CPPUNIT_TEST_SUITE( TransactionTester );
|
||||
CPPUNIT_TEST( test );
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
|
||||
TransactionTester();
|
||||
virtual ~TransactionTester();
|
||||
|
||||
virtual void test(void);
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif /*_INTEGRATION_TRANSACTIONAL_TRANSACTIONTESTER_H_*/
|
||||
|
|
Loading…
Reference in New Issue