org.openxri.servlet
Class XRIServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.openxri.servlet.XRIServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class XRIServlet
extends javax.servlet.http.HttpServlet

Provides a servlet implementation for the XRI resolution protocol The XRIServlet works like this: 1) During startup, construct an appropriate implementation of the ServerConfig interface, according to the init parameters in web.xml. 2) When a request comes in, use the URIMapper to parse it. 3) If the URIMapper does not know what to do with it, hand off the request to the Plugin. 4) Let the Server implementation class build an XRDS for the request data extracted by the URIMapper. 5) Send out the descriptor.

Author:
bgs, =chetan, =peacekeeper
See Also:
Serialized Form

Field Summary
protected static org.apache.commons.logging.Log log
           
protected  Plugin plugin
          The plugin that will handle all requests not recognized by the URI mapper
protected  Server server
          The server object that will handle the incoming resolution requests
protected  ServerConfig serverConfig
          The server configuration read from the XML file.
protected  URIMapper uriMapper
          The URI mapper that will tell us what to resolve
 
Constructor Summary
XRIServlet()
           
 
Method Summary
static boolean checkSigned(javax.servlet.http.HttpServletRequest request)
          This method can check whether the client requests SAML trusted resolution.
 void destroy()
           
 void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Service an incoming request.
 void init()
           
 void init(ServerConfig serverConfig)
          Initializes the servlet based on a ServerConfig
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.commons.logging.Log log

serverConfig

protected ServerConfig serverConfig
The server configuration read from the XML file.


uriMapper

protected URIMapper uriMapper
The URI mapper that will tell us what to resolve


server

protected Server server
The server object that will handle the incoming resolution requests


plugin

protected Plugin plugin
The plugin that will handle all requests not recognized by the URI mapper

Constructor Detail

XRIServlet

public XRIServlet()
Method Detail

init

public void init()
          throws javax.servlet.ServletException
Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException

init

public void init(ServerConfig serverConfig)
Initializes the servlet based on a ServerConfig


destroy

public void destroy()
Specified by:
destroy in interface javax.servlet.Servlet
Overrides:
destroy in class javax.servlet.GenericServlet

doGet

public void doGet(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response)
           throws java.io.IOException
Service an incoming request.

Overrides:
doGet in class javax.servlet.http.HttpServlet
Throws:
java.io.IOException

checkSigned

public static boolean checkSigned(javax.servlet.http.HttpServletRequest request)
This method can check whether the client requests SAML trusted resolution. TODO: FIX THIS

Parameters:
request - The incoming HTTP request
Returns:
Whether SAML trusted resolution is requested.


Copyright © 2005-2012. All Rights Reserved.