public PublishUnitTransformationRegistryPlugin(final ProtoBufFileSynchronizedRegistry<String, UnitConfig, UnitConfig.Builder, UnitRegistryData.Builder> locationRegistry) throws org.openbase.jul.exception.InstantiationException { super(); try { this.locationRegistry = locationRegistry; } catch (Exception ex) { throw new org.openbase.jul.exception.InstantiationException(this, ex); } }
private static AbstractServiceRemote instantiatServiceRemote(final Class<? extends AbstractServiceRemote> serviceRemoteClass) throws org.openbase.jul.exception.InstantiationException { try { AbstractServiceRemote remote = serviceRemoteClass.newInstance(); return remote; } catch (InstantiationException | IllegalAccessException ex) { throw new org.openbase.jul.exception.InstantiationException(serviceRemoteClass, ex); } } }
public OpenHABItemConfigGenerator() throws InstantiationException { try { this.itemEntryList = new ArrayList<>(); this.groupEntryList = new ArrayList<>(); } catch (NullPointerException ex) { throw new InstantiationException(this, ex); } }
/** * {@inheritDoc} * * @param unitRemoteClass {@inheritDoc} * @return {@inheritDoc} * @throws InstantiationException {@inheritDoc} */ @Override public <R extends AbstractUnitRemote> R newInstance(final Class<R> unitRemoteClass) throws InstantiationException { try { return unitRemoteClass.newInstance(); } catch (java.lang.InstantiationException | IllegalAccessException ex) { throw new org.openbase.jul.exception.InstantiationException("Could not instantiate unit remote out of Class[" + unitRemoteClass.getName() + "]", ex); } }
public PublishDeviceTransformationRegistryPlugin(final ProtoBufFileSynchronizedRegistry<String, UnitConfig, UnitConfig.Builder, UnitRegistryData.Builder> locationRegistry) throws org.openbase.jul.exception.InstantiationException { try { this.locationRegistry = locationRegistry; this.transformerFactory = TransformerFactory.getInstance(); } catch (Exception ex) { throw new org.openbase.jul.exception.InstantiationException(this, ex); } }
private AbstractServicePanel instantiatServicePanel(final ServiceConfig serviceConfig, Class<? extends AbstractServicePanel> servicePanelClass, AbstractUnitRemote unitRemote) throws org.openbase.jul.exception.InstantiationException, InterruptedException { try { AbstractServicePanel instance = servicePanelClass.newInstance(); instance.init(unitRemote, serviceConfig); return instance; } catch (NullPointerException | InstantiationException | CouldNotPerformException | IllegalAccessException ex) { throw new org.openbase.jul.exception.InstantiationException("Could not instantiate service panel out of ServicePanelClass[" + servicePanelClass.getSimpleName() + "]!", ex); } }
public GenericDeviceController(final ServiceFactory serviceFactory) throws InstantiationException, CouldNotPerformException { super(GenericDeviceController.class); try { if (serviceFactory == null) { throw new NotAvailableException("service factory"); } this.serviceFactory = serviceFactory; } catch (CouldNotPerformException ex) { throw new InstantiationException(this, ex); } }
protected RSBSynchronizedRemoteServer(final Scope scope, final Double timeout) throws InstantiationException { super(scope, null); try { if (timeout == null) { throw new NotAvailableException("timeout"); } this.timeout = timeout; } catch (CouldNotPerformException ex) { throw new InstantiationException(this, ex); } }
protected RSBSynchronizedParticipant(final Scope scope, final ParticipantConfig config) throws InstantiationException { try { if (scope == null) { throw new NotAvailableException("scope"); } this.scope = scope; this.config = config; } catch (CouldNotPerformException ex) { throw new InstantiationException(this, ex); } }
public AbstractUnitTransformationRegistryPlugin() throws org.openbase.jul.exception.InstantiationException { try { this.transformerFactory = TransformerFactory.getInstance(); } catch (Exception ex) { throw new org.openbase.jul.exception.InstantiationException(this, ex); } }
public AbstractUnitSelector(double threshold) throws InstantiationException { this.threshold = threshold; try { this.selectedObjectRegistry = new SynchronizableRegistryImpl<>(); } catch (InstantiationException ex) { throw new InstantiationException(this, ex); } }
/** * Constructor creates a new generic unit simulator. * * @param unitController this controller must be linked to the unit which should be simulated. * @throws org.openbase.jul.exception.InstantiationException is thrown if any error occurs during class instantiation. */ public GenericUnitSimulator(final UnitController unitController) throws InstantiationException, InterruptedException { super(unitController); try { this.serviceSimulatorList = new ArrayList<>(); initServiceSimulators(unitController); } catch (InitializationException ex) { throw new InstantiationException(this, ex); } }
/** * Creates a new service simulator to control the given unit. * * @param unitController the controller to simulate. * @param serviceType the service type to simulate. * @throws InstantiationException is thrown in case the current thread was externally interrupted. */ public GenericServiceSimulator(final UnitController unitController, final ServiceType serviceType) throws InstantiationException { super(unitController, serviceType); try { detectAndRegisterServiceStates(serviceType); } catch (CouldNotPerformException ex) { throw new InstantiationException(this, ex); } }
public PublishConnectionTransformationRegistryPlugin(final Registry<String, IdentifiableMessage<String, UnitConfig, UnitConfig.Builder>> locationRegistry) throws org.openbase.jul.exception.InstantiationException { try { this.locationRegistry = locationRegistry; this.transformerFactory = TransformerFactory.getInstance(); this.transformPublisher = transformerFactory.createTransformPublisher(getClass().getSimpleName()); } catch (Exception ex) { throw new org.openbase.jul.exception.InstantiationException(this, ex); } }
public DalUnitLabelConsistencyHandler(final ProtoBufFileSynchronizedRegistry<String, UnitConfig, UnitConfig.Builder, UnitRegistryData.Builder> deviceRegistry, final ProtoBufFileSynchronizedRegistry<String, UnitConfig, UnitConfig.Builder, UnitRegistryData.Builder> appRegistry) throws InstantiationException { try { this.deviceClassRegistry = CachedDeviceRegistryRemote.getRegistry().getDeviceClassRemoteRegistry(); this.deviceRegistry = deviceRegistry; this.appRegistry = appRegistry; this.oldUnitHostLabelMap = new HashMap<>(); } catch (final CouldNotPerformException | InterruptedException ex) { // remove InterruptedException in bco 2.0 release throw new InstantiationException(this, ex); } }
/** * Constructor. * * @throws InstantiationException Is thrown, if the factory could not be * instantiated. */ private ControllableObjectFactory() throws InstantiationException { try { cooldownTime = JPService.getProperty(JPCooldownTime.class).getValue(); LOGGER.info("Selected Control cooldown time: " + cooldownTime + " milliseconds"); } catch (JPNotAvailableException ex) { throw new InstantiationException(ControllableObjectFactory.class, ex); } }
public UnitAllocation(ExecutableResource<ActionFuture> taskExecutor) throws org.openbase.jul.exception.InstantiationException { try { this.taskExecutor = taskExecutor; try { taskExecutor.startup(); } catch (RSBException ex) { throw new CouldNotPerformException("Could not schedule allocation!", ex); } } catch (CouldNotPerformException ex) { throw new InstantiationException(this, ex); } }
public DeviceLabelConsistencyHandler() throws InstantiationException { super(); try { this.deviceClassRegistry = CachedDeviceRegistryRemote.getRegistry().getDeviceClassRemoteRegistry(); } catch (final CouldNotPerformException | InterruptedException ex) { // remove InterruptedException in bco 2.0 release throw new InstantiationException(this, ex); } }
private Trigger initTrigger(final Trigger trigger, final TriggerConfig triggerConfig) throws InterruptedException, InstantiationException { try { trigger.init(triggerConfig); trigger.activate(); return trigger; } catch (CouldNotPerformException ex) { throw new InstantiationException("Could not initiate trigger instance!", ex); } }
@Override public <UNIT extends StandbyStateOperationService & Unit> StandbyStateOperationService newStandbyService(final UNIT unit) throws InstantiationException { throw new InstantiationException(this, new NotSupportedException(StandbyStateOperationService.class, this)); }