Class BroadcastDocumentBuilder
java.lang.Object
com.iohao.net.framework.core.doc.BroadcastDocumentBuilder
Builder for constructing
BroadcastDocument instances that describe
server-push routes, their data types, and method metadata.- Since:
- 21.11
- Author:
- 渔民小镇
- date:
- 2024-07-05
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the broadcast document.voidBuild the broadcast document and register it withDocumentHelper.setDataClass(Class<?> dataClass) Set the broadcast data type.setDataClass(Class<?> dataClass, String dataDescription) Set the broadcast data type with an optional description.setDataClassList(Class<?> dataClass) Set the broadcast data type as a List of the given class.setDataClassList(Class<?> dataClass, String dataDescription) Set the broadcast data type as a List with an optional description.
-
Method Details
-
setDataClassList
Set the broadcast data type as a List of the given class.- Parameters:
dataClass- the element type of the list- Returns:
- this builder
-
setDataClassList
Set the broadcast data type as a List with an optional description.- Parameters:
dataClass- the element type of the listdataDescription- optional description of the data- Returns:
- this builder
-
setDataClass
Set the broadcast data type.- Parameters:
dataClass- the data type class- Returns:
- this builder
-
setDataClass
Set the broadcast data type with an optional description.- Parameters:
dataClass- the data type classdataDescription- optional description of the data- Returns:
- this builder
-
build
Build the broadcast document.- Returns:
- the constructed
BroadcastDocument
-
buildToDocument
public void buildToDocument()Build the broadcast document and register it withDocumentHelper.
-