org.atmosphere.vertx
Class VertxAtmosphere.Builder

java.lang.Object
  extended by org.atmosphere.vertx.VertxAtmosphere.Builder
Enclosing class:
VertxAtmosphere

public static final class VertxAtmosphere.Builder
extends Object


Field Summary
protected  Class<? extends org.atmosphere.cpr.BroadcasterCache> broadcasterCache
           
protected  Class<org.atmosphere.cpr.Broadcaster> broadcasterClass
           
protected  org.atmosphere.cpr.BroadcasterFactory broadcasterFactory
           
protected  org.vertx.java.core.http.HttpServer httpServer
           
protected  Map<String,String> initParams
           
protected  List<org.atmosphere.cpr.AtmosphereInterceptor> interceptors
           
protected  Class<?> resource
           
protected  String url
           
protected  Class<? extends org.atmosphere.websocket.WebSocketProtocol> webSocketProtocol
           
 
Constructor Summary
VertxAtmosphere.Builder()
           
 
Method Summary
 VertxAtmosphere.Builder broadcaster(Class<org.atmosphere.cpr.Broadcaster> broadcasterClass)
          Configure the default Broadcaster
 VertxAtmosphere.Builder broadcasterCache(Class<? extends org.atmosphere.cpr.BroadcasterCache> broadcasterCache)
          Configure the default BroadcasterCache
 VertxAtmosphere.Builder broadcasterFactory(org.atmosphere.cpr.BroadcasterFactory broadcasterFactory)
          Configure the default BroadcasterFactory
 VertxAtmosphere build()
          Create the associated VertxAtmosphere
 VertxAtmosphere.Builder httpServer(org.vertx.java.core.http.HttpServer httpServer)
          Set the Vert.x HttpServer
 VertxAtmosphere.Builder initParam(String name, String value)
          Add some init param
 VertxAtmosphere.Builder interceptor(org.atmosphere.cpr.AtmosphereInterceptor interceptor)
          Add an AtmosphereInterceptor
 VertxAtmosphere.Builder resource(Class<?> resource)
          An annotated Atmosphere class.
 VertxAtmosphere.Builder url(String url)
           
 VertxAtmosphere.Builder webSocketProtocol(Class<? extends org.atmosphere.websocket.WebSocketProtocol> webSocketProtocol)
          Configure the default WebSocketProtocol
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

url

protected String url

httpServer

protected org.vertx.java.core.http.HttpServer httpServer

resource

protected Class<?> resource

initParams

protected final Map<String,String> initParams

webSocketProtocol

protected Class<? extends org.atmosphere.websocket.WebSocketProtocol> webSocketProtocol

broadcasterClass

protected Class<org.atmosphere.cpr.Broadcaster> broadcasterClass

broadcasterFactory

protected org.atmosphere.cpr.BroadcasterFactory broadcasterFactory

broadcasterCache

protected Class<? extends org.atmosphere.cpr.BroadcasterCache> broadcasterCache

interceptors

protected final List<org.atmosphere.cpr.AtmosphereInterceptor> interceptors
Constructor Detail

VertxAtmosphere.Builder

public VertxAtmosphere.Builder()
Method Detail

url

public VertxAtmosphere.Builder url(String url)

httpServer

public VertxAtmosphere.Builder httpServer(org.vertx.java.core.http.HttpServer httpServer)
Set the Vert.x HttpServer

Parameters:
httpServer - a Vert.x HttpServer
Returns:
this

build

public VertxAtmosphere build()
Create the associated VertxAtmosphere

Returns:
a VertxAtmosphere

resource

public VertxAtmosphere.Builder resource(Class<?> resource)
An annotated Atmosphere class. Supported annotation are org.atmosphere.config.service.ManagedService, org.atmosphere.config.service.AtmosphereHandlerService, org.atmosphere.config.service.MeteorService, org.atmosphere.config.service.WebSocketHandlerService and any Jersey resource.

Parameters:
resource -
Returns:
this;

initParam

public VertxAtmosphere.Builder initParam(String name,
                                         String value)
Add some init param

Parameters:
name - the name
value - the value
Returns:
this

broadcaster

public VertxAtmosphere.Builder broadcaster(Class<org.atmosphere.cpr.Broadcaster> broadcasterClass)
Configure the default Broadcaster

Parameters:
broadcasterClass - a Broadcaster
Returns:
this

broadcasterFactory

public VertxAtmosphere.Builder broadcasterFactory(org.atmosphere.cpr.BroadcasterFactory broadcasterFactory)
Configure the default BroadcasterFactory

Parameters:
broadcasterFactory - a BroadcasterFactory's class
Returns:
this

broadcasterCache

public VertxAtmosphere.Builder broadcasterCache(Class<? extends org.atmosphere.cpr.BroadcasterCache> broadcasterCache)
Configure the default BroadcasterCache

Parameters:
broadcasterCache - a BroadcasterCache's class
Returns:
this

webSocketProtocol

public VertxAtmosphere.Builder webSocketProtocol(Class<? extends org.atmosphere.websocket.WebSocketProtocol> webSocketProtocol)
Configure the default WebSocketProtocol

Parameters:
webSocketProtocol - a WebSocketProtocol's class
Returns:
this

interceptor

public VertxAtmosphere.Builder interceptor(org.atmosphere.cpr.AtmosphereInterceptor interceptor)
Add an AtmosphereInterceptor

Parameters:
interceptor - an AtmosphereInterceptor
Returns:


Copyright © 2013. All Rights Reserved.