Interface ComponentType

All Known Implementing Classes:
ActionExecutor, Component, ComponentCollector, ComponentCollector, ComponentProvider, ConfigurationStore, ConnectionManager, ErrorPrinter, FileStorage, FileSystemWatcher, FreeMarkerRequestHandler, HttpConnector, HttpServer, InMemorySessionManager, InputStreamMonitor, JsonConfigurationStore, LanguageSelector, MailConnectionManager, MailMonitor, MailSender, NightConfigStore, NioDispatcher, PreferencesStore, ProcessManager, PurgeTerminator, SessionManager, SocketConnectionManager, SocketConnector, SocketServer, SslCodec, StaticContentDispatcher, TomlConfigurationStore, YamlConfigurationStore

public interface ComponentType
This interface marks a class as a component.

Implementing this interface is an alternative to deriving from Component (usually because there is some other preferential inheritance relationship). Components that implement this interface (but don’t inherit from Component) aren’t inserted as vertices into the component tree; rather, they are represented in the tree by a proxy.

Classes that implement ComponentType aren’t required to implement specific methods. They must, however, declare a field for a component manager. This field must be of type Manager and annotated as ComponentManager. The implementation of the component type can use the value in this field to get access to the component hierarchy. The field is initialized when the component type is added to the component hierarchy or when calling Components.manager(ComponentType) or Components.manager(ComponentType, Channel).

The channel associated with an instance of ComponentType can be specified as attribute of the ComponentManager annotation. If no channel is specified, the proxy is used as channel (see Channel.SELF). The default can be overridden on a per instance basis by calling Components.manager(ComponentType, Channel) before the component is added to the tree.