Codota Logo
TaskClient.connect
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
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

  • Making http post requests using okhttp
  • putExtra (Intent)
  • startActivity (Activity)
  • findViewById (Activity)
  • ArrayList (java.util)
    Resizable-array implementation of the List interface. Implements all optional list operations, and p
  • PriorityQueue (java.util)
    An unbounded priority Queue based on a priority heap. The elements of the priority queue are ordered
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • BoxLayout (javax.swing)
  • Option (scala)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now