Users guide
Architecture
Demo applications
Plugins
Porting Guide
Development Roles
Introduction
Administrator
Deployer
Assembler
Block Developer
Project Info
License
Mailing lists
IRC
Source repositories
Issue tracking
Blog entries
Team
|
|||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||
Users guideArchitecture Development RolesIntroduction Project InfoLicense |
assembly.xml
The Assembly FileThe assembly.xml file defines how to assemble the application. It defines the blocks that make up the application, and how to connect them together. It also defines the application listeners to include in the application. In previous versions, configuration data was also stored in the assembly file. This is no longer the case; Configuration is now stored in a separate Configuration File. The root element of the assembly file must be an <assembly> element. The root element must contain a child element for each block and application listener which is part of the application. These elements are described below. The block ElementThe <block> element defines a block, and how to provide services to the block. The <block> element takes the following attributes:
The provide ElementThe <provide> element defines how to provide a particular service to the block. It connects the block to another block that provides the required service. There must be at least one <provide> element for each dependency listed in the block's metadata descriptor. For array and mapped services, there may be more than one <provide> element for each dependency. The <provide> element takes the following attributes:
The proxy ElementThe <proxy> element controls whether Loom will wrap the block with a proxy object before supplying it to other blocks. This element is optional. If it does not exist, the default value of false is used. The <proxy> element takes the following attributes:
The listener ElementThe <listener> element defines an application listener. The <listener> element takes the following attributes:
The block-listener Element (Deprecated)The <block-listener> element defines a block listener. Note that the use of block listeners is deprecated. The <block-listener> element takes the same attributes as the <listener> element. Sample Assembly FileBelow is an example assembly file. It defines 2 blocks, called myAuthorizer and myBlock, and a listener. Block myBlock uses the Authorizer service provided by block myAuthorizer. <?xml version="1.0"?> <assembly> <block name="myAuthorizer" class="com.biz.cornerstone.blocks.MyAuthorizer"> </block> <block name="myBlock" class="com.biz.cornerstone.blocks.MyBlock"> <provide name="myAuthorizer" role="com.biz.cornerstone.services.Authorizer"/> <proxy disable="true"/> </block> <listener name="myListener" class="com.biz.cornerstone.listeners.MyListener"> </listener> </assembly> |
||||||||||||||||||||||||
|
Copyright 2003-2006 - The Codehaus. All rights reserved unless otherwise noted.
Powered by Atlassian Confluence
|
|||||||||||||||||||||||||