java.lang.Object
org.eclipse.jetty.websocket.javax.common.decoders.AbstractDecoder
org.eclipse.jetty.websocket.javax.common.decoders.BooleanDecoder
All Implemented Interfaces:
javax.websocket.Decoder, javax.websocket.Decoder.Text<Boolean>

public class BooleanDecoder extends AbstractDecoder implements javax.websocket.Decoder.Text<Boolean>
Default implementation of the Decoder.Text Message to Boolean decoder.

Note: delegates to Boolean.parseBoolean(String) and will only support "true" and "false" as boolean values.

  • Field Details

  • Constructor Details

    • BooleanDecoder

      public BooleanDecoder()
  • Method Details

    • decode

      public Boolean decode(String s) throws javax.websocket.DecodeException
      Specified by:
      decode in interface javax.websocket.Decoder.Text<Boolean>
      Throws:
      javax.websocket.DecodeException
    • willDecode

      public boolean willDecode(String s)
      Specified by:
      willDecode in interface javax.websocket.Decoder.Text<Boolean>