KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > scalagent > joram > osgi > client > service > JoramClient


1 package com.scalagent.joram.osgi.client.service;
2
3 import java.io.Reader JavaDoc;
4 import java.util.List JavaDoc;
5 import java.util.Hashtable JavaDoc;
6
7 import javax.naming.Context JavaDoc;
8
9 import org.objectweb.joram.client.jms.ConnectionFactory;
10 import org.objectweb.joram.client.jms.Queue;
11 import org.objectweb.joram.client.jms.Topic;
12
13 /**
14  * Interface of the OSGI service that enables to ..
15  */

16 public interface JoramClient {
17   /**
18    *
19    */

20   public void connect(String JavaDoc host, int port,
21                       String JavaDoc name, String JavaDoc password,
22                       int cnxTimer) throws Exception JavaDoc;
23
24   /**
25    *
26    */

27   public void disconnect();
28
29   /**
30    *
31    */

32   public ConnectionFactory getTcpConnectionFactory(String JavaDoc hostname, int port) throws Exception JavaDoc;
33
34   /**
35    *
36    */

37   public Context JavaDoc getInitialContext() throws Exception JavaDoc;
38
39   /**
40    *
41    */

42   public Context JavaDoc getInitialContext(Hashtable JavaDoc prop) throws Exception JavaDoc;
43
44   /**
45    *
46    */

47   public boolean executeAdminXML(Reader JavaDoc reader) throws Exception JavaDoc;
48
49   /**
50    * Creates or retrieves a user on the underlying JORAM server.
51    *
52    * @exception Exception If the creation fails.
53    */

54   public void createUser(String JavaDoc name, String JavaDoc password) throws Exception JavaDoc;
55
56   /**
57    * Creates or retrieves a queue destination on the underlying JORAM server,
58    * (re)binds the corresponding <code>Queue</code> instance.
59    *
60    * @param name The name of the queue.
61    *
62    * @exception Exception If the creation fails.
63    */

64   public Queue createQueue(String JavaDoc name) throws Exception JavaDoc;
65
66   /**
67    * Creates or retrieves a topic destination on the underlying JORAM server,
68    * (re)binds the corresponding <code>Topic</code> instance.
69    *
70    * @exception Exception If the creation fails.
71    */

72   public Topic createTopic(String JavaDoc name) throws Exception JavaDoc;
73
74   /**
75    * Returns the list of all destinations that exist on the server.
76    */

77   public List JavaDoc getDestinations() throws Exception JavaDoc;
78
79   /**
80    * Returns the list of all users that exist on the server.
81    */

82   public List JavaDoc getUsers() throws Exception JavaDoc;
83 }
84
Popular Tags