1 17 18 package org.apache.avalon.fortress.impl; 19 20 import org.apache.avalon.framework.configuration.Configuration; 21 22 28 public final class ComponentHandlerMetaData 29 { 30 31 public static final int ACTIVATION_INLINE = 0; 32 33 36 public static final int ACTIVATION_BACKGROUND = 1; 37 38 40 public static final int ACTIVATION_LAZY = 2; 41 42 private final String m_name; 43 private final String m_classname; 44 private final Configuration m_configuration; 45 private final int m_activation; 46 47 58 public ComponentHandlerMetaData( final String name, 59 final String classname, 60 final Configuration configuration, 61 final int activation ) 62 { 63 if ( null == name ) 64 { 65 throw new NullPointerException ( "name" ); 66 } 67 if ( null == classname ) 68 { 69 throw new NullPointerException ( "classname" ); 70 } 71 if ( null == configuration ) 72 { 73 throw new NullPointerException ( "configuration" ); 74 } 75 76 m_name = name; 77 m_classname = classname; 78 m_configuration = configuration; 79 m_activation = activation; 80 } 81 82 94 public ComponentHandlerMetaData( final String name, 95 final String classname, 96 final Configuration configuration, 97 final boolean lazyActivation ) 98 { 99 this( name, classname, configuration, 100 ( lazyActivation ? ACTIVATION_LAZY : ACTIVATION_BACKGROUND ) ); 101 } 102 103 107 public String getName() 108 { 109 return m_name; 110 } 111 112 116 public String getClassname() 117 { 118 return m_classname; 119 } 120 121 125 public Configuration getConfiguration() 126 { 127 return m_configuration; 128 } 129 130 135 public int getActivation() 136 { 137 return m_activation; 138 } 139 140 146 public boolean isLazyActivation() 147 { 148 return m_activation == ACTIVATION_LAZY; 149 } 150 } 151 | Popular Tags |