本文整理汇总了Java中org.jboss.forge.furnace.util.Callables类的典型用法代码示例。如果您正苦于以下问题:Java Callables类的具体用法?Java Callables怎么用?Java Callables使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Callables类属于org.jboss.forge.furnace.util包,在下文中一共展示了Callables类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: waitForConfigurationRescan
import org.jboss.forge.furnace.util.Callables; //导入依赖的package包/类
private <T> T waitForConfigurationRescan(Callable<T> action)
{
ConfigurationScanListener listener = new ConfigurationScanListener();
ListenerRegistration<ContainerLifecycleListener> registration = runnable.furnace
.addContainerLifecycleListener(listener);
T result = Callables.call(action);
while (runnable.furnace.getStatus().isStarting() || !listener.isConfigurationScanned())
{
try
{
Thread.sleep(100);
}
catch (InterruptedException e)
{
throw new RuntimeException("Sleep interrupted while waiting for configuration rescan.", e);
}
}
registration.removeListener();
return result;
}
示例2: stopAddon
import org.jboss.forge.furnace.util.Callables; //导入依赖的package包/类
public void stopAddon(Addon addon)
{
Callables.call(new StopAddonCallable(stateManager, addon));
incrementViewVersions(addon);
}
示例3: startAddon
import org.jboss.forge.furnace.util.Callables; //导入依赖的package包/类
public void startAddon(Addon addon)
{
Assert.notNull(addon, "Addon to start must not be null.");
Callables.call(new StartEnabledAddonCallable(furnace, this, stateManager, executor, starting, addon));
}
示例4: performLocked
import org.jboss.forge.furnace.util.Callables; //导入依赖的package包/类
@Override
public <T> T performLocked(LockMode mode, Callable<T> task)
{
return Callables.call(task);
}