All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.feilong.context.invoker.DefaultResponseCommandBuilder Maven / Gradle / Ivy

Go to download

feilong is a suite of core and expanded libraries that include utility classes, http, excel,cvs, io classes, and much much more.

There is a newer version: 4.3.0
Show newest version
/*
 * Copyright (C) 2008 feilong
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.feilong.context.invoker;

import com.feilong.context.converter.StringToBeanConverter;

/**
 * 默认的响应结果对象构造器.
 * 
 * 

代码流程:

*
*
    *
  1. 第1步,通过调用 {@link ResponseStringBuilder} 来得到响应字符串
  2. *
  3. 第2步,将得到的字符串,使用 {@link StringToBeanConverter} 来转换成对象
  4. *
*
* * @author feilong * @param * 请求 * @param * 响应的字符串转换成的对象 * @see DefaultRequestResultInvoker * @since 1.11.3 */ public class DefaultResponseCommandBuilder extends AbstractResponseCommandBuilder{ /** 响应结果字符串构造器. */ private ResponseStringBuilder responseStringBuilder; /** 字符串转换成bean 转换器. */ private StringToBeanConverter stringToBeanConverter; //--------------------------------------------------------------- /** * 设置 响应结果字符串构造器. * * @param responseStringBuilder * the responseStringBuilder to set */ public void setResponseStringBuilder(ResponseStringBuilder responseStringBuilder){ this.responseStringBuilder = responseStringBuilder; } /** * 设置 字符串转换成bean 转换器. * * @param stringToBeanConverter * the stringToBeanConverter to set */ public void setStringToBeanConverter(StringToBeanConverter stringToBeanConverter){ this.stringToBeanConverter = stringToBeanConverter; } //--------------------------------------------------------------- /** * 获得 响应结果字符串构造器. * * @return the 响应结果字符串构造器 */ @Override protected ResponseStringBuilder createResponseStringBuilder(){ return responseStringBuilder; } /** * 获得 字符串转换成bean 转换器. * * @return the 字符串转换成bean 转换器 */ @Override protected StringToBeanConverter createStringToBeanConverter(){ return stringToBeanConverter; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy