com.yworks.yfiles.server.graphml.servlets
Class LoadGraphServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.yworks.yfiles.server.graphml.servlets.LoadGraphServlet
- All Implemented Interfaces:
- Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
- public abstract class LoadGraphServlet
- extends javax.servlet.http.HttpServlet
Simple abstract base servlet that can send a GraphML file from the server to the flash client.
Subclasses need to override getInputStream(javax.servlet.http.HttpServletRequest)
to return a stream to send to the client for a given request.
If getInputStream returns null, the status 204 (no content) response code is sent.
- See Also:
- Serialized Form
|
Method Summary |
protected void |
doGet(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
|
protected void |
doPost(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
|
protected String |
getContentType()
Get the content type that will be used for the response header.
|
protected abstract InputStream |
getInputStream(javax.servlet.http.HttpServletRequest httpServletRequest)
Get a stream to send to the client. |
| Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
| Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LoadGraphServlet
public LoadGraphServlet()
doPost
protected void doPost(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
throws javax.servlet.ServletException,
IOException
- Throws:
javax.servlet.ServletException
IOException
getContentType
protected String getContentType()
- Get the content type that will be used for the response header.
Depending on the servlet container configuration, the response
content type might determine whether the servlet container sends a
compressed response.
- Returns:
- A conten MIME type. This implementation returns
"text/html".
getInputStream
protected abstract InputStream getInputStream(javax.servlet.http.HttpServletRequest httpServletRequest)
throws IOException
- Get a stream to send to the client.
- Parameters:
httpServletRequest - the request that used by the client.
- Returns:
- a stream or null.
- Throws:
IOException - if an IO failure occurs.
doGet
protected void doGet(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
throws javax.servlet.ServletException,
IOException
- Throws:
javax.servlet.ServletException
IOException
Copyright © 2000-2007 yWorks GmbH. All
rights reserved