activemq::connector::Connector Class Reference

#include <Connector.h>

Inheritance diagram for activemq::connector::Connector:

activemq::connector::stomp::StompConnector List of all members.

Public Types

enum  AckType { DeliveredAck = 0, PoisonAck = 1, ConsumedAck = 2 }

Public Member Functions

virtual ~Connector (void)
virtual std::string getClientId (void) const =0
virtual std::string getUsername (void) const =0
virtual std::string getPassword (void) const =0
virtual transport::TransportgetTransport (void) const =0 throw (exceptions::InvalidStateException )
virtual SessionInfocreateSession (cms::Session::AcknowledgeMode ackMode)=0 throw ( ConnectorException )
virtual ConsumerInfocreateConsumer (const cms::Destination *destination, SessionInfo *session, const std::string &selector="")=0 throw ( ConnectorException )
virtual ConsumerInfocreateDurableConsumer (const cms::Topic *topic, SessionInfo *session, const std::string &name, const std::string &selector="", bool noLocal=false)=0 throw ( ConnectorException )
virtual ProducerInfocreateProducer (const cms::Destination *destination, SessionInfo *session)=0 throw ( ConnectorException )
virtual cms::Topic * createTopic (const std::string &name, SessionInfo *session)=0 throw ( ConnectorException )
virtual cms::Queue * createQueue (const std::string &name, SessionInfo *session)=0 throw ( ConnectorException )
virtual cms::TemporaryTopic * createTemporaryTopic (SessionInfo *session)=0 throw ( ConnectorException )
virtual cms::TemporaryQueue * createTemporaryQueue (SessionInfo *session)=0 throw ( ConnectorException )
virtual void send (cms::Message *message, ProducerInfo *producerInfo)=0 throw ( ConnectorException )
virtual void send (std::list< cms::Message * > &messages, ProducerInfo *producerInfo)=0 throw ( ConnectorException )
virtual void acknowledge (const SessionInfo *session, const cms::Message *message, AckType ackType=ConsumedAck)=0 throw ( ConnectorException )
virtual TransactionInfostartTransaction (SessionInfo *session)=0 throw ( ConnectorException )
virtual void commit (TransactionInfo *transaction, SessionInfo *session)=0 throw ( ConnectorException )
virtual void rollback (TransactionInfo *transaction, SessionInfo *session)=0 throw ( ConnectorException )
virtual cms::Message * createMessage (SessionInfo *session, TransactionInfo *transaction)=0 throw ( ConnectorException )
virtual cms::BytesMessage * createBytesMessage (SessionInfo *session, TransactionInfo *transaction)=0 throw ( ConnectorException )
virtual cms::TextMessage * createTextMessage (SessionInfo *session, TransactionInfo *transaction)=0 throw ( ConnectorException )
virtual cms::MapMessage * createMapMessage (SessionInfo *session, TransactionInfo *transaction)=0 throw ( ConnectorException )
virtual void unsubscribe (const std::string &name)=0 throw ( ConnectorException )
virtual void destroyResource (ConnectorResource *resource)=0 throw ( ConnectorException )
virtual void setConsumerMessageListener (ConsumerMessageListener *listener)=0
virtual void setExceptionListener (cms::ExceptionListener *listener)=0

Member Enumeration Documentation

enum activemq::connector::Connector::AckType
 

Enumerator:
DeliveredAck 
PoisonAck 
ConsumedAck 


Constructor & Destructor Documentation

virtual activemq::connector::Connector::~Connector void   )  [inline, virtual]
 


Member Function Documentation

virtual void activemq::connector::Connector::acknowledge const SessionInfo session,
const cms::Message *  message,
AckType  ackType = ConsumedAck
throw ( ConnectorException ) [pure virtual]
 

Acknowledges a Message

Parameters:
An ActiveMQMessage to Ack.
Exceptions:
ConnectorException 

virtual void activemq::connector::Connector::commit TransactionInfo transaction,
SessionInfo session
throw ( ConnectorException ) [pure virtual]
 

Commits a Transaction.

Parameters:
The Transaction information
Session Information
Exceptions:
ConnectorException 

Implemented in activemq::connector::stomp::StompConnector.

virtual cms::BytesMessage* activemq::connector::Connector::createBytesMessage SessionInfo session,
TransactionInfo transaction
throw ( ConnectorException ) [pure virtual]
 

Creates a new BytesMessage.

Parameters:
Session Information
Transaction Info for this Message
Exceptions:
ConnectorException 

Implemented in activemq::connector::stomp::StompConnector.

virtual ConsumerInfo* activemq::connector::Connector::createConsumer const cms::Destination *  destination,
SessionInfo session,
const std::string &  selector = ""
throw ( ConnectorException ) [pure virtual]
 

Create a Consumer for the given Session

Parameters:
Destination to Subscribe to.
Session Information.
Returns:
Consumer Information
Exceptions:
ConnectorException 

Implemented in activemq::connector::stomp::StompConnector.

virtual ConsumerInfo* activemq::connector::Connector::createDurableConsumer const cms::Topic *  topic,
SessionInfo session,
const std::string &  name,
const std::string &  selector = "",
bool  noLocal = false
throw ( ConnectorException ) [pure virtual]
 

Create a Durable Consumer for the given Session

Parameters:
Topic to Subscribe to.
Session Information.
name of the Durable Topic
Selector 
if set, inhibits the delivery of messages published by its own connection
Returns:
Consumer Information
Exceptions:
ConnectorException 

Implemented in activemq::connector::stomp::StompConnector.

virtual cms::MapMessage* activemq::connector::Connector::createMapMessage SessionInfo session,
TransactionInfo transaction
throw ( ConnectorException ) [pure virtual]
 

Creates a new MapMessage.

Parameters:
Session Information
Transaction Info for this Message
Exceptions:
ConnectorException 

Implemented in activemq::connector::stomp::StompConnector.

virtual cms::Message* activemq::connector::Connector::createMessage SessionInfo session,
TransactionInfo transaction
throw ( ConnectorException ) [pure virtual]
 

Creates a new Message.

Parameters:
Session Information
Transaction Info for this Message
Exceptions:
ConnectorException 

Implemented in activemq::connector::stomp::StompConnector.

virtual ProducerInfo* activemq::connector::Connector::createProducer const cms::Destination *  destination,
SessionInfo session
throw ( ConnectorException ) [pure virtual]
 

Create a Consumer for the given Session

Parameters:
Destination to Subscribe to.
Session Information.
Returns:
Producer Information
Exceptions:
ConnectorException 

Implemented in activemq::connector::stomp::StompConnector.

virtual cms::Queue* activemq::connector::Connector::createQueue const std::string &  name,
SessionInfo session
throw ( ConnectorException ) [pure virtual]
 

Creates a Queue given a name and session info

Parameters:
Queue Name
Session Information
Returns:
a newly created Queue Object
Exceptions:
ConnectorException 

Implemented in activemq::connector::stomp::StompConnector.

virtual SessionInfo* activemq::connector::Connector::createSession cms::Session::AcknowledgeMode  ackMode  )  throw ( ConnectorException ) [pure virtual]
 

Creates a Session Info object for this connector

Parameters:
Acknowledgement Mode of the Session
Returns:
Session Info Object
Exceptions:
ConnectorException 

Implemented in activemq::connector::stomp::StompConnector.

virtual cms::TemporaryQueue* activemq::connector::Connector::createTemporaryQueue SessionInfo session  )  throw ( ConnectorException ) [pure virtual]
 

Creates a Temporary Queue given a name and session info

Parameters:
Temporary Queue Name
Session Information
Returns:
a newly created Temporary Queue Object
Exceptions:
ConnectorException 

Implemented in activemq::connector::stomp::StompConnector.

virtual cms::TemporaryTopic* activemq::connector::Connector::createTemporaryTopic SessionInfo session  )  throw ( ConnectorException ) [pure virtual]
 

Creates a Temporary Topic given a name and session info

Parameters:
Temporary Topic Name
Session Information
Returns:
a newly created Temporary Topic Object
Exceptions:
ConnectorException 

Implemented in activemq::connector::stomp::StompConnector.

virtual cms::TextMessage* activemq::connector::Connector::createTextMessage SessionInfo session,
TransactionInfo transaction
throw ( ConnectorException ) [pure virtual]
 

Creates a new TextMessage.

Parameters:
Session Information
Transaction Info for this Message
Exceptions:
ConnectorException 

Implemented in activemq::connector::stomp::StompConnector.

virtual cms::Topic* activemq::connector::Connector::createTopic const std::string &  name,
SessionInfo session
throw ( ConnectorException ) [pure virtual]
 

Creates a Topic given a name and session info

Parameters:
Topic Name
Session Information
Returns:
a newly created Topic Object
Exceptions:
ConnectorException 

Implemented in activemq::connector::stomp::StompConnector.

virtual void activemq::connector::Connector::destroyResource ConnectorResource resource  )  throw ( ConnectorException ) [pure virtual]
 

Destroys the given connector resource.

Parameters:
resource the resource to be destroyed.
Exceptions:
ConnectorException 

Implemented in activemq::connector::stomp::StompConnector.

virtual std::string activemq::connector::Connector::getClientId void   )  const [pure virtual]
 

Gets the Client Id for this connection, if this connection has been closed, then this method returns ""

Returns:
Client Id String

Implemented in activemq::connector::stomp::StompConnector.

virtual std::string activemq::connector::Connector::getPassword void   )  const [pure virtual]
 

Gets the Password for this connection, if this connection has been closed, then this method returns ""

Returns:
Password String

Implemented in activemq::connector::stomp::StompConnector.

virtual transport::Transport& activemq::connector::Connector::getTransport void   )  const throw (exceptions::InvalidStateException ) [pure virtual]
 

Gets a reference to the Transport that this connection is using.

Parameters:
reference to a transport
Exceptions:
InvalidStateException if the Transport is not set

Implemented in activemq::connector::stomp::StompConnector.

virtual std::string activemq::connector::Connector::getUsername void   )  const [pure virtual]
 

Gets the Username for this connection, if this connection has been closed, then this method returns ""

Returns:
Username String

Implemented in activemq::connector::stomp::StompConnector.

virtual void activemq::connector::Connector::rollback TransactionInfo transaction,
SessionInfo session
throw ( ConnectorException ) [pure virtual]
 

Rolls back a Transaction.

Parameters:
The Transaction information
Session Information
Exceptions:
ConnectorException 

Implemented in activemq::connector::stomp::StompConnector.

virtual void activemq::connector::Connector::send std::list< cms::Message * > &  messages,
ProducerInfo producerInfo
throw ( ConnectorException ) [pure virtual]
 

Sends a set of Messages

Parameters:
List of Messages to send.
Producer Info for the sender of this message
Exceptions:
ConnectorException 

Implemented in activemq::connector::stomp::StompConnector.

virtual void activemq::connector::Connector::send cms::Message *  message,
ProducerInfo producerInfo
throw ( ConnectorException ) [pure virtual]
 

Sends a Message

Parameters:
The Message to send.
Producer Info for the sender of this message
Exceptions:
ConnectorException 

Implemented in activemq::connector::stomp::StompConnector.

virtual void activemq::connector::Connector::setConsumerMessageListener ConsumerMessageListener listener  )  [pure virtual]
 

Sets the listener of consumer messages.

Parameters:
listener the observer.

Implemented in activemq::connector::stomp::StompConnector.

virtual void activemq::connector::Connector::setExceptionListener cms::ExceptionListener *  listener  )  [pure virtual]
 

Sets the Listner of exceptions for this connector

Parameters:
ExceptionListener the observer.

Implemented in activemq::connector::stomp::StompConnector.

virtual TransactionInfo* activemq::connector::Connector::startTransaction SessionInfo session  )  throw ( ConnectorException ) [pure virtual]
 

Starts a new Transaction.

Parameters:
Session Information
Exceptions:
ConnectorException 

Implemented in activemq::connector::stomp::StompConnector.

virtual void activemq::connector::Connector::unsubscribe const std::string &  name  )  throw ( ConnectorException ) [pure virtual]
 

Unsubscribe from a givenDurable Subscription

Parameters:
name of the Subscription
Exceptions:
ConnectorException 

Implemented in activemq::connector::stomp::StompConnector.


The documentation for this class was generated from the following file:
Generated on Thu Aug 3 18:03:32 2006 for activemq-cpp by  doxygen 1.4.5