Example usage for javax.resource.spi BootstrapContext getWorkManager

List of usage examples for javax.resource.spi BootstrapContext getWorkManager

Introduction

In this page you can find the example usage for javax.resource.spi BootstrapContext getWorkManager.

Prototype

WorkManager getWorkManager();

Source Link

Document

Provides a handle to a WorkManager instance.

Usage

From source file:com.grapevineim.xmpp.ra.ResourceAdapterImpl.java

public void start(BootstrapContext ctx) throws ResourceAdapterInternalException {

    // get the work manager
    this.workManager = ctx.getWorkManager();

}

From source file:org.tomitribe.chatterbox.slack.adapter.SlackResourceAdapter.java

public void start(BootstrapContext bootstrapContext) throws ResourceAdapterInternalException {
    workManager = bootstrapContext.getWorkManager();
    webApiClient = SlackClientFactory.createWebApiClient(token);
    slackRealTimeMessagingClient = SlackClientFactory.createSlackRealTimeMessagingClient(token);

    final Authentication authentication = webApiClient.auth();
    user = authentication.getUser();// www  .  jav  a2 s  .co  m
    userId = authentication.getUser_id();

    webApiClient.setPresenceUser(Presence.AUTO);

    slackRealTimeMessagingClient.addListener(Event.MESSAGE, this);
    slackRealTimeMessagingClient.connect();
    main = new Main();
}

From source file:me.jtalk.socketconnector.SocketResourceAdapter.java

@Override
public void start(BootstrapContext ctx) throws ResourceAdapterInternalException {
    log.info("Starting Socket resource adapter");
    this.workManager = ctx.getWorkManager();
    this.running.set(true);
    log.info("Socket resource adapter is started");
}