mirror of https://github.com/OpenVidu/openvidu.git
openvidu-java-client : change to lambda function
parent
b24d89c884
commit
406289cf57
|
@ -183,9 +183,7 @@ public class Session {
|
||||||
this.getSessionId();
|
this.getSessionId();
|
||||||
}
|
}
|
||||||
|
|
||||||
final HttpClientResponseHandler<Connection> responseHandler = new HttpClientResponseHandler<Connection>() {
|
final HttpClientResponseHandler<Connection> responseHandler = response -> {
|
||||||
@Override
|
|
||||||
public Connection handleResponse(final ClassicHttpResponse response) throws IOException, HttpException {
|
|
||||||
final int status = response.getCode();
|
final int status = response.getCode();
|
||||||
if (status == HttpStatus.SC_OK) {
|
if (status == HttpStatus.SC_OK) {
|
||||||
Connection connection = new Connection(OpenVidu.httpResponseEntityToJson(response.getEntity()));
|
Connection connection = new Connection(OpenVidu.httpResponseEntityToJson(response.getEntity()));
|
||||||
|
@ -194,7 +192,6 @@ public class Session {
|
||||||
} else {
|
} else {
|
||||||
throw OpenVidu.openViduHttpException(status);
|
throw OpenVidu.openViduHttpException(status);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
JsonObject json = connectionProperties.toJson(sessionId);
|
JsonObject json = connectionProperties.toJson(sessionId);
|
||||||
|
|
Loading…
Reference in New Issue