org.atmosphere.util
Class DefaultEndpointMapper<U>

java.lang.Object
  extended by org.atmosphere.util.DefaultEndpointMapper<U>
All Implemented Interfaces:
EndpointMapper<U>

public class DefaultEndpointMapper<U>
extends Object
implements EndpointMapper<U>

Default implementation of the EndpointMapper used by the AsynchronousProcessor and DefaultWebSocketProcessor

Author:
Jeanfrancois Arcand

Constructor Summary
DefaultEndpointMapper()
           
 
Method Summary
 String computePath(AtmosphereRequest req)
           
 void configure(AtmosphereConfig config)
           
 U map(AtmosphereRequest req, Map<String,U> handlers)
          Mape the request to its associated endpoint.
 U map(String path, Map<String,U> handlers)
          Mape the request to its associated endpoint.
protected  U match(String path, Map<String,U> handlers)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultEndpointMapper

public DefaultEndpointMapper()
Method Detail

match

protected U match(String path,
                  Map<String,U> handlers)

computePath

public String computePath(AtmosphereRequest req)

configure

public void configure(AtmosphereConfig config)
Specified by:
configure in interface EndpointMapper<U>

map

public U map(AtmosphereRequest req,
             Map<String,U> handlers)
Description copied from interface: EndpointMapper
Mape the request to its associated endpoint.

Specified by:
map in interface EndpointMapper<U>
Parameters:
req - an AtmosphereRequest
handlers - a map used for mapping the request to.
Returns:
U the result, or null if not mapped

map

public U map(String path,
             Map<String,U> handlers)
Description copied from interface: EndpointMapper
Mape the request to its associated endpoint.

Specified by:
map in interface EndpointMapper<U>
Parameters:
path - a URI
handlers - a map used for mapping the request to.
Returns:
U the result, or null if not mapped


Copyright © 2014. All Rights Reserved.