Update to HAPI FHIR 7.0.0 Draft
This commit is contained in:
@@ -2,16 +2,16 @@
|
||||
package ca.uhn.fhir.jpa.starter;
|
||||
|
||||
import ca.uhn.fhir.rest.api.EncodingEnum;
|
||||
import org.eclipse.jetty.websocket.api.Session;
|
||||
import org.eclipse.jetty.websocket.api.annotations.OnWebSocketConnect;
|
||||
import org.eclipse.jetty.websocket.api.annotations.OnWebSocketMessage;
|
||||
import org.eclipse.jetty.websocket.api.annotations.WebSocket;
|
||||
import jakarta.websocket.ClientEndpoint;
|
||||
import jakarta.websocket.OnMessage;
|
||||
import jakarta.websocket.OnOpen;
|
||||
import jakarta.websocket.Session;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@WebSocket
|
||||
@ClientEndpoint
|
||||
public class SocketImplementation {
|
||||
|
||||
private static final Logger ourLog = org.slf4j.LoggerFactory.getLogger(SocketImplementation.class);
|
||||
@@ -34,7 +34,7 @@ public class SocketImplementation {
|
||||
public void keepAlive() {
|
||||
if (this.session != null) {
|
||||
try {
|
||||
session.getRemote().sendString("keep alive");
|
||||
session.getBasicRemote().sendText("keep alive");
|
||||
} catch (Throwable t) {
|
||||
ourLog.error("Failure", t);
|
||||
}
|
||||
@@ -47,14 +47,14 @@ public class SocketImplementation {
|
||||
*
|
||||
* @param session
|
||||
*/
|
||||
@OnWebSocketConnect
|
||||
@OnOpen
|
||||
public void onConnect(Session session) {
|
||||
ourLog.info("Got connect: {}", session);
|
||||
this.session = session;
|
||||
try {
|
||||
String sending = "bind " + myCriteria;
|
||||
ourLog.info("Sending: {}", sending);
|
||||
session.getRemote().sendString(sending);
|
||||
session.getBasicRemote().sendText(sending);
|
||||
|
||||
ourLog.info("Connection: DONE");
|
||||
} catch (Throwable t) {
|
||||
@@ -68,7 +68,7 @@ public class SocketImplementation {
|
||||
*
|
||||
* @param theMsg
|
||||
*/
|
||||
@OnWebSocketMessage
|
||||
@OnMessage
|
||||
public void onMessage(String theMsg) {
|
||||
ourLog.info("Got msg: " + theMsg);
|
||||
myMessages.add(theMsg);
|
||||
|
||||
Reference in New Issue
Block a user