Skip to content

Instantly share code, notes, and snippets.

View bbalakriz's full-sized avatar

bbalakriz

View GitHub Profile
@bbalakriz
bbalakriz / CustomWIH.java
Created September 26, 2018 16:45
Custom Work Item Handler Impl
package com.bala.custom.wih;
import java.util.HashMap;
import java.util.Map;
import org.kie.api.runtime.process.WorkItem;
import org.kie.api.runtime.process.WorkItemHandler;
import org.kie.api.runtime.process.WorkItemManager;
public class CustomWIH implements WorkItemHandler {
time="2019-02-15T06:07:00Z" level=debug msg="Fetching \"Terraform Variables\"..."
time="2019-02-15T06:07:00Z" level=debug msg="Loading \"Terraform Variables\"..."
time="2019-02-15T06:07:00Z" level=debug msg=" Loading \"Cluster ID\"..."
time="2019-02-15T06:07:00Z" level=debug msg=" Loading \"Install Config\"..."
time="2019-02-15T06:07:00Z" level=debug msg=" Loading \"SSH Key\"..."
time="2019-02-15T06:07:00Z" level=debug msg=" Loading \"Base Domain\"..."
time="2019-02-15T06:07:00Z" level=debug msg=" Loading \"Platform\"..."
time="2019-02-15T06:07:00Z" level=debug msg=" Loading \"Cluster Name\"..."
time="2019-02-15T06:07:00Z" level=debug msg=" Loading \"Base Domain\"..."
time="2019-02-15T06:07:00Z" level=debug msg=" Loading \"Pull Secret\"..."
time="2019-02-25T04:08:51Z" level=debug msg="Fetching \"Install Config\"..."
time="2019-02-25T04:08:51Z" level=debug msg="Loading \"Install Config\"..."
time="2019-02-25T04:08:51Z" level=debug msg=" Loading \"SSH Key\"..."
time="2019-02-25T04:08:51Z" level=debug msg=" Loading \"Base Domain\"..."
time="2019-02-25T04:08:51Z" level=debug msg=" Loading \"Platform\"..."
time="2019-02-25T04:08:51Z" level=debug msg=" Loading \"Cluster Name\"..."
time="2019-02-25T04:08:51Z" level=debug msg=" Loading \"Pull Secret\"..."
time="2019-02-25T04:08:51Z" level=debug msg=" Loading \"Platform\"..."
time="2019-02-25T04:08:51Z" level=debug msg=" Fetching \"SSH Key\"..."
time="2019-02-25T04:08:51Z" level=debug msg=" Generating \"SSH Key\"..."
@bbalakriz
bbalakriz / CustomWSWIH.java
Created July 8, 2019 12:39
Custom SOAP Header Webservice Work Item Handler
package com.bala.custom.wih;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.JAXBException;
import javax.xml.namespace.QName;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.headers.Header;
@bbalakriz
bbalakriz / CustomWSWIH.java
Last active March 14, 2022 14:47
Webservice work item handler with custom SOAP headers
package com.bala.custom.wih;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.JAXBException;
import javax.xml.namespace.QName;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.headers.Header;
package com.bala.rhpam.test;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
public class ConcurrentHTTPGetStatusLogger {
private static final int MYTHREADS = 700;
@bbalakriz
bbalakriz / Transaction.java
Created February 25, 2020 07:44
Amended Transaction.java
package com.bmi.calc;
/**
* This class was automatically generated by the data modeler tool.
*/
import java.io.Serializable;
import java.time.LocalDateTime;
import org.kie.api.definition.type.Label;
@bbalakriz
bbalakriz / tweet-poller-camel.properties
Last active May 6, 2020 10:43
tweet-poller-app-properties
# camel twitter search config
camel.component.twitter-search.consumerKey=xxxxxYyfr2o9mxaay4
camel.component.twitter-search.consumerSecret=xxxxxxxxxxfOdhNqGE8EGVC6pKmDpfEJe1V6
camel.component.twitter-search.accessToken=xxxxxxx-44ZwHxl6zTWz0xO4Jh4qJKdyZMw
camel.component.twitter-search.accessTokenSecret=xxxxxxSW1ojFqOW7nT4W7frzNladZUUWpd2a
@bbalakriz
bbalakriz / CamelResource.java
Created May 8, 2020 04:06
CamelResource.java
@Path("/twitter")
@ApplicationScoped
public class CamelResource {
final Logger LOG = Logger.getLogger(CamelResource.class);
String twitterSearchUri = "twitter-search://#" + "$$TOPIC" + "?count=10&lang=en-us";
@Inject
@Channel("twitter-feeds")
Emitter<Feed> emitter;
@bbalakriz
bbalakriz / tweet-poller-kafka.properties
Created May 8, 2020 04:26
tweet-poller-kafka.properties
# kafka twitter-feeds config
mp.messaging.outgoing.twitter-feeds.bootstrap.servers=localhost:9092
mp.messaging.outgoing.twitter-feeds.connector=smallrye-kafka
mp.messaging.outgoing.twitter-feeds.key.serializer=org.apache.kafka.common.serialization.StringSerializer
mp.messaging.outgoing.twitter-feeds.value.serializer=com.redhat.hackfest.serializers.FeedSerializer