Package org.thymeleaf.engine
Class SSEThrottledTemplateWriter
- java.lang.Object
-
- java.io.Writer
-
- org.thymeleaf.engine.ThrottledTemplateWriter
-
- org.thymeleaf.engine.SSEThrottledTemplateWriter
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.Appendable,java.lang.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
Fields Modifier and Type Field Description private char[]eventprivate booleaneventHasMetaprivate char[]idprivate booleannewEventprivate static char[]SSE_DATA_PREFIXprivate static char[]SSE_EVENT_PREFIXprivate static char[]SSE_ID_PREFIX
-
Constructor Summary
Constructors Constructor Description SSEThrottledTemplateWriter(java.lang.String templateName, TemplateFlowController flowController)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static booleancheckTokenValid(char[] token)private voiddoStartEvent()voidendEvent()voidstartEvent(char[] id, char[] event)voidwrite(char[] cbuf)voidwrite(char[] cbuf, int off, int len)voidwrite(int c)voidwrite(java.lang.String str)voidwrite(java.lang.String str, int off, int len)-
Methods inherited from class org.thymeleaf.engine.ThrottledTemplateWriter
allow, close, flush, getMaxOverflowSize, getOverflowGrowCount, getWrittenCount, isOverflown, isStopped, setOutput, setOutput
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.thymeleaf.engine.IThrottledTemplateWriterControl
getMaxOverflowSize, getOverflowGrowCount, getWrittenCount, isOverflown, isStopped
-
-
-
-
Field Detail
-
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 Detail
-
SSEThrottledTemplateWriter
SSEThrottledTemplateWriter(java.lang.String templateName, TemplateFlowController flowController)
-
-
Method Detail
-
startEvent
public void startEvent(char[] id, char[] event)- Specified by:
startEventin interfaceISSEThrottledTemplateWriterControl
-
doStartEvent
private void doStartEvent() throws java.io.IOException- Throws:
java.io.IOException
-
endEvent
public void endEvent() throws java.io.IOException- Specified by:
endEventin interfaceISSEThrottledTemplateWriterControl- Throws:
java.io.IOException
-
write
public void write(int c) throws java.io.IOException- Overrides:
writein classThrottledTemplateWriter- Throws:
java.io.IOException
-
write
public void write(java.lang.String str) throws java.io.IOException- Overrides:
writein classThrottledTemplateWriter- Throws:
java.io.IOException
-
write
public void write(java.lang.String str, int off, int len) throws java.io.IOException- Overrides:
writein classThrottledTemplateWriter- Throws:
java.io.IOException
-
write
public void write(char[] cbuf) throws java.io.IOException- Overrides:
writein classThrottledTemplateWriter- Throws:
java.io.IOException
-
write
public void write(char[] cbuf, int off, int len) throws java.io.IOException- Overrides:
writein classThrottledTemplateWriter- Throws:
java.io.IOException
-
checkTokenValid
private static boolean checkTokenValid(char[] token)
-
-