/** * Returns the application's status service or create a new one. * * @return The status service. */ public org.restlet.service.StatusService getStatusService() { org.restlet.service.StatusService result = null; result = getApplication().getStatusService(); if (result == null) { result = new org.restlet.service.StatusService(); } return result; }
@Override public void setContext(Context context) { super.setContext(context); logClientErrors = ContextUtils.getParameterAsBoolean(context, Constants.LOG_CLIENT_ERRORS_PARAMETER, logClientErrors); }
/** * Constructor from a status service. * * @param context * The context. * @param statusService * The helped status service. */ public StatusFilter(Context context, StatusService statusService) { this(context, statusService.isOverwriting(), statusService .getContactEmail(), statusService.getHomeRef()); this.statusService = statusService; }
getStatusService().setContactEmail( item.getNodeValue()); getStatusService().setEnabled( getBoolean(item, true)); getStatusService().setHomeRef( new Reference(item.getNodeValue())); getStatusService().setOverwrite( getBoolean(item, true));
getComponent().getStatusService().setContactEmail( item.getNodeValue()); getComponent().getStatusService().setEnabled( getBoolean(item, true)); getComponent().getStatusService().setHomeRef( new Reference(item.getNodeValue())); getComponent().getStatusService().setOverwriting( getBoolean(item, true));
component.getStatusService().setEnabled(false);
/** * Constructor. */ public Component() { super(); this.hosts = new CopyOnWriteArrayList<VirtualHost>(); this.clients = new ClientList(null); this.servers = new ServerList(null, this); this.realms = new CopyOnWriteArrayList<Realm>(); this.services = new ServiceList(getContext()); if (Engine.getInstance() != null) { // To be done before setting the helper... this.services.add(new org.restlet.service.TaskService()); this.helper = new ComponentHelper(this); Context childContext = getContext().createChildContext(); this.defaultHost = new VirtualHost(childContext); this.internalRouter = new InternalRouter(childContext); this.services.add(new LogService()); getLogService().setContext(childContext); this.services.add(new StatusService()); getStatusService().setContext(childContext); this.clients.setContext(childContext); this.servers.setContext(childContext); } }
getContactEmail(), getHomeRef().toString());
component.getStatusService().setEnabled(false);
/** * 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.statusService = new StatusService(true); this.clients.setContext(getContext()); this.servers.setContext(getContext());
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());