in bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/BKHttpServiceProvider.java [184:261]
public HttpEndpointService provideHttpEndpointService(ApiType type) {
ServerConfiguration configuration = getServerConf();
if (configuration == null) {
return new ErrorHttpService();
}
switch (type) {
case HEARTBEAT:
return new HeartbeatService();
case SERVER_CONFIG:
return new ConfigurationService(configuration);
case METRICS:
return new MetricsService(configuration, statsProvider);
// ledger
case DELETE_LEDGER:
return new DeleteLedgerService(configuration);
case LIST_LEDGER:
return new ListLedgerService(configuration, ledgerManagerFactory);
case GET_LEDGER_META:
return new GetLedgerMetaService(configuration, ledgerManagerFactory);
case READ_LEDGER_ENTRY:
return new ReadLedgerEntryService(configuration, bka);
// bookie
case LIST_BOOKIES:
return new ListBookiesService(configuration, bka);
case LIST_BOOKIE_INFO:
return new ListBookieInfoService(configuration);
case LAST_LOG_MARK:
return new GetLastLogMarkService(configuration);
case LIST_DISK_FILE:
return new ListDiskFilesService(configuration);
case EXPAND_STORAGE:
return new ExpandStorageService(configuration);
case GC:
return new TriggerGCService(configuration, bookieServer);
case GC_DETAILS:
return new GCDetailsService(configuration, bookieServer);
case BOOKIE_STATE:
return new BookieStateService(bookieServer.getBookie());
case BOOKIE_SANITY:
return new BookieSanityService(configuration);
case BOOKIE_STATE_READONLY:
return new BookieStateReadOnlyService(bookieServer.getBookie());
case BOOKIE_IS_READY:
return new BookieIsReadyService(bookieServer.getBookie());
case BOOKIE_INFO:
return new BookieInfoService(bookieServer.getBookie());
case CLUSTER_INFO:
return new ClusterInfoService(bka, ledgerManagerFactory);
case SUSPEND_GC_COMPACTION:
return new SuspendCompactionService(bookieServer);
case RESUME_GC_COMPACTION:
return new ResumeCompactionService(bookieServer);
case TRIGGER_ENTRY_LOCATION_COMPACT:
return new TriggerLocationCompactService(bookieServer);
// autorecovery
case AUTORECOVERY_STATUS:
return new AutoRecoveryStatusService(configuration);
case RECOVERY_BOOKIE:
return new RecoveryBookieService(configuration, bka, executor);
case LIST_UNDER_REPLICATED_LEDGER:
return new ListUnderReplicatedLedgerService(configuration, ledgerManagerFactory);
case WHO_IS_AUDITOR:
return new WhoIsAuditorService(configuration, bka);
case TRIGGER_AUDIT:
return new TriggerAuditService(configuration, bka);
case LOST_BOOKIE_RECOVERY_DELAY:
return new LostBookieRecoveryDelayService(configuration, bka);
case DECOMMISSION:
return new DecommissionService(configuration, bka, executor);
default:
return new ConfigurationService(configuration);
}
}