Signal API
The Signal Service is a component at the service layer of the BDK which aims to cover the Signal part of the REST API documentation. More precisely:
- List signals
- Get a signal
- Create a signal
- Update a signal
- Delete a signal
- Subscribe Signal
- Unsubscribe Signal
- Subscribers
How to use
The central component for the Signal Service is the SignalService
class. This class exposes the user-friendly service APIs which serve all the services mentioned above and is accessible from the SymphonyBdk
object by calling the signals()
method:
@Slf4j
public class Example {
public static final String SIGNAL_ID = "MY_SIGNAL_ID";
public static void main(String[] args) throws Exception {
// Create BDK entry point
final SymphonyBdk bdk = new SymphonyBdk(loadFromClasspath("/config.yaml"));
// Get signal details
SignalService signals = bdk.signals();
Signal signal = signals.getSignal(SIGNAL_ID);
log.info("Signal details: " + signal);
}
}