org.jboss.naming
Class NamingAlias
java.lang.Object
org.jboss.mx.util.JBossNotificationBroadcasterSupport
org.jboss.system.ServiceMBeanSupport
org.jboss.naming.NamingAlias
- All Implemented Interfaces:
- MBeanRegistration, NotificationBroadcaster, NotificationEmitter, org.jboss.kernel.spi.dependency.KernelControllerContextAware, NamingAliasMBean, 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: 81030 $
- Author:
- Scott Stark.
Fields inherited from interface org.jboss.system.ServiceMBean |
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
Methods inherited from class org.jboss.system.ServiceMBeanSupport |
create, createService, destroy, destroyService, getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, pojoChange, pojoCreate, pojoDestroy, pojoStart, pojoStop, postDeregister, postRegister, preDeregister, preRegister, setKernelControllerContext, start, stop, unsetKernelControllerContext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NamingAlias
public NamingAlias()
NamingAlias
public NamingAlias(String fromName,
String toName)
getFromName
public String getFromName()
- Get the from name of the alias. This is the location where the
LinkRef is bound under JNDI.
- Specified by:
getFromName
in interface NamingAliasMBean
- Returns:
- the location of the LinkRef
setFromName
public void setFromName(String name)
throws NamingException
- Set the from name of the alias. This is the location where the
LinkRef is bound under JNDI.
- Specified by:
setFromName
in interface NamingAliasMBean
- Parameters:
name,
- the location where the LinkRef will be bound
- Throws:
NamingException
getToName
public String getToName()
- 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
- Returns:
- the target JNDI name of the alias.
setToName
public void setToName(String name)
throws NamingException
- 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
- Parameters:
name,
- the target JNDI name of the alias.
- Throws:
NamingException
startService
protected void startService()
throws Exception
- Overrides:
startService
in class ServiceMBeanSupport
- Throws:
Exception
stopService
protected void stopService()
throws Exception
- Overrides:
stopService
in class ServiceMBeanSupport
- Throws:
Exception
Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.