Skip to content

Commit

Permalink
[Release] : 2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouhailin committed Dec 19, 2024
1 parent 6acb67b commit 990b25a
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 55 deletions.
34 changes: 21 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
# FreeSWITCH ESL ALL

[![Codacy Badge](https://api.codacy.com/project/badge/Grade/23fb13f7487f4ccd985f09c96341dfab)](https://app.codacy.com/gh/zhouhailin/freeswitch-esl-all?utm_source=github.com&utm_medium=referral&utm_content=zhouhailin/freeswitch-esl-all&utm_campaign=Badge_Grade_Settings)
[![Jdk Version](https://img.shields.io/badge/JDK-17-green.svg)](https://img.shields.io/badge/JDK-17-green.svg)
[![Jdk Version](https://img.shields.io/badge/JDK-8-green.svg)](https://img.shields.io/badge/JDK-8-green.svg)
[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0)
[![Maven Central](https://img.shields.io/maven-central/v/link.thingscloud/freeswitch-esl-all)](https://mvnrepository.com/artifact/link.thingscloud/freeswitch-esl-all)
[![Gitter](https://badges.gitter.im/freeswitch-esl-all/community.svg)](https://gitter.im/freeswitch-esl-all/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

## Summary

1.x under development, JDK 1.8, spring boot 2.x
2.x under development, JDK 17, spring boot 3.x (v2.x-dev)
Support JDK 1.8 / 17+

Netty used 4.1.x, 5.x is not supported

Expand All @@ -35,14 +34,16 @@
[Maven Central](https://mvnrepository.com/artifact/link.thingscloud/freeswitch-esl-spring-boot-starter)

```xml
<dependency>
<groupId>link.thingscloud</groupId>
<artifactId>freeswitch-esl-spring-boot-starter</artifactId>
<version>${freeswitch-esl.version}</version>
</dependency>

<dependency>
<groupId>link.thingscloud</groupId>
<artifactId>freeswitch-esl-spring-boot-starter</artifactId>
<version>${freeswitch-esl.version}</version>
</dependency>
```

application.properties

```properties
link.thingscloud.freeswitch.esl.inbound.servers[0].host=127.0.0.1
link.thingscloud.freeswitch.esl.inbound.servers[0].port=8021
Expand All @@ -61,6 +62,7 @@ link.thingscloud.freeswitch.esl.inbound.eventPerformanceCostTime=200
```

application.yml

```yaml
link:
thingscloud:
Expand All @@ -83,6 +85,7 @@ link:
```
```java

@Slf4j
@Component
public class ExampleInboundClient {
Expand All @@ -101,6 +104,7 @@ public class ExampleInboundClient {
```

```java

@Slf4j
@Component
public class InboundClientOptionHandlerExample extends AbstractInboundClientOptionHandler {
Expand All @@ -120,6 +124,7 @@ public class InboundClientOptionHandlerExample extends AbstractInboundClientOpti
```

```java

@Slf4j
@Component
@EslEventName(EventNames.HEARTBEAT)
Expand All @@ -135,6 +140,7 @@ public class HeartbeatEslEventHandler implements EslEventHandler {
```

```java

@Slf4j
@Service
public class ServerConnectionListenerImpl implements ServerConnectionListener {
Expand All @@ -159,12 +165,14 @@ public class ServerConnectionListenerImpl implements ServerConnectionListener {
### freeswitch-esl

[Maven Central](https://mvnrepository.com/artifact/link.thingscloud/freeswitch-esl)

```xml
<dependency>
<groupId>link.thingscloud</groupId>
<artifactId>freeswitch-esl</artifactId>
<version>${freeswitch-esl.version}</version>
</dependency>

<dependency>
<groupId>link.thingscloud</groupId>
<artifactId>freeswitch-esl</artifactId>
<version>${freeswitch-esl.version}</version>
</dependency>
```

```
Expand Down
2 changes: 1 addition & 1 deletion freeswitch-esl-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>link.thingscloud</groupId>
<artifactId>freeswitch-externals</artifactId>
<version>2.1.0</version>
<version>2.2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion freeswitch-esl-spring-boot-starter-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>link.thingscloud</groupId>
<artifactId>freeswitch-externals</artifactId>
<version>2.1.0</version>
<version>2.2.0</version>
</parent>

<artifactId>freeswitch-esl-spring-boot-starter-example</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@

package link.thingscloud.freeswitch.esl.spring.boot.starter.example;

import jakarta.annotation.PostConstruct;
import link.thingscloud.freeswitch.esl.InboundClient;
import link.thingscloud.freeswitch.esl.InboundClientBootstrap;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

Expand All @@ -27,15 +27,15 @@
*/
@Slf4j
@Component
public class ExampleInboundClient {
public class ExampleInboundClient implements InitializingBean {
@Autowired
private InboundClient inboundClient;

@Autowired
private InboundClientBootstrap inboundClientBootstrap;

@PostConstruct
public void startup() {
@Override
public void afterPropertiesSet() throws Exception {
System.out.println(inboundClientBootstrap);
}

Expand Down
2 changes: 1 addition & 1 deletion freeswitch-esl-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>link.thingscloud</groupId>
<artifactId>freeswitch-externals</artifactId>
<version>2.1.0</version>
<version>2.2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion freeswitch-esl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>link.thingscloud</groupId>
<artifactId>freeswitch-externals</artifactId>
<version>2.1.0</version>
<version>2.2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@

import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.CopyOnWriteArraySet;

/**
* <p>InboundClientOption class.</p>
Expand Down Expand Up @@ -56,13 +59,13 @@ public class InboundClientOption {

private ServerOptionListener serverOptionListener = null;
private ServerConnectionListener serverConnectionListener = null;
private final List<ServerOption> serverOptions = new ArrayList<>();
private final List<ServerOption> serverOptions = new CopyOnWriteArrayList<>();
private final ServerAddrOption serverAddrOption = new ServerAddrOption(serverOptions);

private final List<IEslEventListener> listeners = new ArrayList<>();
private final List<IEslEventListener> listeners = new CopyOnWriteArrayList<>();

private EventListener eventListener = null;
private final List<String> events = new ArrayList<>();
private final Set<String> events = new CopyOnWriteArraySet<>();

/**
* <p>sndBufSize.</p>
Expand Down Expand Up @@ -521,7 +524,7 @@ public InboundClientOption eventListener(EventListener eventListener) {
*
* @return a {@link java.util.List} object.
*/
public List<String> events() {
public Set<String> events() {
return events;
}

Expand Down
67 changes: 37 additions & 30 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<groupId>link.thingscloud</groupId>
<artifactId>freeswitch-externals</artifactId>
<packaging>pom</packaging>
<version>2.1.0</version>
<version>2.2.0</version>

<name>freeswitch-esl-all-${project.version}</name>
<description>freeswitch event socket library on netty 4.1</description>
Expand All @@ -37,9 +37,9 @@
</modules>

<properties>
<java.version>17</java.version>
<java.version>8</java.version>

<spring-boot.version>3.2.2</spring-boot.version>
<spring-boot.version>2.7.16</spring-boot.version>

<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
Expand All @@ -60,7 +60,7 @@
<url>https://github.com/zhouhailin/freeswitch-esl-all</url>
<connection>scm:git:https://github.com/zhouhailin/freeswitch-esl-all.git</connection>
<developerConnection>scm:git:https://github.com/zhouhailin/freeswitch-esl-all.git</developerConnection>
<tag>2.1.0</tag>
<tag>HEAD</tag>
</scm>

<licenses>
Expand Down Expand Up @@ -126,6 +126,13 @@
</dependencies>

<build>
<extensions>
<extension>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>1.5.0.Final</version>
</extension>
</extensions>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand All @@ -135,23 +142,39 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<version>3.13.0</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>
<!-- Javadoc -->
<!-- Source -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin> <!-- Javadoc -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<version>3.11.2</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<doclint>none</doclint>
</configuration>
</execution>
</executions>
</plugin>
Expand All @@ -176,21 +199,6 @@
</distributionManagement>
<build>
<plugins>
<!-- Source -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
<executions>
<execution>
<id>oss</id>
<phase>package</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- 测试覆盖度 -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand All @@ -208,10 +216,9 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.1.0</version>
<version>3.2.7</version>
<executions>
<execution>
<id>oss</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
Expand All @@ -220,14 +227,14 @@
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.6.0</version>
<extensions>true</extensions>
<configuration>
<serverId>oss</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
<publishingServerId>central</publishingServerId>
<autoPublish>true</autoPublish>
<waitUntil>published</waitUntil>
</configuration>
</plugin>
</plugins>
Expand Down

0 comments on commit 990b25a

Please sign in to comment.