public final class ComponentViewer
extends org.apache.avalon.fortress.impl.DefaultContainer
implements org.apache.avalon.framework.activity.Startable, java.awt.event.ActionListener, java.lang.Runnable
The intention of the viewer is to allow you to perform a lookup of a component manually, (currently) so you can check the see the effect of lazy vs startup initialization.
REVISIT: add a text component which tracks the log file to make it easier to see a component being initialized upon first lookup.
| Modifier and Type | Field and Description |
|---|---|
private javax.swing.JComboBox |
m_components |
private javax.swing.JFrame |
m_frame |
| Constructor and Description |
|---|
ComponentViewer() |
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent evt)
Handles the lookup event.
|
private java.lang.Object[] |
getRoles()
Helper method to obtain a list of all Roles registered with this container
|
void |
initialize()
Initializes this component.
|
void |
run() |
void |
start()
Starts the component, makes GUI visible, ready for use.
|
void |
stop()
Stops component, make GUI invisible, ready for decomissioning.
|
configure, getServiceManager, interpretProxyaddComponent, contextualize, createHintMap, createObjectFactory, dispose, get, getProxyManager, getRoleKey, has, provideComponentContext, provideServiceManager, service, setProxyManagerprivate javax.swing.JFrame m_frame
private javax.swing.JComboBox m_components
public void initialize()
throws java.lang.Exception
initialize in interface org.apache.avalon.framework.activity.Initializableinitialize in class org.apache.avalon.fortress.impl.AbstractContainerjava.lang.Exception - if an error occursprivate java.lang.Object[] getRoles()
public void start()
start in interface org.apache.avalon.framework.activity.Startablepublic void stop()
stop in interface org.apache.avalon.framework.activity.Startablepublic void actionPerformed(java.awt.event.ActionEvent evt)
actionPerformed in interface java.awt.event.ActionListenerevt - an ActionEvent valuepublic void run()
run in interface java.lang.Runnable