Java Reference

Intro to Services

Introduction

This page serves as an introduction to many KOS services, which are software objects built into the KOS system that provides essential capabilities. They exists throughout the lifetime of your application.

Overview

Services are:

  • Singletons

  • Created by the KOS system

  • Exist in the system BeanContext

  • Accessed by either

    • instantiating them using the @Autowired annotation, or

    • accessing existing objects using the KosUtil static accessors.

Here’s an example of each:

How to autowire a service into your code
public class MyClass() {

    @Autowired
    private ChromeService chromeService; (1)

    private void someMethod() {
        if (KosCore.isPrimary()) { (2)
        }
    }
}
1 Autowiring the KOS-supplied ChromeService into your code
2 Using the global static accessor KosCore

Of course, MyClass must exist in the system’s BeanContext.

Previous
Next
On this page
Java Development
Seamlessly transition from Legacy+ systems to Freestyle microdosing and advanced distributed dispense systems.
UI Development
Using KOS SDKs, integrating Consumer and Non-consumer facing UIs becomes seamless, giving you less hassle and more time to create.
Video Library
Meet some of our development team, as they lead you through the tools, features, and tips and tricks of various KOS tools.
Resources
Familiarize yourself with KOS terminology, our reference materials, and explore additional resources that complement your KOS journey.
Copyright © 2024 TCCC. All rights reserved.