|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.exolab.jms.tools.migration.proxy.ConsumerStore
Provides persistency for Consumer
instances.
Field Summary | |
static java.lang.String |
CONSUMER_TABLE
|
static java.lang.String |
DESTINATION_TABLE
|
static java.lang.String |
MESSAGE_HANDLE_TABLE
|
static java.lang.String |
MESSAGE_PROPERTIES_TABLE
|
static java.lang.String |
MESSAGE_TABLE
|
static java.lang.String |
PROPERTIES_TABLE
|
static java.lang.String |
SUBSCRIPTION_TABLE
|
static java.lang.String |
USER_TABLE
|
Constructor Summary | |
ConsumerStore(DestinationStore destinations,
java.sql.Connection connection)
Construct a new ConsumerStore . |
Method Summary | |
void |
add(Consumer consumer)
Add a new consumer. |
protected void |
addMessages(long consumerId,
long destinationId,
Subscription subscription)
Add messages for a subscription. |
protected void |
addSubscriptions(long consumerId,
Consumer consumer)
Add subscriptions for a consumer. |
StoreIterator |
exportCollection()
Export the consumers. |
Consumer |
get(long consumerId)
Returns a consumer for a given identifier. |
java.util.List |
getConsumerIds()
Returns all consumer identifiers. |
protected void |
getMessages(long consumerId,
long destinationId,
Subscription subscription)
Get messages for a subscription. |
protected void |
getSubscriptions(long consumerId,
Consumer consumer)
Get subscriptions for a consumer. |
void |
importCollection(StoreIterator iterator)
Import consumers into the store. |
int |
size()
Returns the number of elements in the collection. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String PROPERTIES_TABLE
public static final java.lang.String DESTINATION_TABLE
public static final java.lang.String MESSAGE_TABLE
public static final java.lang.String MESSAGE_PROPERTIES_TABLE
public static final java.lang.String CONSUMER_TABLE
public static final java.lang.String SUBSCRIPTION_TABLE
public static final java.lang.String MESSAGE_HANDLE_TABLE
public static final java.lang.String USER_TABLE
Constructor Detail |
public ConsumerStore(DestinationStore destinations, java.sql.Connection connection)
ConsumerStore
.destinations
- the destination storeconnection
- the database connectionMethod Detail |
public StoreIterator exportCollection() throws javax.jms.JMSException, org.exolab.jms.persistence.PersistenceException
exportCollection
in interface Store
javax.jms.JMSException
- for any JMS errororg.exolab.jms.persistence.PersistenceException
- for any persistence errorpublic void importCollection(StoreIterator iterator) throws javax.jms.JMSException, org.exolab.jms.persistence.PersistenceException
importCollection
in interface Store
iterator
- an iterator over the collectionjavax.jms.JMSException
- for any JMS errororg.exolab.jms.persistence.PersistenceException
- for any persistence errorpublic int size() throws org.exolab.jms.persistence.PersistenceException
size
in interface Store
org.exolab.jms.persistence.PersistenceException
- for any persistence errorpublic void add(Consumer consumer) throws org.exolab.jms.persistence.PersistenceException
consumer
- the consumer to addorg.exolab.jms.persistence.PersistenceException
- for any persistence errorpublic Consumer get(long consumerId) throws org.exolab.jms.persistence.PersistenceException
consumerId
- the identity of the consumerconsumerId
or
null
if no such consumer existsorg.exolab.jms.persistence.PersistenceException
- for any persistence errorpublic java.util.List getConsumerIds() throws org.exolab.jms.persistence.PersistenceException
org.exolab.jms.persistence.PersistenceException
- for any persistence errorprotected void addSubscriptions(long consumerId, Consumer consumer) throws org.exolab.jms.persistence.PersistenceException
consumerId
- the identity of the consumerconsumer
- the consumerorg.exolab.jms.persistence.PersistenceException
- for any persistence errorprotected void addMessages(long consumerId, long destinationId, Subscription subscription) throws org.exolab.jms.persistence.PersistenceException
consumerId
- the identity of the consumerdestinationId
- the identify of the destinationsubscription
- the consumer subscriptionorg.exolab.jms.persistence.PersistenceException
- for any persistence errorprotected void getSubscriptions(long consumerId, Consumer consumer) throws org.exolab.jms.persistence.PersistenceException
consumerId
- the identity of the consumerconsumer
- the consumer to populateorg.exolab.jms.persistence.PersistenceException
- for any persistence errorprotected void getMessages(long consumerId, long destinationId, Subscription subscription) throws java.sql.SQLException
consumerId
- the identity of the consumerdestinationId
- the identify of the destinationsubscription
- the consumer subscriptionjava.sql.SQLException
- if a database error is encountered
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |