Joram 5.0.9

org.objectweb.joram.client.jms.admin
Class JoramAdmin

java.lang.Object
  extended by org.objectweb.joram.client.jms.admin.JoramAdmin
All Implemented Interfaces:
JoramAdminMBean

public class JoramAdmin
extends java.lang.Object
implements JoramAdminMBean


Field Summary
 PlatformAdmin platformAdmin
           
 long timeOut
           
 
Constructor Summary
JoramAdmin()
           
JoramAdmin(java.lang.String hostName, int port, java.lang.String name, java.lang.String password, int cnxTimer)
           
JoramAdmin(java.lang.String hostName, int port, java.lang.String name, java.lang.String password, int cnxTimer, java.lang.String reliableClass)
           
JoramAdmin(java.lang.String name, java.lang.String password)
           
JoramAdmin(javax.jms.TopicConnectionFactory cnxFact, java.lang.String name, java.lang.String password)
           
 
Method Summary
 javax.jms.Destination createQueue(int serverId, java.lang.String name)
          Creates or retrieves a queue destination on the underlying JORAM server, (re)binds the corresponding Queue instance.
 javax.jms.Destination createQueue(int serverId, java.lang.String name, java.lang.String className, java.util.Properties prop)
          Creates or retrieves a queue destination on the underlying JORAM server, (re)binds the corresponding Queue instance.
 javax.jms.Destination createQueue(java.lang.String name)
          Creates or retrieves a queue destination on the underlying JORAM server, (re)binds the corresponding Queue instance.
 javax.jms.Destination createTopic(int serverId, java.lang.String name)
          Creates or retrieves a topic destination on the underlying JORAM server, (re)binds the corresponding Topic instance.
 javax.jms.Destination createTopic(int serverId, java.lang.String name, java.lang.String className, java.util.Properties prop)
          Creates or retrieves a topic destination on the underlying JORAM server, (re)binds the corresponding Topic instance.
 javax.jms.Destination createTopic(java.lang.String name)
          Creates or retrieves a topic destination on the underlying JORAM server, (re)binds the corresponding Topic instance.
 void createUser(java.lang.String name, java.lang.String password)
          Creates or retrieves a user on the underlying JORAM server.
 void createUser(java.lang.String name, java.lang.String password, int serverId)
          Creates or retrieves a user on the underlying JORAM server.
static boolean executeXMLAdmin(java.lang.String path)
           
static boolean executeXMLAdmin(java.lang.String cfgDir, java.lang.String cfgFileName)
           
 boolean executeXMLAdminJMX(java.lang.String path)
          Reload the joramAdmin.xml file
 void exit()
           
 void exportRepositoryToFile(java.lang.String exportDir)
          Export the repository content to an XML file - only the destinations objects are retrieved in this version - xml script format of the admin objects (joramAdmin.xml)
 java.lang.String getAdminFileExportXML()
           
 DeadMQueue getDefaultDMQ()
          Returns the default dead message queue for the local server, null if not set.
 DeadMQueue getDefaultDMQ(int serverId)
          Returns the default dead message queue for a given server, null if not set.
 java.lang.String getDefaultDMQId()
          Returns the default dead message queue for the local server, null if not set.
 java.lang.String getDefaultDMQId(int serverId)
          Returns the default dead message queue for a given server, null if not set.
 java.util.List getDestinations()
          Returns the list of all destinations that exist on the local server, or an empty list if none exist.
 java.util.List getDestinations(int serverId)
          Returns the list of all destinations that exist on a given server, or an empty list if none exist.
 PlatformAdmin getPlatformAdmin()
           
 long getTimeOutToAbortRequest()
          wait before abort a request.
 java.util.List getUsers()
          Returns the list of all users that exist on the local server, or an empty list if none exist.
 java.util.List getUsers(int serverId)
          Returns the list of all users that exist on a given server, or an empty list if none exist.
static boolean isHa()
           
 void setAdminFileExportXML(java.lang.String adminFileExportXML)
           
 void setDefaultDMQ(int serverId, DeadMQueue dmq)
          Sets a given dead message queue as the default DMQ for a given server (null for unsetting previous DMQ).
 void setDefaultDMQId(int serverId, java.lang.String dmqId)
          Sets a given dead message queue as the default DMQ for a given server (null for unsetting previous DMQ).
static void setHa(boolean isHa)
           
 void setTimeOutToAbortRequest(long timeOut)
          wait before abort a request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

timeOut

public long timeOut

platformAdmin

public PlatformAdmin platformAdmin
Constructor Detail

JoramAdmin

public JoramAdmin()
           throws java.net.UnknownHostException,
                  java.net.ConnectException,
                  AdminException
Throws:
java.net.UnknownHostException
java.net.ConnectException
AdminException

JoramAdmin

public JoramAdmin(java.lang.String hostName,
                  int port,
                  java.lang.String name,
                  java.lang.String password,
                  int cnxTimer,
                  java.lang.String reliableClass)
           throws java.net.UnknownHostException,
                  java.net.ConnectException,
                  AdminException
Throws:
java.net.UnknownHostException
java.net.ConnectException
AdminException

JoramAdmin

public JoramAdmin(java.lang.String hostName,
                  int port,
                  java.lang.String name,
                  java.lang.String password,
                  int cnxTimer)
           throws java.net.UnknownHostException,
                  java.net.ConnectException,
                  AdminException
Throws:
java.net.UnknownHostException
java.net.ConnectException
AdminException

JoramAdmin

public JoramAdmin(java.lang.String name,
                  java.lang.String password)
           throws java.net.ConnectException,
                  AdminException
Throws:
java.net.ConnectException
AdminException

JoramAdmin

public JoramAdmin(javax.jms.TopicConnectionFactory cnxFact,
                  java.lang.String name,
                  java.lang.String password)
           throws java.net.ConnectException,
                  AdminException
Throws:
java.net.ConnectException
AdminException
Method Detail

getPlatformAdmin

public PlatformAdmin getPlatformAdmin()

exit

public void exit()
Specified by:
exit in interface JoramAdminMBean

setTimeOutToAbortRequest

public void setTimeOutToAbortRequest(long timeOut)
wait before abort a request.

Specified by:
setTimeOutToAbortRequest in interface JoramAdminMBean

getTimeOutToAbortRequest

public long getTimeOutToAbortRequest()
wait before abort a request.

Specified by:
getTimeOutToAbortRequest in interface JoramAdminMBean

setDefaultDMQ

public void setDefaultDMQ(int serverId,
                          DeadMQueue dmq)
                   throws java.net.ConnectException,
                          AdminException
Sets a given dead message queue as the default DMQ for a given server (null for unsetting previous DMQ).

The request fails if the target server does not belong to the platform.

Parameters:
serverId - The identifier of the server.
dmq - The dmq to be set as the default one.
Throws:
java.net.ConnectException - If the connection fails.
AdminException - If the request fails.

setDefaultDMQId

public void setDefaultDMQId(int serverId,
                            java.lang.String dmqId)
                     throws java.net.ConnectException,
                            AdminException
Sets a given dead message queue as the default DMQ for a given server (null for unsetting previous DMQ).

The request fails if the target server does not belong to the platform.

Specified by:
setDefaultDMQId in interface JoramAdminMBean
Parameters:
serverId - The identifier of the server.
dmqId - The dmqId (AgentId) to be set as the default one.
Throws:
java.net.ConnectException - If the connection fails.
AdminException - If the request fails.

getDefaultDMQ

public DeadMQueue getDefaultDMQ(int serverId)
                         throws java.net.ConnectException,
                                AdminException
Returns the default dead message queue for a given server, null if not set.

The request fails if the target server does not belong to the platform.

Throws:
java.net.ConnectException - If the connection fails.
AdminException - If the request fails.

getDefaultDMQId

public java.lang.String getDefaultDMQId(int serverId)
                                 throws java.net.ConnectException,
                                        AdminException
Returns the default dead message queue for a given server, null if not set.

The request fails if the target server does not belong to the platform.

Specified by:
getDefaultDMQId in interface JoramAdminMBean
Throws:
java.net.ConnectException - If the connection fails.
AdminException - If the request fails.

getDefaultDMQ

public DeadMQueue getDefaultDMQ()
                         throws java.net.ConnectException,
                                AdminException
Returns the default dead message queue for the local server, null if not set.

Throws:
java.net.ConnectException - If the connection fails.
AdminException - Never thrown.

getDefaultDMQId

public java.lang.String getDefaultDMQId()
                                 throws java.net.ConnectException,
                                        AdminException
Returns the default dead message queue for the local server, null if not set.

Specified by:
getDefaultDMQId in interface JoramAdminMBean
Throws:
java.net.ConnectException - If the connection fails.
AdminException - Never thrown.

getDestinations

public java.util.List getDestinations(int serverId)
Returns the list of all destinations that exist on a given server, or an empty list if none exist.

Specified by:
getDestinations in interface JoramAdminMBean

getDestinations

public java.util.List getDestinations()
Returns the list of all destinations that exist on the local server, or an empty list if none exist.

Specified by:
getDestinations in interface JoramAdminMBean

getUsers

public java.util.List getUsers(int serverId)
Returns the list of all users that exist on a given server, or an empty list if none exist.

Specified by:
getUsers in interface JoramAdminMBean

getUsers

public java.util.List getUsers()
Returns the list of all users that exist on the local server, or an empty list if none exist.

Specified by:
getUsers in interface JoramAdminMBean

createUser

public void createUser(java.lang.String name,
                       java.lang.String password)
                throws AdminException
Creates or retrieves a user on the underlying JORAM server.

Specified by:
createUser in interface JoramAdminMBean
Throws:
AdminException - If the creation fails.

createUser

public void createUser(java.lang.String name,
                       java.lang.String password,
                       int serverId)
                throws AdminException
Creates or retrieves a user on the underlying JORAM server.

Specified by:
createUser in interface JoramAdminMBean
Throws:
AdminException - If the creation fails.

createQueue

public javax.jms.Destination createQueue(java.lang.String name)
                                  throws AdminException
Creates or retrieves a queue destination on the underlying JORAM server, (re)binds the corresponding Queue instance.

Specified by:
createQueue in interface JoramAdminMBean
Parameters:
name - The name of the queue.
Throws:
AdminException - If the creation fails.

createQueue

public javax.jms.Destination createQueue(int serverId,
                                         java.lang.String name)
                                  throws AdminException
Creates or retrieves a queue destination on the underlying JORAM server, (re)binds the corresponding Queue instance.

Specified by:
createQueue in interface JoramAdminMBean
Parameters:
serverId - The identifier of the server where deploying the queue.
name - The name of the queue.
Throws:
AdminException - If the creation fails.

createQueue

public javax.jms.Destination createQueue(int serverId,
                                         java.lang.String name,
                                         java.lang.String className,
                                         java.util.Properties prop)
                                  throws AdminException
Creates or retrieves a queue destination on the underlying JORAM server, (re)binds the corresponding Queue instance.

Specified by:
createQueue in interface JoramAdminMBean
Parameters:
serverId - The identifier of the server where deploying the queue.
name - The name of the queue.
className - The queue class name.
prop - The queue properties.
Throws:
AdminException - If the creation fails.

createTopic

public javax.jms.Destination createTopic(java.lang.String name)
                                  throws AdminException
Creates or retrieves a topic destination on the underlying JORAM server, (re)binds the corresponding Topic instance.

Specified by:
createTopic in interface JoramAdminMBean
Throws:
AdminException - If the creation fails.

createTopic

public javax.jms.Destination createTopic(int serverId,
                                         java.lang.String name)
                                  throws AdminException
Creates or retrieves a topic destination on the underlying JORAM server, (re)binds the corresponding Topic instance.

Specified by:
createTopic in interface JoramAdminMBean
Parameters:
serverId - The identifier of the server where deploying the topic.
name - The name of the topic.
Throws:
AdminException - If the creation fails.

createTopic

public javax.jms.Destination createTopic(int serverId,
                                         java.lang.String name,
                                         java.lang.String className,
                                         java.util.Properties prop)
                                  throws AdminException
Creates or retrieves a topic destination on the underlying JORAM server, (re)binds the corresponding Topic instance.

Specified by:
createTopic in interface JoramAdminMBean
Parameters:
serverId - The identifier of the server where deploying the topic.
name - The name of the topic.
className - The topic class name.
prop - The topic properties.
Throws:
AdminException - If the creation fails.

executeXMLAdmin

public static boolean executeXMLAdmin(java.lang.String cfgDir,
                                      java.lang.String cfgFileName)
                               throws java.lang.Exception
Throws:
java.lang.Exception

executeXMLAdmin

public static boolean executeXMLAdmin(java.lang.String path)
                               throws java.lang.Exception
Throws:
java.lang.Exception

executeXMLAdminJMX

public boolean executeXMLAdminJMX(java.lang.String path)
                           throws java.lang.Exception
Reload the joramAdmin.xml file

Specified by:
executeXMLAdminJMX in interface JoramAdminMBean
Parameters:
the - path for the joramAdmin file
Throws:
AdminException - if an error occurs
java.lang.Exception

exportRepositoryToFile

public void exportRepositoryToFile(java.lang.String exportDir)
                            throws AdminException
Export the repository content to an XML file - only the destinations objects are retrieved in this version - xml script format of the admin objects (joramAdmin.xml)

Specified by:
exportRepositoryToFile in interface JoramAdminMBean
Parameters:
exportDir - target directory where the export file will be put
Throws:
AdminException - if an error occurs

getAdminFileExportXML

public java.lang.String getAdminFileExportXML()

setAdminFileExportXML

public void setAdminFileExportXML(java.lang.String adminFileExportXML)

isHa

public static boolean isHa()

setHa

public static void setHa(boolean isHa)

Joram 5.0.9

Copyright © 2005 Scalagent - All rights reserved