当前页面:
在线文档首页 >
JBoss 4.0.1 sp1 server API Documentation 英文版文档
NamingAlias (JBoss Server API) - JBoss 4.0.1 sp1 server API Documentation 英文版文档
org.jboss.naming
Class NamingAlias
java.lang.Object
org.jboss.mx.util.JBossNotificationBroadcasterSupport
org.jboss.system.ServiceMBeanSupport
org.jboss.naming.NamingAlias
- All Implemented Interfaces:
- javax.management.MBeanRegistration, NamingAliasMBean, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, org.jboss.system.Service, org.jboss.system.ServiceMBean
- public class NamingAlias
- extends org.jboss.system.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.8 $
- Author:
- Scott Stark.
Fields inherited from class org.jboss.system.ServiceMBeanSupport |
log, server, SERVICE_CONTROLLER_SIG, serviceName |
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, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop |
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport |
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, 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.system.ServiceMBean |
getName, getState, getStateString, jbossInternalLifecycle |
Methods inherited from interface org.jboss.system.Service |
create, destroy, start, stop |
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
- 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
- Throws:
NamingException
startService
protected void startService()
throws Exception
- Throws:
Exception
stopService
protected void stopService()
throws Exception
- Throws:
Exception
Copyright © 2002 JBoss Group, LLC. All Rights Reserved.