Class HttpWebSocketRequestHandler

java.lang.Object
dev.voidframework.web.server.http.HttpWebSocketRequestHandler

public final class HttpWebSocketRequestHandler extends Object
WebSocket incoming connection handler.
Since:
1.3.0
  • Field Details

  • Constructor Details

    • HttpWebSocketRequestHandler

      public HttpWebSocketRequestHandler(com.google.inject.Injector injector)
      Build a new instance.
      Parameters:
      injector - The injector instance
      Since:
      1.3.0
  • Method Details

    • onIncomingConnection

      public void onIncomingConnection(WebSocketContext context) throws IOException
      This method is called each time the framework need to handle an incoming WebSocket connection.
      Parameters:
      context - The WebSocket context
      Throws:
      IOException - if something goes wrong with the newly open connection
      Since:
      1.3.0
    • convertValueToParameterType

      protected Object convertValueToParameterType(String value, Class<?> parameterTypeClass)
      Try to convert value from a String into the needed parameter type.
      Parameters:
      value - The string containing the value to convert
      parameterTypeClass - The needed output parameter type class
      Returns:
      The converter value, otherwise, null
      Since:
      1.3.0
    • convertValuesToParameterTypeArray

      protected Object convertValuesToParameterTypeArray(List<String> valueList, Class<?> parameterTypeClass)
      Try to convert multiple values from a String into an array of needed parameter type.
      Parameters:
      valueList - The list of string containing the value to convert
      parameterTypeClass - The needed output parameter type class
      Returns:
      The converter values as array, otherwise, null
      Since:
      1.3.0