|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.languagecomputer.server.WebServer
public class WebServer
Web services container / driver. Uses the Jetty java application server with the Apache CXF web services framework to expose java classes as SOAP endpoints. Can be started from the command line or embedded into existing code.
Field Summary | |
---|---|
protected static Boolean |
loggingInitialized
|
protected org.mortbay.jetty.Server |
server
|
protected org.apache.cxf.transport.servlet.AbstractCXFServlet |
servlet
|
protected SessionManager |
sessionManager
|
Constructor Summary | |
---|---|
WebServer(int port,
File configFile)
Main constructor. |
Method Summary | |
---|---|
protected SessionManager |
getSessionManager()
Returns the SessionManager in use by this WebServer . |
static void |
main(String[] args)
Sample driver code. |
void |
publish(String name,
Object service)
Publishes a web service endpoint for the specified object. |
void |
start()
Starts the server. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static Boolean loggingInitialized
protected org.mortbay.jetty.Server server
protected org.apache.cxf.transport.servlet.AbstractCXFServlet servlet
protected final SessionManager sessionManager
Constructor Detail |
---|
public WebServer(int port, File configFile)
port
- The port number on which the server will run.configFile
- Configuration file
for the services.Method Detail |
---|
protected SessionManager getSessionManager()
SessionManager
in use by this WebServer
.
public void publish(String name, Object service)
name
- Name under which the endpoint will be published. This will
determine the url
of the service.service
- Object that is providing the web service interaction. The
object should be annotated with WebService
.public void start()
public static void main(String[] args) throws Exception
args
- Command line arguments. Expects the services config file as
the first argument and a list of the services to run as remaining args.
Exception
- In the case of some sort of system failure.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |