本文整理汇总了Java中org.restlet.service.EncoderService类的典型用法代码示例。如果您正苦于以下问题:Java EncoderService类的具体用法?Java EncoderService怎么用?Java EncoderService使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
EncoderService类属于org.restlet.service包,在下文中一共展示了EncoderService类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Application
import org.restlet.service.EncoderService; //导入依赖的package包/类
/**
* Constructor.
*
* @param context
* The context to use based on parent component context. This
* context should be created using the
* {@link Context#createChildContext()} method to ensure a proper
* isolation with the other applications.
*/
public Application(Context context) {
super(context);
if (Engine.getInstance() != null) {
this.helper = new ApplicationHelper(this);
this.helper.setContext(context);
}
ConnegService connegService = new ConnegService();
ConverterService converterService = new ConverterService();
MetadataService metadataService = new MetadataService();
this.debugging = false;
this.outboundRoot = null;
this.inboundRoot = null;
this.roles = new CopyOnWriteArrayList<Role>();
this.services = new ServiceList(context);
this.services.add(new TunnelService(true, true));
this.services.add(new StatusService(true, converterService,
metadataService, connegService));
this.services.add(new DecoderService());
this.services.add(new EncoderService(false));
this.services.add(new RangeService());
this.services.add(new ConnectorService());
this.services.add(connegService);
this.services.add(converterService);
this.services.add(metadataService);
this.services.add(new org.restlet.service.TaskService(false));
}
示例2: Encoder
import org.restlet.service.EncoderService; //导入依赖的package包/类
/**
* Constructor.
*
* @param context
* The context.
* @param encodingRequest
* Indicates if the request entities should be encoded.
* @param encodingResponse
* Indicates if the response entities should be encoded.
* @param encoderService
* The parent encoder service.
*/
public Encoder(Context context, boolean encodingRequest,
boolean encodingResponse, EncoderService encoderService) {
super(context);
this.encodingRequest = encodingRequest;
this.encodingResponse = encodingResponse;
this.encoderService = encoderService;
}
示例3: getEncoderService
import org.restlet.service.EncoderService; //导入依赖的package包/类
/**
* Returns the parent encoder service.
*
* @return The parent encoder service.
*/
public EncoderService getEncoderService() {
return encoderService;
}
示例4: getEncoderService
import org.restlet.service.EncoderService; //导入依赖的package包/类
/**
* Returns the encoder service. The service is disabled by default.
*
* @return The encoder service.
*/
public EncoderService getEncoderService() {
return getServices().get(EncoderService.class);
}
示例5: setEncoderService
import org.restlet.service.EncoderService; //导入依赖的package包/类
/**
* Sets the encoder service.
*
* @param encoderService
* The encoder service.
*/
public void setEncoderService(EncoderService encoderService) {
getServices().set(encoderService);
}
示例6: CustomEncoder
import org.restlet.service.EncoderService; //导入依赖的package包/类
/**
* Constructor.
*
* @param context
* The context
* @param encodingRequest
* Indicates if the request entities should be encoded
* @param encodingResponse
* Indicates if the response entities should be encoded
* @param encoderService
* The encoder service
*/
public CustomEncoder( Context context, boolean encodingRequest, boolean encodingResponse, EncoderService encoderService )
{
super( context, encodingRequest, encodingResponse, encoderService );
describe();
}