public enum HandlerHelper extends Enum<HandlerHelper>
This enum defines a singleton that helps to extract an AtmosphereHandler according to the
state of an AtmosphereResource.
| Modifier and Type | Class and Description |
|---|---|
static interface |
HandlerHelper.Procedure
This interface defined a method with a signature like a procedure to process an handler.
|
| Enum Constant and Description |
|---|
INSTANCE
Singleton.
|
| Modifier and Type | Method and Description |
|---|---|
void |
callHandler(org.atmosphere.cpr.AtmosphereResource resource,
Map<String,String> headers,
org.atmosphere.cpr.AtmosphereFramework framework,
boolean byId,
HandlerHelper.Procedure call)
Gets the handler associated to the mapping specified in the given
header
and applies a procedure on it. |
static HandlerHelper |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static HandlerHelper[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HandlerHelper INSTANCE
public static HandlerHelper[] values()
for (HandlerHelper c : HandlerHelper.values()) System.out.println(c);
public static HandlerHelper valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic void callHandler(org.atmosphere.cpr.AtmosphereResource resource,
Map<String,String> headers,
org.atmosphere.cpr.AtmosphereFramework framework,
boolean byId,
HandlerHelper.Procedure call)
throws IOException
Gets the handler associated to the mapping specified in the given header
and applies a procedure on it.
resource - the resourceheaders - the headers with mappingframework - the framework providing the handlercall - the procedure to callbyId - consider the Header.ID to find the handler or directly use the Header.DESTINATIONIOException - of procedure failsCopyright © 2015. All Rights Reserved.