JBoss API: Class NamingAlias

org.jboss.naming
Class NamingAlias

java.lang.Object
  |
  +--javax.management.NotificationBroadcasterSupport
        |
        +--org.jboss.util.ServiceMBeanSupport
              |
              +--org.jboss.naming.NamingAlias
All Implemented Interfaces:
javax.management.MBeanRegistration, NamingAliasMBean, javax.management.NotificationBroadcaster, Service, ServiceMBean

public class NamingAlias
extends ServiceMBeanSupport
implements NamingAliasMBean

A simple utility mbean that allows one to create an alias in the form of a LinkRef from one JNDI name to another.

Version:
$Revision: 1.1 $
Author:
Scott_Stark@displayscape.com

Fields inherited from class org.jboss.util.ServiceMBeanSupport
log, server
 
Fields inherited from interface org.jboss.util.ServiceMBean
STARTED, STARTING, states, STOPPED, STOPPING
 
Constructor Summary
NamingAlias()
          Creates new NamingAlias
NamingAlias(java.lang.String fromName, java.lang.String toName)
           
 
Method Summary
 java.lang.String getFromName()
          Get the from name of the alias.
 java.lang.String getName()
           
 java.lang.String getToName()
          Get the to name of the alias.
 void setFromName(java.lang.String name)
          Set the from name of the alias.
 void setToName(java.lang.String name)
          Set the to name of the alias.
 void startService()
           
 void stopService()
           
 
Methods inherited from class org.jboss.util.ServiceMBeanSupport
destroy, destroyService, getObjectName, getServer, getState, getStateString, init, initService, nextSequenceNumber, postDeregister, postRegister, preDeregister, preRegister, start, stop
 
Methods inherited from class javax.management.NotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.util.ServiceMBean
getState, getStateString
 
Methods inherited from interface org.jboss.util.Service
destroy, init, start, stop
 

Constructor Detail

NamingAlias

public NamingAlias()
Creates new NamingAlias

NamingAlias

public NamingAlias(java.lang.String fromName,
                   java.lang.String toName)
Method Detail

getFromName

public java.lang.String getFromName()
Description copied from interface: NamingAliasMBean
Get the from name of the alias. This is the location where the LinkRef is bound under JNDI.
Specified by:
getFromName in interface NamingAliasMBean
Following copied from interface: org.jboss.naming.NamingAliasMBean
Returns:
the location of the LinkRef

setFromName

public void setFromName(java.lang.String name)
                 throws javax.naming.NamingException
Description copied from interface: NamingAliasMBean
Set the from name of the alias. This is the location where the LinkRef is bound under JNDI.
Specified by:
setFromName in interface NamingAliasMBean
Following copied from interface: org.jboss.naming.NamingAliasMBean
Parameters:
name, - the location where the LinkRef will be bound

getToName

public java.lang.String getToName()
Description copied from interface: NamingAliasMBean
Get the to name of the alias. This is the target name to which the LinkRef refers. The name is a URL, or a name to be resolved relative to the initial context, or if the first character of the name is ".", the name is relative to the context in which the link is bound.
Specified by:
getToName in interface NamingAliasMBean
Following copied from interface: org.jboss.naming.NamingAliasMBean
Returns:
the target JNDI name of the alias.

setToName

public void setToName(java.lang.String name)
               throws javax.naming.NamingException
Description copied from interface: NamingAliasMBean
Set the to name of the alias. This is the target name to which the LinkRef refers. The name is a URL, or a name to be resolved relative to the initial context, or if the first character of the name is ".", the name is relative to the context in which the link is bound.
Specified by:
setToName in interface NamingAliasMBean
Following copied from interface: org.jboss.naming.NamingAliasMBean
Parameters:
name, - the target JNDI name of the alias.

getName

public java.lang.String getName()
Specified by:
getName in interface ServiceMBean
Overrides:
getName in class ServiceMBeanSupport

startService

public void startService()
                  throws java.lang.Exception
Overrides:
startService in class ServiceMBeanSupport

stopService

public void stopService()
Overrides:
stopService in class ServiceMBeanSupport


Copyright © 2000 The JBoss Organization. All Rights Reserved.