Package org.thymeleaf.engine
Class SSEThrottledTemplateWriter
java.lang.Object
java.io.Writer
org.thymeleaf.engine.ThrottledTemplateWriter
org.thymeleaf.engine.SSEThrottledTemplateWriter
- All Implemented Interfaces:
Closeable,Flushable,Appendable,AutoCloseable,ISSEThrottledTemplateWriterControl,IThrottledTemplateWriterControl
class SSEThrottledTemplateWriter
extends ThrottledTemplateWriter
implements ISSEThrottledTemplateWriterControl
- Since:
- 3.0.4
-
Nested Class Summary
Nested classes/interfaces inherited from class org.thymeleaf.engine.ThrottledTemplateWriter
ThrottledTemplateWriter.IThrottledTemplateWriterAdapter -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate char[]private booleanprivate char[]private booleanprivate static final char[]private static final char[]private static final char[] -
Constructor Summary
ConstructorsConstructorDescriptionSSEThrottledTemplateWriter(String templateName, TemplateFlowController flowController) -
Method Summary
Modifier and TypeMethodDescriptionprivate static booleancheckTokenValid(char[] token) private voidvoidendEvent()voidstartEvent(char[] id, char[] event) voidwrite(char[] cbuf) voidwrite(char[] cbuf, int off, int len) voidwrite(int c) voidvoidMethods inherited from class org.thymeleaf.engine.ThrottledTemplateWriter
allow, close, flush, getMaxOverflowSize, getOverflowGrowCount, getWrittenCount, isOverflown, isStopped, setOutput, setOutputMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.thymeleaf.engine.IThrottledTemplateWriterControl
getMaxOverflowSize, getOverflowGrowCount, getWrittenCount, isOverflown, isStopped
-
Field Details
-
SSE_ID_PREFIX
private static final char[] SSE_ID_PREFIX -
SSE_EVENT_PREFIX
private static final char[] SSE_EVENT_PREFIX -
SSE_DATA_PREFIX
private static final char[] SSE_DATA_PREFIX -
id
private char[] id -
event
private char[] event -
eventHasMeta
private boolean eventHasMeta -
newEvent
private boolean newEvent
-
-
Constructor Details
-
SSEThrottledTemplateWriter
SSEThrottledTemplateWriter(String templateName, TemplateFlowController flowController)
-
-
Method Details
-
startEvent
public void startEvent(char[] id, char[] event) - Specified by:
startEventin interfaceISSEThrottledTemplateWriterControl
-
doStartEvent
- Throws:
IOException
-
endEvent
- Specified by:
endEventin interfaceISSEThrottledTemplateWriterControl- Throws:
IOException
-
write
- Overrides:
writein classThrottledTemplateWriter- Throws:
IOException
-
write
- Overrides:
writein classThrottledTemplateWriter- Throws:
IOException
-
write
- Overrides:
writein classThrottledTemplateWriter- Throws:
IOException
-
write
- Overrides:
writein classThrottledTemplateWriter- Throws:
IOException
-
write
- Overrides:
writein classThrottledTemplateWriter- Throws:
IOException
-
checkTokenValid
private static boolean checkTokenValid(char[] token)
-