@Override public void start(StartContext startContext) { String relativeToPath = AbsolutePathService.isAbsoluteUnixOrWindowsPath(path) ? null : relativeTo; String dirPath = pathManager.get().resolveRelativePathEntry(path, relativeToPath); File dir = new File(dirPath); MicroProfileConfigLogger.ROOT_LOGGER.loadConfigSourceFromDir(dir.getAbsolutePath()); configSource = new DirConfigSource(dir, ordinal); }
/** * Install a {@code Service<String>} for the given path. * @param serviceTarget the service target associated with the management operation making this request. Cannot be {@code null} * @param pathName the name of the relevant path. Cannot be {@code null} * @param path the value of the path within the model. This is either an absolute path or * the relative portion of the path. Cannot be {@code null} * * @return the service controller for the {@code Service<String>} */ final ServiceController<?> addAbsolutePathService(final ServiceTarget serviceTarget, final String pathName, final String path) { return AbsolutePathService.addService(pathName, path, serviceTarget); }
public static ServiceController<String> addService(final String name, final String abstractPath, final ServiceTarget serviceTarget, final List<ServiceController<?>> newControllers, final ServiceListener... listeners) { return addService(pathNameOf(name), abstractPath, serviceTarget, newControllers, listeners); }
@Override public String resolvePath(String name, String path, String relativeTo, PathResolver resolver) { return AbsolutePathService.convertPath(path); }
public static ServiceController<String> addService(final ServiceName sname, final String abstractPath, final ServiceTarget serviceTarget) { AbsolutePathService service = new AbsolutePathService(abstractPath); ServiceBuilder<String> builder = serviceTarget.addService(sname, service); return builder.install(); }
/** * Install a {@code Service<String>} for the given path. * @param serviceTarget the service target associated with the management operation making this request. Cannot be {@code null} * @param pathName the name of the relevant path. Cannot be {@code null} * @param path the value of the path within the model. This is either an absolute path or * the relative portion of the path. Cannot be {@code null} * * @return the service controller for the {@code Service<String>} */ final ServiceController<?> addAbsolutePathService(final ServiceTarget serviceTarget, final String pathName, final String path) { return AbsolutePathService.addService(pathName, path, serviceTarget); }
public static ServiceController<String> addService(final String name, final String abstractPath, final ServiceTarget serviceTarget, final List<ServiceController<?>> newControllers, final ServiceListener... listeners) { return addService(pathNameOf(name), abstractPath, serviceTarget, newControllers, listeners); }
@Override public String resolvePath(String name, String path, String relativeTo, PathResolver resolver) { return AbsolutePathService.convertPath(path); }
public static ServiceController<String> addService(final ServiceName sname, final String abstractPath, final ServiceTarget serviceTarget) { AbsolutePathService service = new AbsolutePathService(abstractPath); ServiceBuilder<String> builder = serviceTarget.addService(sname, service); return builder.install(); }
final ServiceController<?> addAbsolutePathService(final ServiceTarget serviceTarget, final String pathName, final String path, final ServiceVerificationHandler verificationHandler) { if (verificationHandler == null) { return AbsolutePathService.addService(pathName, path, serviceTarget, null, NO_LISTENERS); } else { return AbsolutePathService.addService(pathName, path, serviceTarget, null, verificationHandler); } }
public static ServiceController<String> addService(final String name, final String abstractPath, final ServiceTarget serviceTarget) { return addService(pathNameOf(name), abstractPath, serviceTarget); }
String resolve(PathManager pathManager, String path, String relativeToPath) { // discard the relativeToPath if the path is absolute and must not be resolved according // to the default relativeToPath value String relativeTo = AbsolutePathService.isAbsoluteUnixOrWindowsPath(path) ? null : relativeToPath; return pathManager.resolveRelativePathEntry(path, relativeTo); }
@Override public String resolvePath(String name, String path, String relativeTo, PathResolver resolver) { return AbsolutePathService.convertPath(path); }
public static ServiceController<String> addService(final ServiceName sname, final String abstractPath, final ServiceTarget serviceTarget, final List<ServiceController<?>> newControllers, final ServiceListener... listeners) { AbsolutePathService service = new AbsolutePathService(abstractPath); ServiceBuilder<String> builder = serviceTarget.addService(sname, service); if (listeners != null) { for (ServiceListener listener : listeners) { builder.addListener(listener); } } ServiceController<String> svc = builder.install(); if (newControllers != null) { newControllers.add(svc); } return svc; }
final ServiceController<?> addAbsolutePathService(final ServiceTarget serviceTarget, final String pathName, final String path, final ServiceVerificationHandler verificationHandler) { if (verificationHandler == null) { return AbsolutePathService.addService(pathName, path, serviceTarget, null, NO_LISTENERS); } else { return AbsolutePathService.addService(pathName, path, serviceTarget, null, verificationHandler); } }
public static ServiceController<String> addService(final String name, final String abstractPath, final ServiceTarget serviceTarget) { return addService(pathNameOf(name), abstractPath, serviceTarget); }
String resolve(PathManager pathManager, String path, String relativeToPath) { // discard the relativeToPath if the path is absolute and must not be resolved according // to the default relativeToPath value String relativeTo = AbsolutePathService.isAbsoluteUnixOrWindowsPath(path) ? null : relativeToPath; return pathManager.resolveRelativePathEntry(path, relativeTo); }
public AbsolutePathService(final String abstractPath) { absolutePath = convertPath(abstractPath); }
public static ServiceController<String> addService(final ServiceName sname, final String abstractPath, final ServiceTarget serviceTarget, final List<ServiceController<?>> newControllers, final ServiceListener... listeners) { AbsolutePathService service = new AbsolutePathService(abstractPath); ServiceBuilder<String> builder = serviceTarget.addService(sname, service); if (listeners != null) { for (ServiceListener listener : listeners) { builder.addListener(listener); } } ServiceController<String> svc = builder.install(); if (newControllers != null) { newControllers.add(svc); } return svc; }
public static ServiceController<String> addService(final ServiceName sname, final String abstractPath, final ServiceTarget serviceTarget) { return addService(sname, abstractPath, serviceTarget, null); }