Class MessageBuilder
- java.lang.Object
-
- com.inductiveautomation.ignition.client.gateway_interface.messages.MessageBuilder
-
- All Implemented Interfaces:
GatewayInterface.MessagePrinter
- Direct Known Subclasses:
RunPrepStmtMessage
,RunUpdateQueryMessage
public class MessageBuilder extends java.lang.Object implements GatewayInterface.MessagePrinter
This class helps build client-to-gateway comm messages. Similar to the createMessage function, but in builder-style.
-
-
Constructor Summary
Constructors Constructor Description MessageBuilder(int messageType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MessageBuilder
arg(java.lang.String name, java.lang.String value)
MessageBuilder
arg(java.lang.String name, java.lang.String[] values)
java.lang.String
build()
Builds the message string.int
getMinConnectionMode()
Minimum connection mode needed to run, or zero to always run.StatMetric
getStatMetric()
A stat metric to update when this message finishes.void
printMessage(java.io.OutputStream pw)
-
-
-
Method Detail
-
arg
public MessageBuilder arg(java.lang.String name, java.lang.String value)
-
arg
public MessageBuilder arg(java.lang.String name, java.lang.String[] values)
-
build
public java.lang.String build()
Builds the message string. If you're using this class as a MessagePrinter, you don't need to call this.
-
printMessage
public void printMessage(java.io.OutputStream pw) throws java.io.IOException
- Specified by:
printMessage
in interfaceGatewayInterface.MessagePrinter
- Throws:
java.io.IOException
-
getMinConnectionMode
public int getMinConnectionMode()
Description copied from interface:GatewayInterface.MessagePrinter
Minimum connection mode needed to run, or zero to always run.- Specified by:
getMinConnectionMode
in interfaceGatewayInterface.MessagePrinter
-
getStatMetric
public StatMetric getStatMetric()
Description copied from interface:GatewayInterface.MessagePrinter
A stat metric to update when this message finishes. Optional, may be null.- Specified by:
getStatMetric
in interfaceGatewayInterface.MessagePrinter
-
-