org.vertx.java.core.http.impl

## Class WebSocketMatcher

- java.lang.Object
- - org.vertx.java.core.http.impl.WebSocketMatcher

All Implemented Interfaces:
  Handler<ServerWebSocket>

    public class WebSocketMatcher
    extends java.lang.Object
    implements Handler<ServerWebSocket>

### Nested Class Summary

Nested Classes
`static class` `WebSocketMatcher.Match`

### Constructor Summary

Constructors
Constructor and Description
`WebSocketMatcher()`

### Method Summary

Methods
`void` `addPattern(java.lang.String pattern, Handler<WebSocketMatcher.Match> handler)`
`void` `addRegEx(java.lang.String regex, Handler<WebSocketMatcher.Match> handler)`
`void` `handle(ServerWebSocket ws)` Something has happened, so handle it.
`void` `noMatch(Handler<WebSocketMatcher.Match> handler)` Specify a handler that will be called when no other handlers match.

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

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

### Constructor Detail

#### WebSocketMatcher

    public WebSocketMatcher()

### Method Detail

#### handle

    public void handle(ServerWebSocket ws)

Description copied from interface: `Handler`
Something has happened, so handle it.

Specified by:
  `handle` in interface `Handler<ServerWebSocket>`

#### addRegEx

    public void addRegEx(java.lang.String regex,
                Handler<WebSocketMatcher.Match> handler)

#### addPattern

    public void addPattern(java.lang.String pattern,
                  Handler<WebSocketMatcher.Match> handler)

#### noMatch

    public void noMatch(Handler<WebSocketMatcher.Match> handler)

Specify a handler that will be called when no other handlers match. If this handler is not specified default behaviour is to reject the websocket (i.e. return 404 to the websocket client in the handshake)

Parameters:
  `handler` -