Package org.atmosphere.room
Class RoomInterceptor
java.lang.Object
org.atmosphere.cpr.AtmosphereInterceptorAdapter
org.atmosphere.room.RoomInterceptor
- All Implemented Interfaces:
AtmosphereInterceptor,AtmosphereConfigAware,InvokationOrder
Interceptor that auto-joins resources to rooms based on URL path.
Given a base path (default /room/), any request to
/room/lobby will auto-join the resource to a room named "lobby".
// Configure with framework
RoomManager rooms = RoomManager.create(framework);
framework.interceptor(new RoomInterceptor(rooms));
// Or with a custom base path
framework.interceptor(new RoomInterceptor(rooms, "/chat/"));
- Since:
- 4.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.atmosphere.interceptor.InvokationOrder
InvokationOrder.PRIORITY -
Field Summary
Fields inherited from interface org.atmosphere.interceptor.InvokationOrder
AFTER_DEFAULT, BEFORE_DEFAULT, FIRST_BEFORE_DEFAULT -
Constructor Summary
ConstructorsConstructorDescriptionRoomInterceptor(RoomManager roomManager) RoomInterceptor(RoomManager roomManager, String basePath) -
Method Summary
Modifier and TypeMethodDescriptionInvoked before anAtmosphereResourcegets dispatched toAtmosphereHandler.toString()Methods inherited from class org.atmosphere.cpr.AtmosphereInterceptorAdapter
configure, destroy, postInspect, priority
-
Constructor Details
-
RoomInterceptor
-
RoomInterceptor
-
-
Method Details
-
inspect
Description copied from interface:AtmosphereInterceptorInvoked before anAtmosphereResourcegets dispatched toAtmosphereHandler.- Specified by:
inspectin interfaceAtmosphereInterceptor- Overrides:
inspectin classAtmosphereInterceptorAdapter- Parameters:
r- aAtmosphereResource- Returns:
Action.CONTINUEorAction.SUSPENDto dispatch theAtmosphereResourceto otherAtmosphereInterceptororAtmosphereHandler. ReturnAction.TYPE.CANCELLEDto stop the processing.
-
toString
- Overrides:
toStringin classAtmosphereInterceptorAdapter
-