|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.faunos.util.net.HandletServer
com.faunos.util.net.http.HttpServer
com.faunos.util.net.http.Caroon
public class Caroon
The Caroon HTTP server.
ResponseFactoryConfig| Field Summary | |
|---|---|
protected ResponseFactorySwitch |
factorySwitch
|
| Fields inherited from class com.faunos.util.net.http.HttpServer |
|---|
app |
| Fields inherited from class com.faunos.util.net.HandletServer |
|---|
logger |
| Constructor Summary | |
|---|---|
|
Caroon(InetAddress host,
int port,
ExecutorService exec)
|
|
Caroon(InetAddress host,
int port,
ExecutorService exec,
Logger logger)
|
|
Caroon(int port)
|
protected |
Caroon(ResponseFactorySwitch factory,
InetAddress host,
int port,
ExecutorService exec,
Logger logger)
|
| Method Summary | |
|---|---|
ResponseFactory |
addMapping(String path,
ResponseFactory factory)
Adds the given URI path-to-factory mapping to the current mappings and returns the previous mapped factory, if any. |
void |
addMappings(Map<String,ResponseFactory> mappings)
Adds the given URI path-to-factory mappings to the current mappings. |
ResponseFactory |
getMapping(String path)
Returns the ResponseFactory mapped to the specified path, or null, if nothing is mapped to that path. |
SortedMap<String,ResponseFactory> |
getMappings()
Returns a read-only snapshot of the current path-to-factory mappings. |
ResponseFactory |
removeMapping(String path)
Removes the mapping for specified path and returns the old mapped ResponseFactory, if any; null otherwise. |
void |
setMappings(Map<String,ResponseFactory> mappings)
Sets the URI path-to-factory mappings. |
| Methods inherited from class com.faunos.util.net.http.HttpServer |
|---|
newHandlet |
| Methods inherited from class com.faunos.util.net.HandletServer |
|---|
inputChannel, isAlive, outputChannel, setProcessingHintThreshold, start, stop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final ResponseFactorySwitch factorySwitch
| Constructor Detail |
|---|
public Caroon(int port)
throws IOException
IOException
public Caroon(InetAddress host,
int port,
ExecutorService exec)
throws IOException
IOException
public Caroon(InetAddress host,
int port,
ExecutorService exec,
Logger logger)
throws IOException
IOException
protected Caroon(ResponseFactorySwitch factory,
InetAddress host,
int port,
ExecutorService exec,
Logger logger)
throws IOException
IOException| Method Detail |
|---|
public void setMappings(Map<String,ResponseFactory> mappings)
ResponseFactoryConfig
setMappings in interface ResponseFactoryConfigpublic SortedMap<String,ResponseFactory> getMappings()
ResponseFactoryConfig
getMappings in interface ResponseFactoryConfigpublic void addMappings(Map<String,ResponseFactory> mappings)
ResponseFactoryConfig
addMappings in interface ResponseFactoryConfig
public ResponseFactory addMapping(String path,
ResponseFactory factory)
ResponseFactoryConfig
addMapping in interface ResponseFactoryConfigpublic ResponseFactory removeMapping(String path)
ResponseFactoryConfig
removeMapping in interface ResponseFactoryConfigpublic ResponseFactory getMapping(String path)
ResponseFactoryConfig
getMapping in interface ResponseFactoryConfig
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||