|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectphp.java.bridge.Response
public class Response
This class is used to write the response to the front-end.
Field Summary | |
---|---|
static int |
COERCE_WRITER
A specialized writer which casts the value. |
static int |
VALUES_WRITER
A specialized writer which writes arrays as values. |
Constructor Summary | |
---|---|
Response(JavaBridge bridge)
Creates a new response object. |
Method Summary | |
---|---|
Response |
copyResponse()
Flush the current output buffer and create a new Response object where are writers have their default value |
void |
flush()
Write the response. |
php.java.bridge.Response.Writer |
selectWriter(int writerType)
Deprecated. Use setArrayValuesWriter or setCoerceWriter instead. |
php.java.bridge.Response.Writer |
setArrayValuesWriter()
Selects a specialized writer which writes arrays as values. |
php.java.bridge.Response.Writer |
setAsyncWriter()
Selects a specialized writer which does not write anything. |
php.java.bridge.Response.Writer |
setCoerceWriter()
Selects a specialized writer which casts the value. |
php.java.bridge.Response.Writer |
setDefaultWriter()
Selects the default writer |
void |
setFinish(boolean keepAlive)
|
void |
setResult(java.lang.Object value,
java.lang.Class type)
Set the result packet. |
void |
setResultClass(java.lang.Class value)
Set the result packet. |
void |
setResultException(java.lang.Throwable value,
java.lang.String asString)
Set the result packet. |
void |
setResultObject(java.lang.Object value)
Set the result packet. |
void |
setResultProcedure(long object,
java.lang.String cname,
java.lang.String name,
java.lang.Object[] args)
Set the result packet. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int VALUES_WRITER
JavaBridge.getValues(Object)
,
Constant Field Valuespublic static final int COERCE_WRITER
JavaBridge.cast(Object, Class)
,
Constant Field ValuesConstructor Detail |
---|
public Response(JavaBridge bridge)
bridge
- The bridge.Method Detail |
---|
public Response copyResponse() throws java.io.IOException
java.io.IOException
public void setResultProcedure(long object, java.lang.String cname, java.lang.String name, java.lang.Object[] args)
object
- The result object.cname
- The php name of the procedurename
- The java name of the procedureargs
- The argumentspublic void setResultException(java.lang.Throwable value, java.lang.String asString)
value
- The throwableasString
- The string representation of the throwablepublic void setResultObject(java.lang.Object value)
value
- The result object.public void setResultClass(java.lang.Class value)
value
- The result object.public void setResult(java.lang.Object value, java.lang.Class type)
value
- The result object.type
- The type of the result object.public void setFinish(boolean keepAlive)
public php.java.bridge.Response.Writer selectWriter(int writerType)
writerType
- Must be Response#VALUES_WRITER or Response#COERCE_WRITER.
VALUES_WRITER
,
COERCE_WRITER
public php.java.bridge.Response.Writer setArrayValuesWriter()
JavaBridge.getValues(Object)
public php.java.bridge.Response.Writer setCoerceWriter()
JavaBridge.cast(Object, Class)
public php.java.bridge.Response.Writer setAsyncWriter()
public php.java.bridge.Response.Writer setDefaultWriter()
public void flush() throws java.io.IOException
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |