org.exolab.jms.server.http
Class HttpJmsSessionSender

java.lang.Object
  |
  +--org.exolab.jms.server.http.HttpJmsSessionSender
All Implemented Interfaces:
JmsMessageListener, javax.jms.MessageListener

public class HttpJmsSessionSender
extends java.lang.Object
implements JmsMessageListener

This class contains the http connection to a receiver or subscriber for passing messages.

Version:
$Revision: 1.11 $ $Date: 2003/08/30 08:00:54 $
Author:
Jim Mourikis
See Also:
JmsServerSession, HttpClient

Constructor Summary
HttpJmsSessionSender(HttpJmsSessionConnection connection, org.exolab.core.http.HttpClient client, JmsServerSession session, java.lang.String host, java.lang.String port)
          Create a connection to the client listener for sending JmsMessages.
 
Method Summary
 void close()
          Remove the callback from the JmsServerSession.
 void onMessage(javax.jms.Message message)
          Send a message to a listener.
 void onMessageAvailable(long clientId)
          Notify the specified client that a message avaiable.
 void onMessages(java.util.Vector messages)
          Send the collection of messages to the client.
protected  void ping()
          Ping the client to see if its still active.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpJmsSessionSender

public HttpJmsSessionSender(HttpJmsSessionConnection connection,
                            org.exolab.core.http.HttpClient client,
                            JmsServerSession session,
                            java.lang.String host,
                            java.lang.String port)
Create a connection to the client listener for sending JmsMessages.
Parameters:
connection - the session connection
client - the connection to the client.
session - the session this connection belongs to
host - the host the client session runs on
port - the port the client session is listening on
Method Detail

onMessage

public void onMessage(javax.jms.Message message)
Send a message to a listener.
Specified by:
onMessage in interface javax.jms.MessageListener
Parameters:
message - The message to send.

onMessages

public void onMessages(java.util.Vector messages)
Send the collection of messages to the client. This is used for async message delivery.
Specified by:
onMessages in interface JmsMessageListener
Parameters:
messages - - collection of MessageImpl objects

onMessageAvailable

public void onMessageAvailable(long clientId)
Notify the specified client that a message avaiable.
Specified by:
onMessageAvailable in interface JmsMessageListener
Parameters:
clinet - - the client identity

ping

protected void ping()
Ping the client to see if its still active.

close

public void close()
Remove the callback from the JmsServerSession.


Copyright © 1999-2004 The OpenJMS Group. All Rights Reserved.