Tabnine Logo
TaskClient.connect
Code IndexAdd Tabnine to your IDE (free)

How to use
connect
method
in
org.jbpm.task.service.TaskClient

Best Java code snippets using org.jbpm.task.service.TaskClient.connect (Showing top 9 results out of 315)

origin: org.jbpm/jbpm-human-task-jms

  @Override
  public void connect() {
    try {
      final Field field = WSHumanTaskHandler.class.getDeclaredField("client");
      TaskClient client = (TaskClient) field.get(this);
      if (client == null) {
        client = new TaskClient(new JMSTaskClientConnector(
            "org.jbpm.process.workitem.wsht.WSThroughJMSHumanTaskHandler",
            new JMSTaskClientHandler(SystemEventListenerFactory
                .getSystemEventListener()),
            WSHumanTaskJMSProperties.getInstance().getProperties(),
            new InitialContext(WSHumanTaskJMSProperties.getInstance().getProperties())));
        field.set(this, client);
        boolean connected = client.connect();
        if (!connected) {
          throw new IllegalArgumentException("Could not connect to the task client");
        }
      }
      super.connect();
    } catch (NoSuchFieldException e) {
      throw new RuntimeException("Problem configuring the human task connector", e);
    } catch (IllegalAccessException e) {
      throw new RuntimeException("Problem accessing the human task connector", e);
    } catch (NamingException e) {
      throw new RuntimeException("Problem accesing the JNDI directory", e);
    }
  }
}
origin: org.jbpm/jbpm-human-task-jms

  @Override
  public void connect() {
    try {
      final Field field = WSHumanTaskHandler.class.getDeclaredField("client");
      TaskClient client = (TaskClient) field.get(this);
      if (client == null) {
        client = new TaskClient(new JMSTaskClientConnector(
            "org.drools.process.workitem.wsht.WSThroughJMSHumanTaskHandler",
            new JMSTaskClientHandler(SystemEventListenerFactory
                .getSystemEventListener()),
            WSHumanTaskJMSProperties.getInstance().getProperties(),
            new InitialContext(WSHumanTaskJMSProperties.getInstance().getProperties())));
        field.set(this, client);
        boolean connected = client.connect();
        if (!connected) {
          throw new IllegalArgumentException("Could not connect to the task client");
        }
      }
      super.connect();
    } catch (NoSuchFieldException e) {
      throw new RuntimeException("Problem configuring the human task connector", e);
    } catch (IllegalAccessException e) {
      throw new RuntimeException("Problem accessing the human task connector", e);
    } catch (NamingException e) {
      throw new RuntimeException("Problem accesing the JNDI directory", e);
    }
  }
}
origin: org.jbpm/jbpm-human-task-hornetq

protected TaskService createClient(String clientName) { 
  TaskClient taskClient = new AsyncHornetQTaskClient();
  taskClient.connect("127.0.0.1", 5153);
  
  TaskService client = new SyncTaskServiceWrapper(taskClient);
  return client;
}

origin: salaboy/jBPM5-Developer-Guide

private void init() {
  taskClient = new TaskClient(new HornetQTaskClientConnector("client 1",
      new HornetQTaskClientHandler(SystemEventListenerFactory.getSystemEventListener())));
  boolean connected = taskClient.connect("127.0.0.1", 5443);
  System.out.println("Connected ? =>" + connected);
}

origin: org.jbpm/jbpm-human-task-mina

public void connect() {
  if (client == null) {
    client = new TaskClient(new MinaTaskClientConnector("org.drools.process.workitem.wsht.WSHumanTaskHandler", 
                              new MinaTaskClientHandler(SystemEventListenerFactory.getSystemEventListener())));
    boolean connected = client.connect(ipAddress, port);
    if (!connected) {
      throw new IllegalArgumentException("Could not connect task client");
    }
    registerTaskEventHandlers();
  }
 
}
origin: org.jbpm/jbpm-human-task-mina

public void connect() {
  if (!initialized) {
    if (client == null) {
      client = new TaskClient(new MinaTaskClientConnector("org.drools.process.workitem.wsht.WSHumanTaskHandler",
                    new MinaTaskClientHandler(SystemEventListenerFactory.getSystemEventListener())));
      boolean connected = client.connect(ipAddress, port);
       if (!connected) {
        throw new IllegalArgumentException("Could not connect task client");
      }
    }
    registerTaskEventHandlers();
          initialized = true;
  }
 
}

origin: org.jbpm/jbpm-gwt-core

String host = properties.getProperty("jbpm.console.task.service.host", Utils.DEFAULT_IP_ADDRESS);
int port = Utils.getTaskServicePort(properties);
boolean connected = client.connect(host, port);
if (!connected) {
  throw new IllegalArgumentException("Could not connect task client " + strategy + "(" + host + ":" + port + ")");
origin: org.jbpm/org.jbpm.eclipse.task

private TaskClient getTaskClient() {
  if (client == null) {
    String transportType = "unknown";
    if (transport == 0) {
      transportType = "Apache Mina";
      client = new TaskClient(new MinaTaskClientConnector("Eclipse-Mina",
        new MinaTaskClientHandler(SystemEventListenerFactory.getSystemEventListener())));
      
    } else if (transport == 1) {
      transportType = "HornetQ";
      client = new TaskClient(new HornetQTaskClientConnector("Eclipse-HornetQ",
        new HornetQTaskClientHandler(SystemEventListenerFactory.getSystemEventListener())));
      
    }
    boolean connected = client.connect(ipAddress, port);
    if (!connected) {
      showMessage("Could not connect to task server: " + ipAddress + " [port " + port + "] transport " + transportType);
      client = null;
    }
  }
  return client;
}
origin: org.jbpm/jbpm-human-task-jms

client.connect();
client.connect();
org.jbpm.task.serviceTaskClientconnect

Popular methods of TaskClient

  • <init>
  • addTask
  • disconnect
  • complete
  • getTasksAssignedAsPotentialOwner
  • start
  • claim
  • exit
  • fail
  • forward
  • getContent
  • getTask
  • getContent,
  • getTask,
  • getTaskByWorkItemId,
  • registerForEvent,
  • release,
  • remove,
  • resume,
  • skip,
  • stop

Popular in Java

  • Creating JSON documents from java classes using gson
  • getExternalFilesDir (Context)
  • setScale (BigDecimal)
  • setContentView (Activity)
  • String (java.lang)
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Collectors (java.util.stream)
  • Runner (org.openjdk.jmh.runner)
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now