Tabnine Logo
ServiceProfile.getContext
Code IndexAdd Tabnine to your IDE (free)

How to use
getContext
method
in
com.asakusafw.yaess.core.ServiceProfile

Best Java code snippets using com.asakusafw.yaess.core.ServiceProfile.getContext (Showing top 11 results out of 315)

origin: asakusafw/asakusafw

/**
 * Returns the class loader which loaded this service class.
 * @return the class loader
 * @deprecated use {@link #getContext()} instead
 */
@Deprecated
public ClassLoader getClassLoader() {
  return getContext().getClassLoader();
}
origin: asakusafw/asakusafw

private static String resolve(ServiceProfile<?> profile, String key, String value) {
  assert profile != null;
  assert key != null;
  assert value != null;
  try {
    return profile.getContext().getContextParameters().replace(value, true);
  } catch (IllegalArgumentException e) {
    throw new IllegalArgumentException(MessageFormat.format(
        "Failed to resolve {0} ({1})",
        key,
        value), e);
  }
}
origin: asakusafw/asakusafw

private List<String> extractCommand(ServiceProfile<?> profile, String prefix) throws IOException {
  try {
    return ProcessUtil.extractCommandLineTokens(
        prefix,
        profile.getConfiguration(),
        profile.getContext().getContextParameters());
  } catch (IllegalArgumentException e) {
    throw new IOException(MessageFormat.format(
        "Failed to resolve command line tokens ({0})",
        profile.getPrefix() + '.' + prefix + '*'), e);
  }
}
origin: asakusafw/asakusafw

private List<String> extractCommand(
    ServiceProfile<?> profile,
    String prefix) throws IOException {
  try {
    return ProcessUtil.extractCommandLineTokens(
        prefix,
        profile.getConfiguration(),
        profile.getContext().getContextParameters());
  } catch (IllegalArgumentException e) {
    throw new IOException(MessageFormat.format(
        "Failed to resolve command line tokens ({0})",
        profile.getPrefix() + '.' + prefix + '*'), e);
  }
}
origin: asakusafw/asakusafw

@Override
protected void doConfigure(ServiceProfile<?> profile) throws InterruptedException, IOException {
  try {
    this.executor = ParallelJobExecutor.extract(
        profile.getPrefix(),
        profile.getConfiguration(),
        profile.getContext().getContextParameters());
  } catch (IllegalArgumentException e) {
    throw new IOException(MessageFormat.format(
        "Failed to configure job scheduler: {0}",
        profile.getPrefix()), e);
  }
}
origin: asakusafw/asakusafw

@Override
protected void configureExtension(ServiceProfile<?> profile) throws InterruptedException, IOException {
  try {
    this.executor = JschProcessExecutor.extract(
        profile.getPrefix(),
        profile.getConfiguration(),
        profile.getContext().getContextParameters());
  } catch (IllegalArgumentException e) {
    throw new IOException(MessageFormat.format(
        "Failed to configure SSH: {0}",
        profile.getPrefix()), e);
  } catch (JSchException e) {
    throw new IOException(MessageFormat.format(
        "Failed to configure SSH: {0}",
        profile.getPrefix()), e);
  }
}
origin: asakusafw/asakusafw

@Override
protected void configureExtension(ServiceProfile<?> profile) throws InterruptedException, IOException {
  try {
    this.executor = JschProcessExecutor.extract(
        profile.getPrefix(),
        profile.getConfiguration(),
        profile.getContext().getContextParameters());
  } catch (IllegalArgumentException e) {
    throw new IOException(MessageFormat.format(
        "Failed to configure SSH: {0}",
        profile.getPrefix()), e);
  } catch (JSchException e) {
    throw new IOException(MessageFormat.format(
        "Failed to configure SSH: {0}",
        profile.getPrefix()), e);
  }
}
origin: asakusafw/asakusafw

if (resolve) {
  try {
    string = getContext().getContextParameters().replace(string, true);
  } catch (IllegalArgumentException e) {
    throw new IllegalArgumentException(MessageFormat.format(
origin: asakusafw/asakusafw

      subPrefix,
      handlerKind,
      profile.getContext());
} catch (IllegalArgumentException e) {
  throw new IOException(MessageFormat.format(
origin: asakusafw/asakusafw

String unresolved = entry.getValue();
try {
  String value = profile.getContext().getContextParameters().replace(unresolved, true);
  resolved.put(key, value);
} catch (IllegalArgumentException e) {
origin: asakusafw/asakusafw

String unresolved = entry.getValue();
try {
  String value = profile.getContext().getContextParameters().replace(unresolved, true);
  resolved.put(key, value);
} catch (IllegalArgumentException e) {
com.asakusafw.yaess.coreServiceProfilegetContext

Javadoc

Returns the current profile context.

Popular methods of ServiceProfile

  • getConfiguration
    Returns the target configuration.
  • getPrefix
    Returns the key prefix of this profile.
  • getServiceClass
    Returns the service class.
  • load
    Loads a service profile with the specified key prefix.
  • newInstance
    Creates a new instance. The created service will automatically Service#configure(ServiceProfile)by u
  • normalize
    Normalizes the configuration value.
  • <init>
    Creates a new instance.

Popular in Java

  • Updating database using SQL prepared statement
  • getApplicationContext (Context)
  • setScale (BigDecimal)
  • getResourceAsStream (ClassLoader)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now