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