|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectphp.java.bridge.http.Context
php.java.servlet.HttpContext
public class HttpContext
A custom context which keeps the HttpServletResponse. Used when JSR223 is not available.
| Field Summary |
|---|
| Fields inherited from interface php.java.bridge.http.IContext |
|---|
ENGINE_SCOPE, GLOBAL_SCOPE, JAVA_BRIDGE, PHP_PROCEDURE, SERVLET, SERVLET_CONFIG, SERVLET_CONTEXT, SERVLET_REQUEST, SERVLET_RESPONSE |
| Constructor Summary | |
|---|---|
HttpContext(javax.servlet.ServletContext kontext,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Create a new context. |
|
| Method Summary | |
|---|---|
java.lang.Object |
getAttribute(java.lang.String name)
Retrieves the value for getAttribute(String, int) for the lowest scope in which it returns a non-null value. |
java.lang.Object |
getHttpServletRequest()
Return the http servlet request |
java.lang.Object |
getHttpServletResponse()
Return the http servlet response |
java.lang.String |
getRealPath(java.lang.String path)
Get the full file system path for the given resource. |
static java.lang.String |
getRealPathInternal(java.lang.String path,
javax.servlet.ServletContext ctx)
Deprecated. Use ServletUtil.getRealPath(ServletContext, String) |
java.lang.String |
getRedirectString()
Deprecated. |
java.lang.String |
getRedirectString(java.lang.String webPath)
Deprecated. |
java.lang.Object |
getServlet()
Return the http servlet |
java.lang.Object |
getServletConfig()
Return the servlet config |
java.lang.Object |
getServletContext()
Return the servlet context |
java.lang.String |
getSocketName()
Return the socket name, for example 8080 |
java.io.Writer |
getWriter()
Retrieves an instance of java.io.Writer which can be used by scripts to display their output. |
static void |
handleManaged(java.lang.Object closeable,
javax.servlet.ServletContext ctx)
Only for internal use. |
java.lang.Object |
init(java.lang.Object callable)
Initialize a library. |
void |
onShutdown(java.lang.Object closeable)
Register a shutdown hook for the library. |
| Methods inherited from class php.java.bridge.http.Context |
|---|
call, get, getAll, getAttribute, getAttributesScope, getManageable, getRealPathInternal, getRedirectURL, handleManaged, put, putAll, remove, removeAttribute, setAttribute |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HttpContext(javax.servlet.ServletContext kontext,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
kontext - The servlet contextreq - The servlet requestres - The HttpServletResponse| Method Detail |
|---|
public java.lang.Object getAttribute(java.lang.String name)
throws java.lang.IllegalArgumentException
getAttribute in interface IContextgetAttribute in class Contextname - the name of the attribute
java.lang.IllegalArgumentException
public java.io.Writer getWriter()
throws java.io.IOException
getWriter in interface IContextgetWriter in class Contextjava.io.IOExceptionpublic java.lang.Object getHttpServletResponse()
getHttpServletResponse in interface IContextgetHttpServletResponse in class Contextpublic java.lang.Object getHttpServletRequest()
getHttpServletRequest in interface IContextgetHttpServletRequest in class Contextpublic java.lang.Object getServlet()
getServlet in interface IContextgetServlet in class Contextpublic java.lang.Object getServletConfig()
getServletConfig in interface IContextgetServletConfig in class Contextpublic java.lang.Object getServletContext()
getServletContext in interface IContextgetServletContext in class Context
public static void handleManaged(java.lang.Object closeable,
javax.servlet.ServletContext ctx)
closeable - The manageable beforeShutdown(), will be called by the ContextLoaderListener.contextDestroyed(javax.servlet.ServletContextEvent)ctx - The ServletContext
public java.lang.Object init(java.lang.Object callable)
throws java.lang.Exception
init in interface IManagedinit in class Contextcallable - Its call() method will be called synchronized.
java.lang.Exception - The result of the call() invocation.public void onShutdown(java.lang.Object closeable)
onShutdown in interface IManagedonShutdown in class Contextcloseable - Its close() method will be called before the context or the VM terminates.
public static java.lang.String getRealPathInternal(java.lang.String path,
javax.servlet.ServletContext ctx)
ServletUtil.getRealPath(ServletContext, String)
path - the pathctx - the servlet context
public java.lang.String getRealPath(java.lang.String path)
getRealPath in interface IContextgetRealPath in class Contextpath - the relative path to an existing resource
public java.lang.String getRedirectString()
getRedirectString in interface IContextgetRedirectString in class Contextpublic java.lang.String getRedirectString(java.lang.String webPath)
getRedirectString in interface IContextgetRedirectString in class Contextpublic java.lang.String getSocketName()
getSocketName in interface IContextgetSocketName in class Context
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||