ServiceManager

@Component
class ServiceManager : ApplicationContextAware

ServiceManager is the central building block that knows about all registered components and services + and is able to create the corresponding proxies.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
var applicationContext: ApplicationContext?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@Autowired
lateinit var exceptionManager: ExceptionManager
Link copied to clipboard

Functions

Link copied to clipboard
fun <T : Service> acquireAdministrativeService(component: String, clazz: Class<T>): T
Link copied to clipboard
Link copied to clipboard
fun <T : Service> acquireLocalService(serviceClass: Class<T>): T

create a service proxy which will call the local implementation

Link copied to clipboard
fun <T : Service> acquireService(serviceClass: Class<T>, preferredChannel: String? = null): T

create a service proxy for a remote service. A proxy will be created even if no channels are registered.

Link copied to clipboard
fun getChannel(component: String, address: ServiceAddress): Channel

Get return a suitable channel for the given component descriptor and address

Link copied to clipboard

handle exceptions throw by the service method by unwrapping reflection wrappers ( e.g. UndeclaredThrowable ) first If the exception is part of the signature, the exception is simply rethrown. Only if not, it will be delegates to the central exception manager to handle it, and then wrapped in a FatalException. If a FatalException is caught it will be rethrown immediately

Link copied to clipboard
open override fun setApplicationContext(applicationContext: ApplicationContext)
Link copied to clipboard
@PostConstruct
fun setup()
Link copied to clipboard
@PreDestroy
fun shutdown()
Link copied to clipboard
fun startup(port: Int)

startup the service manager under the passed local port which will in turn register all local components.