if (receiveReply(receiver, udp) == false) {
if (MethodName.CONNECT == receiver.getMethodName()) {
// TODO: crypt.importMessage(receiver.getQos()); see also ClientDispatchConnection.java:440
Socket socket = this.sock;
if (socket == null) return; // Is possible when EOF arrived inbetween
ConnectQosServer conQos = new ConnectQosServer(driver.getGlobal(), receiver.getQos());
if (conQos.getSecurityQos() == null)
throw new XmlBlasterException(glob, ErrorCode.USER_SECURITY_AUTHENTICATION_ILLEGALARGUMENT, ME, "connect() without securityQos");
conQos.getSecurityQos().setClientIp (socket.getInetAddress().getHostAddress());
conQos.setAddressServer(getAddressServer());
setLoginName(conQos.getSessionName().getRelativeName());
if (this.callCoreInSeparateThread) {
Thread.currentThread().setName("XmlBlaster.HandleClient");
}
else {
Thread.currentThread().setName("XmlBlaster.socket"+ (this.driver.isSSL()?".SSL":"") + ".tcpListener-" + conQos.getUserId());
}
this.ME = this.driver.getType() + "-HandleClient-" + this.loginName;
// getInetAddress().toString() does no reverse DNS lookup (no blocking danger) ...
log.info(ME+": Client connected, coming from host=" + socket.getInetAddress().toString() + " port=" + socket.getPort());
CallbackAddress[] cbArr = conQos.getSessionCbQueueProperty().getCallbackAddresses();
for (int ii=0; cbArr!=null && ii<cbArr.length; ii++) {
SocketUrl cbUrl = new SocketUrl(glob, cbArr[ii].getRawAddress());
SocketUrl remoteUrl = new SocketUrl(glob, socket.getInetAddress().getHostAddress(), socket.getPort());
if (this.addressServer != null) {
this.addressServer.setRemoteAddress(remoteUrl);