private static XMLStreamException endOfDocument(final Location location) { return ServerLogger.ROOT_LOGGER.unexpectedEndOfDocument(location); } }
private SingletonDeploymentConfiguration parse(DeploymentUnit unit, File file) throws DeploymentUnitProcessingException { try (BufferedReader reader = Files.newBufferedReader(file.toPath(), StandardCharsets.UTF_8)) { XMLStreamReader xmlReader = XML_INPUT_FACTORY.createXMLStreamReader(reader); try { MutableSingletonDeploymentConfiguration config = new MutableSingletonDeploymentConfiguration(unit); this.mapper.parseDocument(config, xmlReader); return config; } finally { xmlReader.close(); } } catch (XMLStreamException e) { throw ServerLogger.ROOT_LOGGER.errorLoadingDeploymentStructureFile(file.getPath(), e); } catch (FileNotFoundException e) { throw ServerLogger.ROOT_LOGGER.deploymentStructureFileNotFound(file); } catch (IOException e) { throw ServerLogger.ROOT_LOGGER.deploymentStructureFileNotFound(file); } } }
public SubDeploymentUnitService(ResourceRoot deploymentRoot, DeploymentUnit parent, ImmutableManagementResourceRegistration registration, final ManagementResourceRegistration mutableRegistration, Resource resource, CapabilityServiceSupport capabilityServiceSupport, final AbstractVaultReader vaultReader, PathManager pathManager) { super(registration, mutableRegistration, resource, capabilityServiceSupport, vaultReader); this.pathManager = pathManager; if (deploymentRoot == null) throw ServerLogger.ROOT_LOGGER.deploymentRootRequired(); this.deploymentRoot = deploymentRoot; if (parent == null) throw ServerLogger.ROOT_LOGGER.subdeploymentsRequireParent(); this.parent = parent; }
@Override public ProtocolConnectionManager.ConnectTask connectionClosed() { ServerLogger.AS_ROOT_LOGGER.debugf("Connection to Host Controller closed"); return this; }
@Override public ContentRepository getValue() throws IllegalStateException, IllegalArgumentException { final RemoteFileRepositoryExecutor executor = this.remoteFileRepositoryExecutor; if (executor == null) { throw ServerLogger.ROOT_LOGGER.couldNotFindHcFileRepositoryConnection(); } return this; }
@Override public synchronized void stop(StopContext context) { if (serviceContainer == null) { throw ServerLogger.ROOT_LOGGER.serviceModuleLoaderAlreadyStopped(); } serviceContainer = null; }
@Override public synchronized void start(StartContext startContext) throws StartException { if(startSuspended) { ServerLogger.AS_ROOT_LOGGER.startingServerSuspended(); } }
@Override public void logExit() { ServerLogger.ROOT_LOGGER.aborting(status); } }, status);
private static String validatePermissionActions(String actions) throws IllegalArgumentException { if (actions != null) { throw ServerLogger.ROOT_LOGGER.illegalPermissionActions(actions); } return actions; }
@Override public void logExit() { ServerLogger.ROOT_LOGGER.fatal(message); } }, 1);
private static void assertSingleConfig(String serverConfig) { if (serverConfig != null) { throw ServerLogger.ROOT_LOGGER.cannotHaveBothInitialServerConfigAndServerConfig(); } }
private static String validatePermissionName(String name) throws IllegalArgumentException { switch (name) { case CREATE_DEPLOYMENT_REFLECTION_INDEX_NAME: case GET_CURRENT_SERVICE_CONTAINER_NAME: case SET_CURRENT_SERVICE_CONTAINER_NAME: case USE_SERVICE_REGISTRY_NAME: case WILDCARD_NAME: return name; default: throw ServerLogger.ROOT_LOGGER.illegalPermissionName(name); } }
public SubDeploymentUnitService(ResourceRoot deploymentRoot, DeploymentUnit parent, ImmutableManagementResourceRegistration registration, final ManagementResourceRegistration mutableRegistration, Resource resource, CapabilityServiceSupport capabilityServiceSupport, final AbstractVaultReader vaultReader, PathManager pathManager) { super(registration, mutableRegistration, resource, capabilityServiceSupport, vaultReader); this.pathManager = pathManager; if (deploymentRoot == null) throw ServerLogger.ROOT_LOGGER.deploymentRootRequired(); this.deploymentRoot = deploymentRoot; if (parent == null) throw ServerLogger.ROOT_LOGGER.subdeploymentsRequireParent(); this.parent = parent; }
@Override public ProtocolConnectionManager.ConnectTask connectionClosed() { ServerLogger.AS_ROOT_LOGGER.debugf("Connection to Host Controller closed"); return this; }
@Override public ContentRepository getValue() throws IllegalStateException, IllegalArgumentException { final RemoteFileRepositoryExecutor executor = this.remoteFileRepositoryExecutor; if (executor == null) { throw ServerLogger.ROOT_LOGGER.couldNotFindHcFileRepositoryConnection(); } return this; }
@Override public synchronized void stop(StopContext context) { if (serviceContainer == null) { throw ServerLogger.ROOT_LOGGER.serviceModuleLoaderAlreadyStopped(); } serviceContainer = null; }
@Override public synchronized void start(StartContext startContext) throws StartException { if(startSuspended) { ServerLogger.AS_ROOT_LOGGER.startingServerSuspended(); } }
@Override public void logExit() { ServerLogger.ROOT_LOGGER.aborting(status); } }, status);
private static String validatePermissionActions(String actions) throws IllegalArgumentException { if (actions != null) { throw ServerLogger.ROOT_LOGGER.illegalPermissionActions(actions); } return actions; }
@Override public void logExit() { ServerLogger.ROOT_LOGGER.fatal(message); } }, 1);