/** * Returns the connector service associated to a request. * * @return The connector service associated to a request. */ public static org.restlet.service.ConnectorService getConnectorService() { org.restlet.service.ConnectorService result = null; org.restlet.Application application = org.restlet.Application .getCurrent(); if (application != null) { result = application.getConnectorService(); } else { result = new org.restlet.service.ConnectorService(); } return result; }
/** * 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. */ @SuppressWarnings("deprecation") public Application(Context context) { super(context); if (Engine.getInstance() != null) { this.helper = Engine.getInstance().createHelper(this); } this.name = null; this.description = null; this.author = null; this.owner = null; this.root = null; this.connectorService = new ConnectorService(); this.converterService = new org.restlet.service.ConverterService(); this.decoderService = new DecoderService(); this.metadataService = new MetadataService(); this.rangeService = new RangeService(); this.statusService = new StatusService(); this.taskService = new TaskService(); this.tunnelService = new TunnelService(true, true); }
this.services.add(new EncoderService(false)); this.services.add(new RangeService()); this.services.add(new ConnectorService()); this.services.add(connegService); this.services.add(converterService);