Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.jms.client
Class JBossConnectionConsumer

    java.lang.Object
      org.jboss.jms.client.JBossConnectionConsumer

All Implemented Interfaces:
  java.lang.Runnable

public class JBossConnectionConsumer
extends java.lang.Object
implements java.lang.Runnable

This class implements javax.jms.ConnectionConsumer

Version:
  $Revision: 1.25 $ $Id: JBossConnectionConsumer.java,v 1.25 2006/06/28 16:56:36 timfox Exp $
Author:
  Tim Fox, Ovidiu Feodorov Partially based on JBossMQ version by:, Hiram Chirino (Cojonudo14@hotmail.com), Adrian Brock

Field Summary
`protected boolean` | `closed` Is the ConnectionConsumer closed?
`protected java.lang.Object` | `closeLock`
`protected ConsumerDelegate` | `cons`
`protected int` | `consumerID`
`protected Destination` | `destination` The destination this consumer will receive messages from
`protected int` | `id` The thread id
`protected java.lang.Thread` | `internalThread` The "listening" thread that gets messages from destination and queues them for delivery to sessions
`protected int` | `maxMessages` The maximum number of messages that a single session will be loaded with.
`protected ServerSessionPool` | `serverSessionPool` The ServerSessionPool that is implemented by the AS
`protected SessionDelegate` | `sess`
`protected static SynchronizedInt` | `threadId` The thread id generator

Constructor Summary
`JBossConnectionConsumer(ConnectionDelegate conn, JBossDestination dest, java.lang.String subName, java.lang.String messageSelector, ServerSessionPool sessPool, int maxMessages)` JBossConnectionConsumer constructor

Method Summary
`void` | `close()`
`protected void` | `doClose()`
`ServerSessionPool` | `getServerSessionPool()`
`void` | `run()`
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### cons

    protected ConsumerDelegate cons

### sess

    protected SessionDelegate sess

### consumerID

    protected int consumerID

### destination

    protected Destination destination

  The destination this consumer will receive messages from

### serverSessionPool

    protected ServerSessionPool serverSessionPool

  The ServerSessionPool that is implemented by the AS

### maxMessages

    protected int maxMessages

  The maximum number of messages that a single session will be loaded with.

### closed

    protected volatile boolean closed

  Is the ConnectionConsumer closed?

### internalThread

    protected java.lang.Thread internalThread

  The "listening" thread that gets messages from destination and queues them for delivery to sessions

### id

    protected int id

  The thread id

### threadId

    protected static SynchronizedInt threadId

  The thread id generator

### closeLock

    protected java.lang.Object closeLock

Constructor Detail

### JBossConnectionConsumer

    public JBossConnectionConsumer(ConnectionDelegate conn,
                                   JBossDestination dest,
                                   java.lang.String subName,
                                   java.lang.String messageSelector,
                                   ServerSessionPool sessPool,
                                   int maxMessages)
                            throws JMSException

  JBossConnectionConsumer constructor

Parameters:
  `conn` - the connection
  `dest` - destination
  `messageSelector` - the message selector
  `sessPool` - the server session pool
  `maxMessages` - the maxmimum messages
Throws:
  `JMSException` - for any error

Method Detail

### getServerSessionPool

    public ServerSessionPool getServerSessionPool()
                                           throws JMSException

  Throws:
    `JMSException`

### close

    public void close()
               throws JMSException

  Throws:
    `JMSException`

### run

    public void run()

  Specified by:
    `run` in interface `java.lang.Runnable`

### doClose

    protected void doClose()
                    throws JMSException

  Throws:
    `JMSException`

### toString

    public java.lang.String toString()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 JBoss Inc. All Rights Reserved.