📄 filestub.java
字号:
/*
* Created on 2007-12-27
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package nl.griffelservices.proxy.stub;
/**
* @author xufangbj@cn.ibm.com
*
* This stub gets the responses from a File in local.
* Window - Preferences - Java - Code Style - Code Templates
*/
public class FileStub extends FileClient implements Stub{
/** the request encoder */
private static final RequestEncoder encoder = new RequestEncoder();
/** the response decoder */
private static final ResponseDecoder decoder = new ResponseDecoder();
/**
* Constructs a HttpStub object.
*
* @param host the hostname of the HTTP server that provides the stub information
* @param port the port of the HTTP server that provides the stub information
* @param timeout the timeout that will be used for HTTP requests to the HTTP server that provides the stub information
*/
public FileStub(String filename)
{
super(filename);
}
public Response invoke(Request request) throws Exception
{
return decoder.decode(invoke(encoder.encode(request)));
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -