Package org.yamcs.tse
Class RequestTerminator
- java.lang.Object
-
- org.yamcs.tse.RequestTerminator
-
- All Implemented Interfaces:
Interceptor
public class RequestTerminator extends Object implements Interceptor
Adds a termination pattern to the end of command string. This is typically used on stream-oriented protocols like TCP for delimiting messages.
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONFIG_TERMINATION
-
Constructor Summary
Constructors Constructor Description RequestTerminator(YConfiguration config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]interceptCommand(TseCommand metadata, byte[] bytes, Charset encoding)Intercepts a raw command just before passing it to driver-specific write logic.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.yamcs.tse.Interceptor
interceptResponse
-
-
-
-
Field Detail
-
CONFIG_TERMINATION
public static final String CONFIG_TERMINATION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RequestTerminator
public RequestTerminator(YConfiguration config)
-
-
Method Detail
-
interceptCommand
public byte[] interceptCommand(TseCommand metadata, byte[] bytes, Charset encoding)
Description copied from interface:InterceptorIntercepts a raw command just before passing it to driver-specific write logic.Usually this corresponds to an encoded string, for which the encoding is provided too.
- Specified by:
interceptCommandin interfaceInterceptor- Parameters:
metadata- Metadata about the command. Note that full information is only available if the command was issued through Yamcs. If instead an internal Telnet session was used, only the target instrument is known.bytes- The raw command (usually correspons to an encoded string)encoding- String encoding
-
-