private void setAuthAttributes() throws Exception { logger.debug("setAttributes()"); Object principal = getHandshake().verifyCredentials(); long uniqueId; if (principal instanceof Subject) { uniqueId = getClientUserAuths(getProxyID()).putSubject((Subject) principal); } else { // this sets principal in map as well.... uniqueId = getUniqueId((Principal) principal); setPrincipal((Principal) principal); } setUserAuthId(uniqueId); }
when(serverConnection.getChunkedResponseMessage()).thenReturn(chunkedResponseMessage); when(serverConnection.getFunctionResponseMessage()).thenReturn(functionResponseMessage); when(serverConnection.getHandshake()).thenReturn(handshake);
when(serverConnection.getErrorResponseMessage()).thenReturn(errorResponseMessage); when(serverConnection.getFunctionResponseMessage()).thenReturn(functionResponseMessage); when(serverConnection.getHandshake()).thenReturn(mock(ServerSideHandshake.class)); when(serverConnection.getReplyMessage()).thenReturn(replyMessage);
when(serverConnection.getChunkedResponseMessage()).thenReturn(chunkedResponseMessage); when(serverConnection.getFunctionResponseMessage()).thenReturn(functionResponseMessage); when(serverConnection.getHandshake()).thenReturn(mock(ServerSideHandshakeImpl.class));
doReturn(handshake).when(serverConnection).getHandshake(); doReturn(1000).when(handshake).getClientReadTimeout();
int timeToWait = serverConnection.getHandshake().getClientReadTimeout() / 2; if (timeToWait < 0) { return;
ServerSideHandshake handshake = serverConnection.getHandshake(); int earlierClientReadTimeout = handshake.getClientReadTimeout(); handshake.setClientReadTimeout(0);
return; ServerSideHandshake handshake = serverConnection.getHandshake(); int earlierClientReadTimeout = handshake.getClientReadTimeout(); handshake.setClientReadTimeout(0);
ServerSideHandshake handshake = serverConnection.getHandshake(); int earlierClientReadTimeout = handshake.getClientReadTimeout(); handshake.setClientReadTimeout(0);
return; ServerSideHandshake handshake = serverConnection.getHandshake(); int earlierClientReadTimeout = handshake.getClientReadTimeout(); handshake.setClientReadTimeout(functionTimeout);
ServerSideHandshake handshake = serverConnection.getHandshake(); int earlierClientReadTimeout = handshake.getClientReadTimeout(); handshake.setClientReadTimeout(0);
return; ServerSideHandshake handshake = serverConnection.getHandshake(); int earlierClientReadTimeout = handshake.getClientReadTimeout(); handshake.setClientReadTimeout(functionTimeout);
ServerSideHandshake handshake = serverConnection.getHandshake(); int earlierClientReadTimeout = handshake.getClientReadTimeout(); handshake.setClientReadTimeout(functionTimeout);
ServerSideHandshake handshake = serverConnection.getHandshake(); int earlierClientReadTimeout = handshake.getClientReadTimeout(); handshake.setClientReadTimeout(0);