OSMQ
v2.0.1

osmq.clients
Interface ClientAdapter

All Known Subinterfaces:
Publisher, Subscriber
All Known Implementing Classes:
PublisherBean, SubscriberBean

public interface ClientAdapter

A client-side integration broker adapter, and the base interface from which the Publisher and Subscriber interfaces are derived.


Method Summary
 void close()
          Closes the message queues and halts message processing.
 java.lang.String getBrokerName()
          Returns the name of the remote message broker for this session.
 java.lang.String getClientID()
          Returns the client identifier used by this session to communicate with the message broker.
 ExceptionListener getExceptionListener()
          Return the ExceptionListener that will be notified when there is an exception due to an inability to connect with the broker, or due to an I/O or communications failure.
 java.lang.String getHostName()
          Returns the message broker's host address as a DNS host name or IP address.
 int getPortID()
          Returns the port ID that will be used to connect to the message broker.
 boolean isOpen()
          Returns true if there is an active connection to the message broker.
 void open()
          Locates and connect to the remote message broker, and performs the necessary client authentication.
 void setBrokerName(java.lang.String broker)
          Defines the named message broker that should be used for message processing (publishing or subscribing).
 void setClientID(java.lang.String id)
          Sets the identity of the application as a message originator (publisher)
 void setExceptionListener(ExceptionListener listener)
          Sets an ExceptionListener that will be notified if there is an exception due to an inability to connect with the broker, or due to an I/O or communications failure.
 void setHostName(java.lang.String hostname)
          Overrides the host name / IP address of the remote server;
 void setPortID(int port)
          Sets the port ID that the remote message server uses for connections.
 

Method Detail

open

public void open()
          throws java.io.IOException
Locates and connect to the remote message broker, and performs the necessary client authentication.

Throws:
java.io.IOException

setClientID

public void setClientID(java.lang.String id)
Sets the identity of the application as a message originator (publisher)

Parameters:
id - a unique name identifying the client application to the message broker.

getClientID

public java.lang.String getClientID()
Returns the client identifier used by this session to communicate with the message broker.


setBrokerName

public void setBrokerName(java.lang.String broker)
Defines the named message broker that should be used for message processing (publishing or subscribing). Generally, this method should not be called. Rather, the default broker should be used, especially in a production environment.


getBrokerName

public java.lang.String getBrokerName()
Returns the name of the remote message broker for this session.


setPortID

public void setPortID(int port)
Sets the port ID that the remote message server uses for connections.

NOTE: Normally this method should NOT be called by the client application.


getPortID

public int getPortID()
Returns the port ID that will be used to connect to the message broker. A value of 0 indicates that dynamic discovery will be used to identify the broker port.

See Also:
setPortID(int)

setHostName

public void setHostName(java.lang.String hostname)
Overrides the host name / IP address of the remote server;

NOTE: Normally this method should NOT be called by the client application.


getHostName

public java.lang.String getHostName()
Returns the message broker's host address as a DNS host name or IP address. This is the name that was set by the application. A value of null indicates that dynamic discovery will be used to identify the host address.

See Also:
setHostName(String)

isOpen

public boolean isOpen()
Returns true if there is an active connection to the message broker.


close

public void close()
Closes the message queues and halts message processing.


setExceptionListener

public void setExceptionListener(ExceptionListener listener)
Sets an ExceptionListener that will be notified if there is an exception due to an inability to connect with the broker, or due to an I/O or communications failure.


getExceptionListener

public ExceptionListener getExceptionListener()
Return the ExceptionListener that will be notified when there is an exception due to an inability to connect with the broker, or due to an I/O or communications failure.


(c) 2000 - 2003 MQue Systems
All Rights Reserved