Skip to content

Commit 055b062

Browse files
authored
Merge branch 'master' into ErrorHandlerSQLCommand
2 parents b6c8959 + 966f490 commit 055b062

File tree

20 files changed

+483
-351
lines changed

20 files changed

+483
-351
lines changed

gxexternalproviders/pom.xml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,25 @@
3939
<artifactId>aws-java-sdk-s3</artifactId>
4040
<version>1.12.93</version>
4141
</dependency>
42-
42+
<dependency>
43+
<groupId>com.google.code.gson</groupId>
44+
<artifactId>gson</artifactId>
45+
<version>2.9.0</version>
46+
</dependency>
4347
<dependency>
4448
<groupId>com.google.cloud</groupId>
4549
<artifactId>google-cloud-storage</artifactId>
46-
<version>1.114.0</version>
50+
<version>1.118.1</version>
4751
</dependency>
4852
<dependency>
4953
<groupId>com.google.api-client</groupId>
5054
<artifactId>google-api-client</artifactId>
51-
<version>1.31.5</version>
55+
<version>1.34.1</version>
56+
</dependency>
57+
<dependency>
58+
<groupId>com.google.oauth-client</groupId>
59+
<artifactId>google-oauth-client</artifactId>
60+
<version>1.33.3</version>
5261
</dependency>
5362
<dependency>
5463
<groupId>com.google.guava</groupId>

gxwebsocket/src/main/java/com/genexus/internet/websocket/GXWebSocket.java

Lines changed: 14 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -10,49 +10,34 @@
1010
import com.genexus.websocket.Session;
1111

1212
@ServerEndpoint(value = "/gxwebsocket")
13-
public class GXWebSocket extends GXWebSocketCommon implements IGXWebSocketAsync {
14-
15-
private static GXWebSocket instance = null;
16-
17-
public GXWebSocket(){
18-
instance = this;
19-
}
20-
21-
public static IGXWebSocketAsync getInstance() {
22-
return instance;
13+
public class GXWebSocket {
14+
15+
private GXWebSocketService wsService;
16+
17+
public GXWebSocket() {
18+
wsService = GXWebSocketService.getService();
2319
}
24-
20+
2521
@OnOpen
26-
public void OnOpen (javax.websocket.Session session) {
27-
OnOpenCommon(new Session(session));
22+
public void onOpen(javax.websocket.Session session) {
23+
wsService.onOpen(new Session(session));
2824
}
2925

3026
@OnMessage
31-
public void OnMessage (String txt, javax.websocket.Session session) {
32-
OnMessageCommon(txt, new Session(session));
27+
public void onMessage(String txt, javax.websocket.Session session) {
28+
wsService.onMessage(txt, new Session(session));
3329
}
3430

3531
@OnClose
36-
public void myOnClose (javax.websocket.Session session, CloseReason reason) {
37-
myOnCloseCommon(new Session(session));
32+
public void onClose(javax.websocket.Session session, CloseReason reason) {
33+
wsService.onClose(new Session(session));
3834
}
3935

4036
@OnError
4137
public void onError(Throwable exception, javax.websocket.Session session) {
42-
onErrorCommon(exception, new Session(session));
38+
wsService.onError(exception, new Session(session));
4339
}
44-
45-
public SendResponseType send(String clientId, String message) {
46-
return sendCommon(clientId, message);
47-
}
48-
49-
public void broadcast(String message) {
50-
broadcastCommon(message);
51-
}
5240

53-
public boolean start() {
54-
return true;
55-
}
5641
}
5742

5843

gxwebsocket/src/main/java/com/genexus/websocket/Session.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public Integer getHashCode() {
1414
return new Integer(session.hashCode());
1515
}
1616

17-
public String getQueryString() {
17+
public String getId() {
1818
return session.getQueryString();
1919
}
2020

gxwebsocketjakarta/src/main/java/com/genexus/internet/websocket/GXWebSocket.java

Lines changed: 17 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -10,49 +10,33 @@
1010
import com.genexus.websocket.Session;
1111

1212
@ServerEndpoint(value = "/gxwebsocket")
13-
public class GXWebSocket extends GXWebSocketCommon implements IGXWebSocketAsync {
14-
15-
private static GXWebSocket instance = null;
16-
17-
public GXWebSocket(){
18-
instance = this;
19-
}
20-
21-
public static IGXWebSocketAsync getInstance() {
22-
return instance;
13+
public class GXWebSocket {
14+
15+
private GXWebSocketService wsService;
16+
17+
public GXWebSocket() {
18+
wsService = GXWebSocketService.getService();
2319
}
24-
20+
2521
@OnOpen
26-
public void OnOpen (jakarta.websocket.Session session) {
27-
OnOpenCommon(new Session(session));
22+
public void onOpen(jakarta.websocket.Session session) {
23+
wsService.onOpen(new Session(session));
2824
}
29-
25+
3026
@OnMessage
31-
public void OnMessage (String txt, jakarta.websocket.Session session) {
32-
OnMessageCommon(txt, new Session(session));
27+
public void onMessage(String txt, jakarta.websocket.Session session) {
28+
wsService.onMessage(txt, new Session(session));
3329
}
3430

3531
@OnClose
36-
public void myOnClose (jakarta.websocket.Session session, CloseReason reason) {
37-
myOnCloseCommon(new Session(session));
32+
public void onClose(jakarta.websocket.Session session, CloseReason reason) {
33+
wsService.onClose(new Session(session));
3834
}
39-
35+
4036
@OnError
41-
public void onError(Throwable exception, jakarta.websocket.Session session) {
42-
onErrorCommon(exception, new Session(session));
43-
}
44-
45-
public SendResponseType send(String clientId, String message) {
46-
return sendCommon(clientId, message);
37+
public void onError(Throwable exception, jakarta.websocket.Session session) {
38+
wsService.onError(exception, new Session(session));
4739
}
48-
49-
public void broadcast(String message) {
50-
broadcastCommon(message);
51-
}
52-
53-
public boolean start() {
54-
return true;
55-
}
5640
}
5741

5842

gxwebsocketjakarta/src/main/java/com/genexus/websocket/Session.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import jakarta.websocket.RemoteEndpoint;
44
import java.io.IOException;
55

6-
public class Session implements ISession{
6+
public class Session implements ISession {
77
private jakarta.websocket.Session session;
88

99
public Session(jakarta.websocket.Session session) {
@@ -14,7 +14,7 @@ public Integer getHashCode() {
1414
return new Integer(session.hashCode());
1515
}
1616

17-
public String getQueryString() {
17+
public String getId() {
1818
return session.getQueryString();
1919
}
2020

java/src/main/java/com/genexus/Application.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
import java.io.Closeable;
44
import java.io.IOException;
55
import java.sql.SQLException;
6-
import java.util.Date;
7-
import java.util.Enumeration;
8-
import java.util.Properties;
9-
import java.util.Vector;
6+
import java.util.*;
107

118
import com.genexus.db.DBConnectionManager;
129
import com.genexus.db.DynamicExecute;
@@ -42,7 +39,6 @@ public class Application
4239
private static Boolean isJMXEnabled;
4340

4441
public static Class gxCfg = ApplicationContext.getInstance().getClass();
45-
//public static ModelContext clientContext;
4642
private static Vector<ICleanedup> toCleanup = new Vector<>();
4743
static LocalUtil localUtil;
4844
static Class ClassName = null;
@@ -753,10 +749,10 @@ public static boolean getShowConnectError()
753749

754750

755751
static boolean useSmartCache = false;
752+
756753
public static com.genexus.GXSmartCacheProvider getSmartCacheProvider(int handle)
757754
{
758755
useSmartCache = true;
759756
return getConnectionManager().getUserInformation(handle).getSmartCacheProvider();
760-
}
761-
757+
}
762758
}

java/src/main/java/com/genexus/GXutil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1362,7 +1362,7 @@ public static String cutUploadPrefix(String value)
13621362

13631363
//hack para salvar el caso de gxooflineeventreplicator que llegan los path de los blobs sin \ porque fueron sacadas por el FromJsonString
13641364
String blobPath = com.genexus.Preferences.getDefaultPreferences().getProperty("CS_BLOB_PATH", "");
1365-
if(uploadValue.indexOf(':') == 1 && uploadValue.indexOf(blobPath) != -1 )
1365+
if(uploadValue.indexOf(':') == 1 && uploadValue.indexOf(File.separator + blobPath) != -1 )
13661366
{
13671367
uploadValue = uploadValue.substring(uploadValue.indexOf(blobPath) + blobPath.length());
13681368
uploadValue = blobPath + "\\" + uploadValue;

0 commit comments

Comments
 (0)