int callbackUserAndDisconnect(String location, Msg msg, LoginMsg loginMsg, ReactorErrorInfo errorInfo) { int ret; _tempWlInteger.value(msg.streamId()); if ((ret = callbackUser(location, msg, loginMsg, _watchlist.streamIdtoWlRequestTable().get(_tempWlInteger), errorInfo)) != ReactorReturnCodes.SUCCESS) return ret; _watchlist.reactor().populateErrorInfo(errorInfo, ReactorReturnCodes.FAILURE, location, "Received login response with Closed/Recover stream state. Disconnecting."); return _watchlist._reactor.disconnect( _watchlist.reactorChannel(), location, errorInfo); }
int readStatusMsg(WlStream wlStream, DecodeIterator dIter, Msg msg, ReactorErrorInfo errorInfo) { // convert to rdm login status and save _loginStatus.decode(dIter, msg); // notify stream that response received wlStream.responseReceived(); if (_loginStatus.checkHasState()) { _loginStatus.state().copy(wlStream.state()); // if CLOSED_RECOVER, change state to OPEN/SUSPECT for call back if (_loginStatus.state().streamState() == StreamStates.CLOSED_RECOVER) { _loginStatus.state().streamState(StreamStates.OPEN); _loginStatus.state().dataState(DataStates.SUSPECT); return callbackUserAndDisconnect("WlLoginHandler.readStatusMsg", msg, _loginStatus, errorInfo); } } // call back user _tempWlInteger.value(msg.streamId()); return callbackUser("WlLoginHandler.readStatusMsg", msg, _loginStatus, _watchlist.streamIdtoWlRequestTable().get(_tempWlInteger), errorInfo); }
ret = callbackUser("WlLoginHandler.readRefreshMsg", msg, _loginRefresh, _watchlist.streamIdtoWlRequestTable().get(_tempWlInteger), errorInfo);
int readAckMsg(WlStream wlStream, DecodeIterator dIter, Msg msg, ReactorErrorInfo errorInfo) { int ret = ReactorCallbackReturnCodes.SUCCESS; // handle the post Ack if (wlStream.handlePostAck(msg)) { // call back user if ACK was processed _tempWlInteger.value(msg.streamId()); if (msg.domainType() != DomainTypes.LOGIN) { ret = _watchlist.itemHandler().callbackUser( "WlLoginHandler.readAckMsg", msg, null, _watchlist.streamIdtoWlRequestTable().get(_tempWlInteger), errorInfo); } else { ret = callbackUser("WlLoginHandler.readAckMsg", msg, null, _watchlist.streamIdtoWlRequestTable().get(_tempWlInteger), errorInfo); } } return ret; }
@Override public int requestTimeout(WlStream wlStream, ReactorErrorInfo errorInfo) { int streamId = (_loginRequest != null ? _loginRequest.streamId() : 0); // call back user with login status of OPEN/SUSPECT _statusMsg.streamId(streamId); _statusMsg.applyHasState(); _statusMsg.state().streamState(StreamStates.OPEN); _statusMsg.state().dataState(DataStates.SUSPECT); _statusMsg.state().code(StateCodes.NONE); _statusMsg.state().text(_tempBuffer); _loginStatus.streamId(streamId); _loginStatus.applyHasState(); _loginStatus.state().streamState(StreamStates.OPEN); _loginStatus.state().dataState(DataStates.SUSPECT); _loginStatus.state().code(StateCodes.NONE); _loginStatus.state().text(_tempBuffer); _tempWlInteger.value(_statusMsg.streamId()); callbackUser("WlLoginHandler.channelDown", _statusMsg, _loginStatus, _watchlist.streamIdtoWlRequestTable().get(_tempWlInteger), _errorInfo); // re-send login request _tempMsg.clear(); _watchlist.convertRDMToCodecMsg(_loginRequest, _tempMsg); return wlStream.sendMsg(_tempMsg, _submitOptions, errorInfo); }
callbackUser("WlLoginHandler.channelDown", _statusMsg, _loginStatus, _watchlist.streamIdtoWlRequestTable().get(_tempWlInteger), _errorInfo);