|
Alignment API and Server 3.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.inrialpes.exmo.align.service.HTMLAServProfile
public class HTMLAServProfile
HTMLAServProfile: an HTML provile for the Alignment server It embeds an HTTP server.
Nested Class Summary | |
---|---|
private class |
HTMLAServProfile.Chain
|
private class |
HTMLAServProfile.ParameterServletResponseWrapper
Two private cclasses for retrieving parameters |
class |
HTMLAServProfile.Response
HTTP response. |
Field Summary | |
---|---|
private int |
debug
|
static String |
HTTP_BADREQUEST
Some HTTP response status codes |
static String |
HTTP_FORBIDDEN
Some HTTP response status codes |
static String |
HTTP_INTERNALERROR
Some HTTP response status codes |
static String |
HTTP_NOTFOUND
Some HTTP response status codes |
static String |
HTTP_NOTIMPLEMENTED
Some HTTP response status codes |
static String |
HTTP_OK
Some HTTP response status codes |
static String |
HTTP_REDIRECT
Some HTTP response status codes |
private int |
localId
|
private AServProtocolManager |
manager
|
static int |
MAX_FILE_SIZE
|
static String |
MIME_DEFAULT_BINARY
Common mime types for dynamic content |
static String |
MIME_HTML
Common mime types for dynamic content |
static String |
MIME_PLAINTEXT
Common mime types for dynamic content |
static String |
MIME_XML
Common mime types for dynamic content |
private String |
myId
|
private org.mortbay.jetty.Server |
server
|
private String |
serverId
|
private String |
tcpHost
|
private int |
tcpPort
|
private WSAServProfile |
wsmanager
|
Constructor Summary | |
---|---|
HTMLAServProfile()
|
Method Summary | |
---|---|
protected String |
about()
|
HTMLAServProfile.Response |
adminAnswer(String uri,
String perf,
Properties header,
Parameters params)
HTTP administration interface Allows some limited administration of the server through HTTP |
void |
close()
Je//: should certainly do more than that! |
private void |
decodeParms(String parms,
Properties p)
|
private String |
displayAnswer(Message answer)
|
HTMLAServProfile.Response |
htmlAnswer(String uri,
String perf,
Properties header,
Parameters params)
User friendly HTTP interface uses the protocol but offers user-targeted interaction |
void |
init(Parameters params,
AServProtocolManager manager)
Starts a HTTP server to given port. |
private int |
newId()
|
HTMLAServProfile.Response |
returnAlignment(String uri)
Returns the alignment in RDF/XML |
HTMLAServProfile.Response |
serve(String uri,
String method,
Properties header,
Properties parms)
Override this to customize the server. |
private String |
testErrorMessages(Message answer)
|
HTMLAServProfile.Response |
wsdlAnswer(String uri,
String perf,
Properties header,
Parameters params)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int tcpPort
private String tcpHost
private int debug
private org.mortbay.jetty.Server server
private AServProtocolManager manager
private WSAServProfile wsmanager
private String myId
private String serverId
private int localId
public static final String HTTP_OK
public static final String HTTP_REDIRECT
public static final String HTTP_FORBIDDEN
public static final String HTTP_NOTFOUND
public static final String HTTP_BADREQUEST
public static final String HTTP_INTERNALERROR
public static final String HTTP_NOTIMPLEMENTED
public static final String MIME_PLAINTEXT
public static final String MIME_HTML
public static final String MIME_XML
public static final String MIME_DEFAULT_BINARY
public static final int MAX_FILE_SIZE
Constructor Detail |
---|
public HTMLAServProfile()
Method Detail |
---|
public void init(Parameters params, AServProtocolManager manager) throws AServException
Throws an IOException if the socket is already in use
init
in interface AlignmentServiceProfile
AServException
public void close()
close
in interface AlignmentServiceProfile
public HTMLAServProfile.Response serve(String uri, String method, Properties header, Properties parms)
(By default, this delegates to serveFile() and allows directory listing.)
uri
- Percent-decoded URI without parameters, for example "/index.cgi"method
- "GET", "POST" etc.parms
- Parsed, percent decoded parameters from URI and, in case of POST, data.header
- Header entries, percent decoded
protected String about()
public HTMLAServProfile.Response adminAnswer(String uri, String perf, Properties header, Parameters params)
public HTMLAServProfile.Response returnAlignment(String uri)
public HTMLAServProfile.Response htmlAnswer(String uri, String perf, Properties header, Parameters params)
public HTMLAServProfile.Response wsdlAnswer(String uri, String perf, Properties header, Parameters params)
private String testErrorMessages(Message answer)
private String displayAnswer(Message answer)
private int newId()
private void decodeParms(String parms, Properties p) throws InterruptedException
InterruptedException
|
Alignment API and Server 3.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |