org.iqual.chaplin.composite
Interface Composite

All Superinterfaces:
ContextHandler, Injected, MessageReceiver, Meta
All Known Implementing Classes:
AbstractCompositeHandler, BinderCompositeHandler, CompositeContextHandler

public interface Composite
extends ContextHandler, Injected, Meta

Since:
Mar 30, 2009 10:13:33 PM
Author:
Zbynek Slajchrt

Method Summary
 void addComponent(String componentName, int index, Object component)
          Inserts the component to the composite.
 void bindReceiver(MessageReceiver receiver)
          Bind the receiver to this composite.
 Composite getParentComposite()
           
<T> T
getRole(String role)
           
 void removeComponent(Object component)
          Pulls the component out of the composite.
 void unbindReceiver()
          Unbind the lastly bound receiver from this composite.
 
Methods inherited from interface org.iqual.chaplin.msg.MessageReceiver
onMessageReceived
 
Methods inherited from interface org.iqual.chaplin.Injected
$$$$$$, $$$$$$
 
Methods inherited from interface org.iqual.chaplin.Meta
$$$meta$$$, $$$meta$$$
 

Method Detail

getParentComposite

Composite getParentComposite()
Returns:
the parent composite

bindReceiver

void bindReceiver(MessageReceiver receiver)
Bind the receiver to this composite. This binding is valid for the context thread only. The bound receivers precede other receivers in the composite.

Parameters:
receiver - the receiver

unbindReceiver

void unbindReceiver()
Unbind the lastly bound receiver from this composite.


getRole

<T> T getRole(String role)
Parameters:
role - the component's role
Returns:
the component whose role is role or null

addComponent

void addComponent(String componentName,
                  int index,
                  Object component)
Inserts the component to the composite.

Parameters:
componentName - the name (role) of the component in the composite
component - the component to be inserted to the composite
index - the index at which the component is inserted. The value -1 means that the component is appended at the end.

removeComponent

void removeComponent(Object component)
Pulls the component out of the composite.

Parameters:
component - the component


Copyright © 2009 iquality.org. All Rights Reserved.