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.setDataDescription(String dataDescription) Description of the broadcast data parameter.setMethodDescription(String methodDescription) Broadcast (push) description.setMethodName(String methodName) Broadcast method name, used only during client code generation.
-
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. -
setDataDescription
Description of the broadcast data parameter.- Returns:
this.
-
setMethodName
Broadcast method name, used only during client code generation.- Returns:
this.
-
setMethodDescription
Broadcast (push) description.- Returns:
this.
-