Sun Java System Communications Services 6 2005Q4 Event Notification Service Guide

Java (JMS) API Overview

The Java API for ENS uses a subset of the standard Java Messaging Service (JMS) API, with the addition of two new proprietary methods:

JMS requires the creation of a TopicConnectionFactory and a Topic, which is provided by the two ENS proprietary classes.

For more information on the standard JMS classes and methods, see the JMS documentation at:

http://java.sun.com/products/jms/docs.html

New Proprietary Methods

The two proprietary method classes are EnsTopicConnFactory and EnsTopic.

com.iplanet.ens.jms.EnsTopicConnFactory

About the method

The method is a constructor that returns a javax.jms.TopicConnectionFactory. Instead of using a JNDI-style lookup to obtain the TopicConnectionFactory object, this method is provided.

Syntax

public EnsTopicConnFactory (String name, 
                                            String hostname,
                                            int port, 
                                            OutputStream logStream) 

                                throws java.io.IOException

Arguments

Arguments  

Type  

Explanation  

name

String 

The client ID for the javax.jms.Connection 

hostname

String 

The hostname for the ENS server. 

port

int 

The TCP port for the ENS server. 

logStream

OutputStream 

Where messages are logged (cannot be null). 

com.iplanet.ens.jms.EnsTopic

About this method

The method is a constructor that returns a javax.jms.Topic. Instead of using a JNDI-style lookup to obtain the javax.jms.Topic, this method is provided.

Syntax

public EnsTopic (String eventRef)

Arguments

Arguments  

Type  

Explanation  

eventRef

String 

The ENS event reference.