org.exolab.jms.jndiadministration
Class OnlineConnection

java.lang.Object
  |
  +--org.exolab.jms.jndiadministration.AdminConnection
        |
        +--org.exolab.jms.jndiadministration.OnlineConnection

public class OnlineConnection
extends AdminConnection

Connects to the OpenJMSServer for all updates and requests.

Note: The OpenJMSServer must be active and in a running state for this type of connection to succeed.

Version:
$Revision: 1.6 $ $Date: 2003/08/17 01:32:23 $
Author:
Jim Mourikis
See Also:
AdminConnection, AdminMgr

Fields inherited from class org.exolab.jms.jndiadministration.AdminConnection
instance_
 
Constructor Summary
OnlineConnection(java.awt.Component parent)
          Connect to the Admin Server
 
Method Summary
 void close()
          Close the connection.
 void createContext(java.lang.String name)
          Create a new context with the given name.
 void destroyContext(java.lang.String name)
          Destroy context with the given name.
 java.util.Enumeration getAllContexts(java.lang.String name)
          Get an enumerated list of all the Contexts
 java.lang.Object lookup(java.lang.String context)
          Return the object associated with this context.
 void rebind(java.lang.String name, java.lang.Object ob)
          Rebind the context with the given object.
 void renameContext(java.lang.String oldName, java.lang.String newName)
          Rename context with the given name.
 
Methods inherited from class org.exolab.jms.jndiadministration.AdminConnection
instance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OnlineConnection

public OnlineConnection(java.awt.Component parent)
                 throws OnlineConnectionException
Connect to the Admin Server
Throws:
OnlineConnectionException - When online connection fails.
Method Detail

close

public void close()
Close the connection.
Overrides:
close in class AdminConnection

getAllContexts

public java.util.Enumeration getAllContexts(java.lang.String name)
Get an enumerated list of all the Contexts
Overrides:
getAllContexts in class AdminConnection
Returns:
Enumeration The list of contexts

lookup

public java.lang.Object lookup(java.lang.String context)
Return the object associated with this context. if none exists return null.
Overrides:
lookup in class AdminConnection
Parameters:
context - The context name
Returns:
Object The object for this context.

createContext

public void createContext(java.lang.String name)
                   throws javax.naming.NamingException
Create a new context with the given name.
Overrides:
createContext in class AdminConnection
Parameters:
name - The new context name.
Throws:
NamingException - If the context cannot be created.

destroyContext

public void destroyContext(java.lang.String name)
                    throws javax.naming.NamingException
Destroy context with the given name.
Overrides:
destroyContext in class AdminConnection
Parameters:
name - The new context name.
Throws:
NamingException - If the context cannot be created.

renameContext

public void renameContext(java.lang.String oldName,
                          java.lang.String newName)
                   throws javax.naming.NamingException
Rename context with the given name.
Overrides:
renameContext in class AdminConnection
Parameters:
oldName - The old context name
newName - The new context name
Throws:
NamingException - If the context cannot be created.

rebind

public void rebind(java.lang.String name,
                   java.lang.Object ob)
            throws javax.naming.NamingException
Rebind the context with the given object.
Overrides:
rebind in class AdminConnection
Parameters:
name - The context name
ob - The object to bind in this context
Throws:
NamingException - If the context cannot be created.


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