本文整理汇总了Java中jetbrains.buildServer.serverSide.BuildServerAdapter类的典型用法代码示例。如果您正苦于以下问题:Java BuildServerAdapter类的具体用法?Java BuildServerAdapter怎么用?Java BuildServerAdapter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
BuildServerAdapter类属于jetbrains.buildServer.serverSide包,在下文中一共展示了BuildServerAdapter类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ReportsFeature
import jetbrains.buildServer.serverSide.BuildServerAdapter; //导入依赖的package包/类
public ReportsFeature(EventDispatcher<BuildServerListener> dispatcher, @NotNull ReportsDescriptor descriptor, @NotNull ReportsConstants constants) {
this.editParametersUrl = descriptor.getFeaturePath();
this.constants = constants;
this.jsonFactory = JacksonFactory.getDefaultInstance();
try {
this.httpTransport = GoogleNetHttpTransport.newTrustedTransport();
} catch (GeneralSecurityException | IOException e) {
throw new RuntimeException(e);
}
if (dispatcher != null) {
dispatcher.addListener(new BuildServerAdapter() {
@Override
public void buildFinished(SRunningBuild build) {
handleBuildFinished(build);
}
});
}
}
示例2: CacheManagerImpl
import jetbrains.buildServer.serverSide.BuildServerAdapter; //导入依赖的package包/类
public CacheManagerImpl(MetricRegistry metricRegistry, BuildTriggerProperties buildTriggerProperties, @NotNull EventDispatcher<BuildServerListener> eventDispatcher) {
this.buildTriggerProperties = buildTriggerProperties;
this.ehCacheManager = net.sf.ehcache.CacheManager.newInstance();
eventDispatcher.addListener(new BuildServerAdapter() {
public void serverShutdown() {
LOG.debug("Server shutdown initiated - shutting down ehCacheManager");
ehCacheManager.shutdown();
cacheAlive = false;
LOG.debug("Server shutdown initiated - ehCacheManager shutdown complete");
}
});
this.cacheAlive = true;
this.metricRegistry = metricRegistry;
this.caches = new HashMap<>();
}
示例3: setupScheduledTask
import jetbrains.buildServer.serverSide.BuildServerAdapter; //导入依赖的package包/类
private void setupScheduledTask() throws IOException, InvalidCacheConfigurationException, NoSuchAlgorithmException, URISyntaxException, InvalidOctopusApiKeyException, ParseException, InvalidOctopusUrlException, UnexpectedResponseCodeException, KeyStoreException, ProjectNotFoundException, KeyManagementException {
eventDispatcher.addListener(new BuildServerAdapter() {
public void serverShutdown() {
LOG.debug("Server shutdown initiated - shutting down updateChecker");
if(scheduler != null) {
scheduler.shutdown();
}
LOG.debug("Server shutdown initiated - updateChecker shutdown complete");
}
});
scheduler.scheduleAtFixedRate(() -> checkForUpdates(), 60, 60, TimeUnit.MINUTES);
checkForUpdates();
}
示例4: VSONotificatorConfigHolder
import jetbrains.buildServer.serverSide.BuildServerAdapter; //导入依赖的package包/类
public VSONotificatorConfigHolder(@NotNull ServerPaths serverPaths, @NotNull SBuildServer server) throws IOException {
myConfig = new VSONotificatorConfig(serverPaths);
server.addListener(new BuildServerAdapter() {
@Override
public void serverShutdown() {
myConfig.dispose();
}
});
}
示例5: TorrentTrackerManager
import jetbrains.buildServer.serverSide.BuildServerAdapter; //导入依赖的package包/类
public TorrentTrackerManager(@NotNull final TorrentConfigurator configurator,
@NotNull final ExecutorServices executorServices,
@NotNull final EventDispatcher<BuildServerListener> dispatcher,
@NotNull final AddressChecker addressChecker) {
myConfigurator = configurator;
myExecutorService = executorServices.getNormalExecutorService();
myTrackerService = new TrackerRequestProcessor(addressChecker);
myTrackerService.setAcceptForeignTorrents(true);
myTorrents = new ConcurrentHashMap<String, TrackedTorrent>();
dispatcher.addListener(new BuildServerAdapter(){
@Override
public void serverShutdown() {
stopTracker();
}
@Override
public void serverStartup() {
if (configurator.isTrackerEnabled()) {
startTracker();
}
}
});
myConfigurator.addPropertyChangeListener(new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent evt) {
if (evt.getNewValue() instanceof Integer){
integerPropertyChanged(evt.getPropertyName(), (Integer) evt.getNewValue());
} else if (evt.getNewValue() instanceof Boolean){
booleanPropertyChanged(evt.getPropertyName(), (Boolean) evt.getNewValue());
}
}
});
}