SonicMQ API

progress.message.broker.loadbalancing
Interface IConnectionContext


public interface IConnectionContext

This interface provides information about an incoming connection to an ILoadBalancer to assist it in making load balancing decisions. An ILoadBalancer implementation uses the information provided by this interface, and call setNewBrokerURL(String) to set an url for the connection to use.

Since:
7.7

Method Summary
 java.lang.String getAcceptorName()
          Get's the name of the acceptor to which the client connected at the broker.
 java.lang.String getClientData()
          Gets the optional 'hint' data supplied by the client application to assist the load balancer.
 java.lang.String getClientHost()
          Returns the host of the incoming client as resolved by the broker.
 int getClientPort()
          Gets the port to which the incoming client has connected.
 java.lang.String getJMSClientID()
          Gets the JMS ClientId for the incoming connection, if it is available.
 void setNewBrokerURL(java.lang.String brokerURL)
          This should be set by an ILoadBalancer implementation to the the new to which to redirect a client connection.
 

Method Detail

getClientData

java.lang.String getClientData()
Gets the optional 'hint' data supplied by the client application to assist the load balancer.

Returns:
The hint data, possibly null if none was provided.

getJMSClientID

java.lang.String getJMSClientID()
Gets the JMS ClientId for the incoming connection, if it is available.

Returns:
The JMS ClientId or null if it is unavailable.

getClientHost

java.lang.String getClientHost()
Returns the host of the incoming client as resolved by the broker.

Returns:
The client's host, or null if it could not be resolved.

getClientPort

int getClientPort()
Gets the port to which the incoming client has connected.

Returns:
The local port to which the client connected.

getAcceptorName

java.lang.String getAcceptorName()
Get's the name of the acceptor to which the client connected at the broker.

Returns:
The name of the acceptor on which the client connected.

setNewBrokerURL

void setNewBrokerURL(java.lang.String brokerURL)
This should be set by an ILoadBalancer implementation to the the new to which to redirect a client connection.

Parameters:
brokerURL - The new broker url.

SonicMQ API

Copyright © 1999-2011 Progress Software Corporation. All Rights Reserved.
HTML formatted on 5-August-2011.