Class AbstractFdfsCommand<T>
java.lang.Object
com.github.tobato.fastdfs.domain.proto.AbstractFdfsCommand<T>
- Type Parameters:
T-
- All Implemented Interfaces:
FdfsCommand<T>
- Direct Known Subclasses:
StorageAppendFileCommand,StorageDeleteFileCommand,StorageDownloadCommand,StorageGetMetadataCommand,StorageModifyCommand,StorageQueryFileInfoCommand,StorageSetMetadataCommand,StorageTruncateCommand,StorageUploadFileCommand,StorageUploadSlaveFileCommand,TrackerDeleteStorageCommand,TrackerGetFetchStorageCommand,TrackerGetStoreStorageCommand,TrackerListGroupsCommand,TrackerListStoragesCommand
交易命令抽象类
- Author:
- tobato
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute(Connection conn) 对服务端发出请求然后接收反馈protected Treceive(InputStream in, Charset charset) 接收这里只能确切知道报文头,报文内容(参数+文件)只能靠接收对象分析protected voidsend(OutputStream out, Charset charset) 将报文输出规范为模板方法protected voidsendFileContent(InputStream ins, long size, OutputStream ous) 发送文件
-
Field Details
-
request
表示请求消息 -
response
解析反馈消息对象
-
-
Constructor Details
-
AbstractFdfsCommand
public AbstractFdfsCommand()
-
-
Method Details
-
execute
对服务端发出请求然后接收反馈- Specified by:
executein interfaceFdfsCommand<T>
-
send
将报文输出规范为模板方法1.输出报文头 2.输出报文参数 3.输出文件内容
- Parameters:
out- 输入流charset- 字符集- Throws:
IOException- 异常
-
receive
接收这里只能确切知道报文头,报文内容(参数+文件)只能靠接收对象分析- Parameters:
in- 输入流- Returns:
- 数据
- Throws:
IOException- 异常
-
sendFileContent
发送文件- Parameters:
ins- 输入流size- 文件流大小ous- 输入流- Throws:
IOException- 异常
-