|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.replicator.http.ReplicationService
public class ReplicationService
A server-side service for handling replication requests. The service assumes
requests are sent in the format
/<context>/<shard>/<action>
where
context
is the servlet context, e.g. REPLICATION_CONTEXT
shard
is the ID of the shard, e.g. "s1"
action
is one of ReplicationService.ReplicationAction
values
http://host:port/replicate/s1/update
.
This service is written like a servlet, and
perform(HttpServletRequest, HttpServletResponse)
takes servlet
request and response accordingly, so it is quite easy to embed in your
application's servlet.
Nested Class Summary | |
---|---|
static class |
ReplicationService.ReplicationAction
Actions supported by the ReplicationService . |
Field Summary | |
---|---|
static String |
REPLICATE_FILENAME_PARAM
Request parameter name for providing the file's name. |
static String |
REPLICATE_SESSION_ID_PARAM
Request parameter name for providing a session ID. |
static String |
REPLICATE_SOURCE_PARAM
Request parameter name for providing the file's source. |
static String |
REPLICATE_VERSION_PARAM
Request parameter name for providing the revision version. |
static String |
REPLICATION_CONTEXT
The context path for the servlet. |
Constructor Summary | |
---|---|
ReplicationService(Map<String,Replicator> replicators)
|
Method Summary | |
---|---|
void |
perform(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Executes the replication task. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String REPLICATION_CONTEXT
public static final String REPLICATE_VERSION_PARAM
public static final String REPLICATE_SESSION_ID_PARAM
public static final String REPLICATE_SOURCE_PARAM
public static final String REPLICATE_FILENAME_PARAM
Constructor Detail |
---|
public ReplicationService(Map<String,Replicator> replicators)
Method Detail |
---|
public void perform(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException
javax.servlet.ServletException
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |