Skip to content

Commit

Permalink
Merge pull request #861 from shilmyhasan/master
Browse files Browse the repository at this point in the history
Adding Event client for APIM
  • Loading branch information
dilini-muthumala authored Oct 26, 2018
2 parents 7af5563 + 6dec6b0 commit b5eb6ac
Show file tree
Hide file tree
Showing 15 changed files with 968 additions and 0 deletions.
87 changes: 87 additions & 0 deletions modules/samples/sample-clients/apim-event-client/build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
<!--
~ Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
~
~ WSO2 Inc. licenses this file to you under the Apache License,
~ Version 2.0 (the "License"); you may not use this file except
~ in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->

<project default="run">

<property name="carbon.home" value="../../../"/>
<property name="src.dir" value="src/main/java"/>
<property name="temp.dir" value="temp"/>
<property name="class.dir" value="${temp.dir}/classes"/>
<property name="main-class" value="org.wso2.carbon.sample.apimevent.Client"/>

<property name="protocol" value="thrift"/>
<property name="host" value="localhost"/>
<property name="port" value="7611"/>
<property name="username" value="admin"/>
<property name="password" value="admin"/>
<property name="numberOfEvents" value="100" />

<path id="javac.classpath">
<pathelement path="${class.dir}"/>
<fileset dir="${carbon.home}/wso2/lib/plugins">
<include name="commons-pool_*.jar"/>
<include name="com.google.gson_*.jar"/>
<include name="org.apache.commons.logging_*.jar"/>
<include name="libthrift_0.9.*.jar"/>
<include name="slf4j.log4j12_1.7.*.jar"/>
<include name="slf4j.api_*.jar"/>
<include name="org.yaml.snakeyaml_*.jar"/>
<include name="disruptor_*.jar"/>
<include name="org.wso2.carbon.config_2.1.*.jar"/>
<include name="org.wso2.carbon.secvault_5.0.*.jar"/>
<include name="org.wso2.carbon.utils_2.0.*.jar"/>
<include name="org.wso2.carbon.databridge.agent_6.0.*.jar"/>
<include name="org.wso2.carbon.databridge.commons.thrift_6.0.*.jar"/>
<include name="org.wso2.carbon.databridge.commons.binary_6.0.*.jar"/>
<include name="org.wso2.carbon.databridge.commons_6.0.*.jar"/>
<include name="org.ops4j.pax.logging.pax-logging-log4j2_*.jar"/>
<include name="org.ops4j.pax.logging.pax-logging-api_*.jar"/>
</fileset>

</path>

<target name="clean">
<delete dir="${class.dir}" quiet="true"/>
<delete dir="${temp.dir}"/>
</target>

<target name="init">
<mkdir dir="${temp.dir}"/>
<mkdir dir="${class.dir}"/>
</target>

<target name="compile" depends="init">
<javac srcdir="${src.dir}" destdir="${class.dir}" compiler="modern">
<include name="*/**"/>
<classpath refid="javac.classpath"/>
</javac>
</target>

<target name="run" depends="compile">
<echo>Configure -Dprotocol and -Dhost and -Dport and -Dusername and -Dpassword. </echo>
<java classname="${main-class}"
classpathref="javac.classpath" fork="true">
<arg value="${protocol}"/>
<arg value="${host}"/>
<arg value="${port}"/>
<arg value="${username}"/>
<arg value="${password}"/>
<arg value="${numberOfEvents}"/>
</java>
</target>
</project>
65 changes: 65 additions & 0 deletions modules/samples/sample-clients/apim-event-client/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
~ Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<parent>
<groupId>org.wso2.sp</groupId>
<artifactId>sample-clients</artifactId>
<version>4.4.0-m6-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<modelVersion>4.0.0</modelVersion>
<name>WSO2 Stream Processor - Sample - apim-event-client</name>
<artifactId>apim-event-client</artifactId>
<packaging>pom</packaging>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>org.wso2.carbon.analytics-common</groupId>
<artifactId>org.wso2.carbon.databridge.commons</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.carbon.analytics-common</groupId>
<artifactId>org.wso2.carbon.databridge.commons.thrift</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.carbon.analytics-common</groupId>
<artifactId>org.wso2.carbon.databridge.commons.binary</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.carbon.analytics-common</groupId>
<artifactId>org.wso2.carbon.databridge.agent</artifactId>
</dependency>
</dependencies>


</project>
Loading

0 comments on commit b5eb6ac

Please sign in to comment.