1 8 package org.codehaus.spice.jndikit; 9 10 import javax.naming.NameParser ; 11 import javax.naming.spi.ObjectFactory ; 12 import javax.naming.spi.StateFactory ; 13 14 20 public class DefaultNamespace 21 extends AbstractNamespace 22 { 23 private NameParser m_nameParser; 24 25 public DefaultNamespace( final NameParser nameParser ) 26 { 27 this( nameParser, 28 new ObjectFactory [ 0 ], 29 new StateFactory [ 0 ] ); 30 } 31 32 public DefaultNamespace( final NameParser nameParser, 33 final ObjectFactory [] objectFactorySet, 34 final StateFactory [] stateFactorySet ) 35 { 36 m_nameParser = nameParser; 37 m_objectFactorySet = objectFactorySet; 38 m_stateFactorySet = stateFactorySet; 39 } 40 41 public NameParser getNameParser() 42 { 43 return m_nameParser; 44 } 45 46 public synchronized void addStateFactory( final StateFactory stateFactory ) 47 { 48 super.addStateFactory( stateFactory ); 49 } 50 51 public synchronized void addObjectFactory( final ObjectFactory objectFactory ) 52 { 53 super.addObjectFactory( objectFactory ); 54 } 55 } 56 | Popular Tags |