Package org.apache.felix.http.base.internal.handler

# Class WebSocketHandler

java.lang.Object
org.apache.felix.http.base.internal.handler.WebSocketHandler

public final class WebSocketHandler extends Object
Class that handles initialization for servlets extending JettyWebSocketServlet.

## Constructor Summary

Constructors
Constructor
Description
`WebSocketHandler(ServletHandler servletHandler)`

## Method Summary

Modifier and Type
Method
Description
`static boolean`
`isJettyWebSocketServlet(Object servlet)`
Check if the servlet is a JettyWebSocketServlet.
`void`
`lazyInit()`
`boolean`
`shouldDestroy()`
Returns true if the servlet was initialized earlier, false otherwise.
`boolean`
`shouldInit()`
Returns true if the servlet should be initialized, false otherwise.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### WebSocketHandler

public WebSocketHandler(ServletHandler servletHandler)

## Method Details

### lazyInit

public void lazyInit()

### shouldInit

public boolean shouldInit()
Returns true if the servlet should be initialized, false otherwise.

Returns:
  true if the servlet should be initialized, false otherwise

### shouldDestroy

public boolean shouldDestroy()
Returns true if the servlet was initialized earlier, false otherwise.

Returns:
  true if the servlet should be destroyed, false otherwise

### isJettyWebSocketServlet

public static boolean isJettyWebSocketServlet(Object servlet)
Check if the servlet is a JettyWebSocketServlet. JettyWebSocket classes are handled differently due to FELIX-6746.

Parameters:
  `servlet` - the servlet to check
Returns:
  true if the servlet is a JettyWebSocketServlet, false otherwise