本文整理了Java中org.datatransferproject.api.launcher.Monitor.info()
方法的一些代码示例,展示了Monitor.info()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Monitor.info()
方法的具体详情如下:
包路径:org.datatransferproject.api.launcher.Monitor
类名称:Monitor
方法名:info
[英]Records a info level event.
[中]记录信息级别的事件。
代码示例来源:origin: google/data-transfer-project
@Override
public void info(Supplier<String> supplier, Object... data) {
for (Monitor delegate : delegates) {
delegate.info(supplier, data);
}
}
代码示例来源:origin: google/data-transfer-project
public void debug(String msg, Throwable thrown) {
DELEGATE.info(() -> msg, thrown);
}
代码示例来源:origin: google/data-transfer-project
public void info(String msg, Object... args) {
DELEGATE.info(() -> msg);
}
代码示例来源:origin: google/data-transfer-project
public void warn(String msg, Throwable thrown) {
DELEGATE.info(() -> msg, thrown);
}
代码示例来源:origin: google/data-transfer-project
public void info(Throwable thrown) {
DELEGATE.info(() -> "Error processing request", thrown);
}
代码示例来源:origin: google/data-transfer-project
public void info(String msg, Throwable thrown) {
DELEGATE.info(() -> msg, thrown);
}
代码示例来源:origin: google/data-transfer-project
public JettyTransport(KeyStore keyStore, boolean useHttps, Monitor monitor) {
this.keyStore = keyStore;
this.useHttps = useHttps;
this.monitor = monitor;
System.setProperty(LOG_CLASS, JettyMonitor.class.getName()); // required by Jetty
System.setProperty(ANNOUNCE, "false");
monitor.info(() -> "Creating JettyTransport. useHttps=" + useHttps);
}
代码示例来源:origin: google/data-transfer-project
@Override
public void initialize(ExtensionContext context) {
if (initialized) return;
AppCredentials appCredentials;
try {
appCredentials =
context
.getService(AppCredentialStore.class)
.getAppCredentials("FACEBOOK_KEY", "FACEBOOK_SECRET");
} catch (IOException e) {
Monitor monitor = context.getMonitor();
monitor.info(
() -> "Unable to retrieve Facebook AppCredentials. Did you set FACEBOOK_KEY and FACEBOOK_SECRET?", e);
return;
}
ImmutableMap.Builder<String, Importer> importerBuilder = ImmutableMap.builder();
importerMap = importerBuilder.build();
ImmutableMap.Builder<String, Exporter> exporterBuilder = ImmutableMap.builder();
exporterBuilder.put("PHOTOS", new FacebookPhotosExporter(appCredentials));
exporterMap = exporterBuilder.build();
initialized = true;
}
}
代码示例来源:origin: google/data-transfer-project
/** Starts the api server, currently the reference implementation. */
public static void main(String[] args) {
Monitor monitor = loadMonitor();
monitor.info(() -> "Starting API Server.");
Thread.setDefaultUncaughtExceptionHandler(
(thread, t) ->
monitor.severe(() -> "Uncaught exception in thread: " + thread.getName(), t));
ApiMain apiMain = new ApiMain(monitor);
apiMain.initializeHttp();
apiMain.start();
}
代码示例来源:origin: google/data-transfer-project
try {
server.start();
monitor.info(() -> "Using Jetty transport");
} catch (Exception e) {
throw new RuntimeException("Error starting Jetty transport", e);
代码示例来源:origin: google/data-transfer-project
@Override
public void initialize(ExtensionContext context) {
if (initialized) {
return;
}
monitor = context.getMonitor();
String serviceName = oAuth1Config.getServiceName().toUpperCase();
String keyName = serviceName + "_KEY";
String secretName = serviceName + "_SECRET";
try {
appCredentials =
context.getService(AppCredentialStore.class).getAppCredentials(keyName, secretName);
} catch (IOException e) {
monitor.info(
() ->
format(
"Unable to retrieve OAuth1 AppCredentials. Did you set %s and %s?",
keyName, secretName),
e);
return;
}
exportAuthDataGenerators = new HashMap<>();
importAuthDataGenerators = new HashMap<>();
httpTransport = context.getService(HttpTransport.class);
initialized = true;
}
代码示例来源:origin: google/data-transfer-project
@Override
public void initialize(ExtensionContext context) {
if (initialized) {
return;
}
String serviceName = oAuth2Config.getServiceName().toUpperCase();
String keyName = serviceName + "_KEY";
String secretName = serviceName + "_SECRET";
try {
appCredentials =
context.getService(AppCredentialStore.class).getAppCredentials(keyName, secretName);
} catch (IOException e) {
Monitor monitor = context.getMonitor();
monitor.info(
() ->
format(
"Unable to retrieve OAuth1 AppCredentials. Did you set %s and %s?",
keyName, secretName),
e);
return;
}
importAuthDataGenerators = new HashMap<>();
exportAuthDataGenerators = new HashMap<>();
httpTransport = context.getService(HttpTransport.class);
initialized = true;
}
代码示例来源:origin: google/data-transfer-project
monitor.info(() -> "Using CloudExtension: " + cloudExtension.getClass().getName());
代码示例来源:origin: google/data-transfer-project
} catch (IOException e) {
Monitor monitor = context.getMonitor();
monitor.info(
() ->
"Unable to retrieve Google AppCredentials. Did you set GOOGLE_KEY and GOOGLE_SECRET?");
代码示例来源:origin: google/data-transfer-project
@Override
public void initialize(ExtensionContext context) {
if (initialized) return;
jobStore = context.getService(JobStore.class);
try {
appCredentials =
context.getService(AppCredentialStore.class).getAppCredentials(FLICKR_KEY, FLICKR_SECRET);
} catch (Exception e) {
Monitor monitor = context.getMonitor();
monitor.info(
() ->
format(
"Unable to retrieve Flickr AppCredentials. Did you set %s and %s?",
FLICKR_KEY, FLICKR_SECRET),
e);
initialized = false;
return;
}
importer = new FlickrPhotosImporter(appCredentials, jobStore);
exporter = new FlickrPhotosExporter(appCredentials);
initialized = true;
}
}
代码示例来源:origin: google/data-transfer-project
@Override
public void initialize(ExtensionContext context) {
if (initialized) return;
AppCredentials appCredentials;
try {
appCredentials =
context.getService(AppCredentialStore.class).getAppCredentials(RTM_KEY, RTM_SECRET);
} catch (IOException e) {
Monitor monitor = context.getMonitor();
monitor.info(
() ->
format(
"Unable to retrieve RememberTheMilk AppCredentials. Did you set %s and %s?",
RTM_KEY, RTM_SECRET),
e);
return;
}
Monitor monitor = context.getMonitor();
importAuthDataGenerator =
new RememberTheMilkAuthDataGenerator(appCredentials, AuthMode.IMPORT, monitor);
exportAuthDataGenerator =
new RememberTheMilkAuthDataGenerator(appCredentials, AuthMode.EXPORT, monitor);
initialized = true;
}
}
代码示例来源:origin: google/data-transfer-project
@Override
public void initialize(ExtensionContext context) {
if (initialized) return;
JobStore jobStore = context.getService(JobStore.class);
AppCredentials credentials;
try {
credentials =
context.getService(AppCredentialStore.class).getAppCredentials(RTM_KEY, RTM_SECRET);
} catch (IOException e) {
Monitor monitor = context.getMonitor();
monitor.info(
() ->
format(
"Unable to retrieve RememberTheMilk AppCredentials. Did you set %s and %s?",
RTM_KEY, RTM_SECRET),
e);
return;
}
Monitor monitor = context.getMonitor();
exporter = new RememberTheMilkTasksExporter(credentials);
importer = new RememberTheMilkTasksImporter(credentials, jobStore, monitor);
initialized = true;
}
}
代码示例来源:origin: google/data-transfer-project
@Override
public void initialize(ExtensionContext context) {
Monitor monitor = context.getMonitor();
monitor.debug(() -> "Starting Twitter initialization");
if (initialized) {
monitor.severe(() -> "TwitterTransferExtension already initialized.");
return;
}
AppCredentials appCredentials;
try {
appCredentials =
context
.getService(AppCredentialStore.class)
.getAppCredentials(TWITTER_KEY, TWITTER_SECRET);
} catch (IOException e) {
monitor.info(
() ->
format(
"Unable to retrieve Twitter AppCredentials. Did you set %s and %s?",
TWITTER_KEY, TWITTER_SECRET),
e);
return;
}
exporter = new TwitterPhotosExporter(appCredentials, monitor);
importer = new TwitterPhotosImporter(appCredentials, monitor);
initialized = true;
}
}
代码示例来源:origin: google/data-transfer-project
.getAppCredentials(SMUGMUG_KEY, SMUGMUG_SECRET);
} catch (IOException e) {
monitor.info(
() ->
format(
代码示例来源:origin: google/data-transfer-project
folders.add(new BlobbyStorageContainerResource(file.getName(), file.getId(), null, null));
} else if (FUSION_TABLE_MIME_TYPE.equals(file.getMimeType())) {
monitor.info(() -> "Exporting of fusion tables is not yet supported: " + file);
} else if (MAP_MIME_TYPE.equals(file.getMimeType())) {
monitor.info(() -> "Exporting of maps is not yet supported: " + file);
} else {
try {
monitor.info(() -> "Exported " + file);
内容来源于网络,如有侵权,请联系作者删除!