1 50 package org.apache.avalon.excalibur.naming; 51 52 import javax.naming.NameParser ; 53 import javax.naming.spi.ObjectFactory ; 54 import javax.naming.spi.StateFactory ; 55 56 63 public class DefaultNamespace 64 extends AbstractNamespace 65 { 66 private NameParser m_nameParser; 67 68 public DefaultNamespace( final NameParser nameParser ) 69 { 70 this( nameParser, 71 new ObjectFactory [ 0 ], 72 new StateFactory [ 0 ] ); 73 } 74 75 public DefaultNamespace( final NameParser nameParser, 76 final ObjectFactory [] objectFactorySet, 77 final StateFactory [] stateFactorySet ) 78 { 79 m_nameParser = nameParser; 80 m_objectFactorySet = objectFactorySet; 81 m_stateFactorySet = stateFactorySet; 82 } 83 84 public NameParser getNameParser() 85 { 86 return m_nameParser; 87 } 88 89 public synchronized void addStateFactory( final StateFactory stateFactory ) 90 { 91 super.addStateFactory( stateFactory ); 92 } 93 94 public synchronized void addObjectFactory( final ObjectFactory objectFactory ) 95 { 96 super.addObjectFactory( objectFactory ); 97 } 98 } 99 | Popular Tags |