All Packages Class Hierarchy This Package Previous Next Index
Interface org.ginf.Layer
- public interface Layer
Layered architecture allows an efficient processing of messages
passed by reference from one layer to another.
Every layer looks at the message and evaluates the information
that it is capable to understand.
A layer can call other layers to
accomplish its work.
Example of layer initialization:
Layer service = new MyService(factory);
Layer transport = new HTTPLayer(factory);
service.connect( "transport", transport );
transport.connect( "dispatch", service );
-
dispatch(Model, Layer)
- A processing request for the layer.
dispatch
public abstract Model dispatch(Model msg,
Layer from) throws Exception
- A processing request for the layer.
Model can be modified within this call, so
call dispatch(msg.duplicate(), from) to ensure
the original model remains intact
- Parameters:
- msg - the message to dispatch
- from - which Layer the message came from
- Returns:
- Model (optional, null if none)
All Packages Class Hierarchy This Package Previous Next Index