net.csdn.modules.mock
Class MockRestResponse

java.lang.Object
  extended by net.csdn.modules.mock.MockRestResponse
All Implemented Interfaces:
RestResponse

public class MockRestResponse
extends Object
implements RestResponse

User: WilliamZhu Date: 12-7-5 Time: 下午5:28


Constructor Summary
MockRestResponse()
           
 
Method Summary
 String content()
           
 void cookie(Map cookieInfo)
           
 void cookie(String name, String value)
           
 void error(Exception e)
           
 Object originContent()
           
 RestResponse originContent(Object obj)
           
 void output(String msg)
           
 void outputAsByte(byte[] msg)
           
 void redirectTo(String path, Map params)
           
 int status()
           
 void write(byte[] contentByte)
           
 void write(int httpStatus, String content)
           
 void write(int httpStatus, String content, ViewType viewType)
           
 void write(String content)
           
 void write(String content, ViewType viewType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockRestResponse

public MockRestResponse()
Method Detail

write

public void write(String content)
Specified by:
write in interface RestResponse

write

public void write(String content,
                  ViewType viewType)
Specified by:
write in interface RestResponse

write

public void write(int httpStatus,
                  String content)
Specified by:
write in interface RestResponse

write

public void write(int httpStatus,
                  String content,
                  ViewType viewType)
Specified by:
write in interface RestResponse

write

public void write(byte[] contentByte)
Specified by:
write in interface RestResponse

cookie

public void cookie(String name,
                   String value)
Specified by:
cookie in interface RestResponse

cookie

public void cookie(Map cookieInfo)
Specified by:
cookie in interface RestResponse

content

public String content()
Specified by:
content in interface RestResponse

originContent

public Object originContent()
Specified by:
originContent in interface RestResponse

redirectTo

public void redirectTo(String path,
                       Map params)
Specified by:
redirectTo in interface RestResponse

originContent

public RestResponse originContent(Object obj)
Specified by:
originContent in interface RestResponse

status

public int status()
Specified by:
status in interface RestResponse

error

public void error(Exception e)
           throws IOException
Throws:
IOException

output

public void output(String msg)
            throws IOException
Throws:
IOException

outputAsByte

public void outputAsByte(byte[] msg)
                  throws IOException
Throws:
IOException


Copyright © 2014. All Rights Reserved.