Package com.opentext.ia.sdk.sip
Interface Assembler<C>
-
- Type Parameters:
C
- The type of components to assemble
- All Known Implementing Classes:
InfoArchivePackagingInformationAssembler
,PdiAssembler
,PrintWriterAssembler
,SipAssembler
,TemplatePdiAssembler
,XmlPdiAssembler
public interface Assembler<C>
Assemble a product from components. The assembly process always progresses through the following stages:- Start assembling using start(DataBuffer)
- Add components to the assembly by repeatedly calling add(Object)
- Make the assembly available through end()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
add(C component)
Add a component to the assembly.void
end()
Finish the assembly process.Metrics
getMetrics()
Return metrics about the assembly process.void
start(DataBuffer product)
Start the assembly process.
-
-
-
Method Detail
-
start
void start(DataBuffer product) throws java.io.IOException
Start the assembly process.- Parameters:
product
- Storage for the assembled product- Throws:
java.io.IOException
- When an I/O error occurs
-
add
void add(C component) throws java.io.IOException
Add a component to the assembly. The assembler must be opened first.- Parameters:
component
- The component to add- Throws:
java.io.IOException
- When an I/O error occurs
-
end
void end() throws java.io.IOException
Finish the assembly process.- Throws:
java.io.IOException
- When an I/O error occurs
-
getMetrics
Metrics getMetrics()
Return metrics about the assembly process. Implementations will generally provide dedicated classes that you should cast the result to.- Returns:
- Metrics about the assembly process, or
null
if no metrics are provided
-
-