use of com.hazelcast.nio.Connection in project hazelcast by hazelcast.
the class AuthenticationBaseMessageTask method prepareAuthenticatedClientMessage.
private ClientMessage prepareAuthenticatedClientMessage() {
Connection connection = endpoint.getConnection();
ILogger logger = clientEngine.getLogger(getClass());
endpoint.authenticated(principal, credentials, isOwnerConnection(), clientVersion, clientMessage.getCorrelationId());
setConnectionType();
logger.info("Received auth from " + connection + ", successfully authenticated" + ", principal : " + principal + ", owner connection : " + isOwnerConnection() + ", client version : " + clientVersion);
if (endpointManager.registerEndpoint(endpoint)) {
clientEngine.bind(endpoint);
}
final Address thisAddress = clientEngine.getThisAddress();
byte status = AuthenticationStatus.AUTHENTICATED.getId();
return encodeAuth(status, thisAddress, principal.getUuid(), principal.getOwnerUuid(), serializationService.getVersion(), cleanedUpMembers);
}
use of com.hazelcast.nio.Connection in project hazelcast by hazelcast.
the class TcpIpConnectionManager method getOrConnect.
@Override
public Connection getOrConnect(final Address address, final boolean silent) {
Connection connection = connectionsMap.get(address);
if (connection == null && live) {
if (connectionsInProgress.add(address)) {
ioService.shouldConnectTo(address);
ioService.executeAsync(new InitConnectionTask(this, address, silent));
}
}
return connection;
}
Aggregations