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.codehaus.activemq.broker.impl
Class BrokerClientImpl

    java.lang.Object
      org.codehaus.activemq.broker.impl.BrokerClientImpl

All Implemented Interfaces:
  BrokerClient, ExceptionListener, PacketListener, Service

public class BrokerClientImpl
extends java.lang.Object
implements BrokerClient, ExceptionListener, PacketListener

A Broker client side proxy representing a JMS Connnection

Version:
  $Revision: 1.16 $

Constructor Summary
`BrokerClientImpl()` Default Constructor of BrokerClientImpl

Method Summary
`void` | `cleanUp()` Called when the transport has been terminated, so do our best to shut down any resources and deregister from any subscriptions etc
`protected void` | `close()`
`void` | `consume(Packet packet)` Consume a Packet from the underlying TransportChannel for processing
`void` | `consumeConnectionInfo(ConnectionInfo info)` register with the Broker
`void` | `consumeConsumerInfo(ConsumerInfo info)` Register/deregister MessageConsumer with the Broker
`void` | `dispatch(ActiveMQMessage message)` Dispatch an ActiveMQMessage to the end client
`int` | `getCapacity()` Get the Capacity for in-progress messages at the peer (probably a JMSConnection) Legimate values between 0-100.
`TransportChannel` | `getChannel()`
`java.lang.String` | `getClientID()` Returns the client ID for this client if the client has been initialised
`void` | `initialize(BrokerConnector brokerConnector, TransportChannel channel)` Initialize the BrokerClient
`boolean` | `isBrokerConnection()`
`boolean` | `isSlowConsumer()` Get an indication if the peer should be considered as a slow consumer
`void` | `onException(JMSException jmsEx)`
`protected void` | `send(Packet packet)`
`void` | `start()` start consuming messages
`void` | `stop()` stop consuming messages
`java.lang.String` | `toString()`
`void` | `updateBrokerCapacity(int capacity)` Update the peer Connection about the Broker's capacity for messages

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

Constructor Detail

### BrokerClientImpl

    public BrokerClientImpl()

  Default Constructor of BrokerClientImpl

Method Detail

### initialize

    public void initialize(BrokerConnector brokerConnector,
                           TransportChannel channel)

  Initialize the BrokerClient

  Specified by:
    `initialize` in interface `BrokerClient`
  Parameters:
    `brokerConnector` -
    `channel` -

### onException

    public void onException(JMSException jmsEx)

  Specified by:
    `onException` in interface `ExceptionListener`
  See Also:
    `ExceptionListener.onException(javax.jms.JMSException)`

### toString

    public java.lang.String toString()

  Returns:
    pretty print for this brokerConnector-client

### dispatch

    public void dispatch(ActiveMQMessage message)

  Dispatch an ActiveMQMessage to the end client

  Specified by:
    `dispatch` in interface `BrokerClient`
  Parameters:
    `message` -

### isBrokerConnection

    public boolean isBrokerConnection()

  Specified by:
    `isBrokerConnection` in interface `BrokerClient`
  Returns:
    true if the peer for this Client is itself another Broker

### getCapacity

    public int getCapacity()

  Get the Capacity for in-progress messages at the peer (probably a JMSConnection) Legimate values between 0-100. 0 capacity representing that the peer cannot process any more messages at the current time

  Specified by:
    `getCapacity` in interface `BrokerClient`
  Returns:

### getClientID

    public java.lang.String getClientID()

  Description copied from interface: `BrokerClient`
  Returns the client ID for this client if the client has been initialised

  Specified by:
    `getClientID` in interface `BrokerClient`

### getChannel

    public TransportChannel getChannel()

  Specified by:
    `getChannel` in interface `BrokerClient`

### isSlowConsumer

    public boolean isSlowConsumer()

  Get an indication if the peer should be considered as a slow consumer

  Specified by:
    `isSlowConsumer` in interface `BrokerClient`
  Returns:
    true id the peer should be considered as a slow consumer

### consume

    public void consume(Packet packet)

  Consume a Packet from the underlying TransportChannel for processing

  Specified by:
    `consume` in interface `PacketListener`
  Parameters:
    `packet` -

### consumeConsumerInfo

    public void consumeConsumerInfo(ConsumerInfo info)
                             throws JMSException

  Register/deregister MessageConsumer with the Broker

  Parameters:
    `info` -
  Throws:
    `JMSException`

### updateBrokerCapacity

    public void updateBrokerCapacity(int capacity)

  Update the peer Connection about the Broker's capacity for messages

  Specified by:
    `updateBrokerCapacity` in interface `BrokerClient`
  Parameters:
    `capacity` -

### consumeConnectionInfo

    public void consumeConnectionInfo(ConnectionInfo info)
                               throws JMSException

  register with the Broker

  Parameters:
    `info` -
  Throws:
    `JMSException`

### start

    public void start()
               throws JMSException

  start consuming messages

  Specified by:
    `start` in interface `Service`
  Throws:
    `JMSException`

### stop

    public void stop()
              throws JMSException

  stop consuming messages

  Specified by:
    `stop` in interface `Service`
  Throws:
    `JMSException`

### cleanUp

    public void cleanUp()

  Description copied from interface: `BrokerClient`
  Called when the transport has been terminated, so do our best to shut down any resources and deregister from any subscriptions etc

  Specified by:
    `cleanUp` in interface `BrokerClient`

### send

    protected void send(Packet packet)

### close

    protected void close()

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 © 2004 Protique, Ltd.. All Rights Reserved.