void closeChannel(ReactorChannel channel) { assert (channel != null); _errorInfo.clear(); if (channel.close(_errorInfo) != ReactorReturnCodes.SUCCESS) { if (_serverImpl.loggerClient().isErrorEnabled()) { StringBuilder temp = _serverImpl.strBuilder(); temp.append("Failed to close reactor channel ").append(channel).append(OmmLoggerClient.CR); temp.append("Error Id ").append(_errorInfo.error().errorId()).append(OmmLoggerClient.CR).append("Internal sysError ") .append(_errorInfo.error().sysError()).append(OmmLoggerClient.CR).append("Error Location ").append(_errorInfo.location()) .append(OmmLoggerClient.CR).append("Error text ").append(_errorInfo.error().text()); _serverImpl.loggerClient().error(_serverImpl.formatLogMessage(ServerChannelHandler.CLIENT_NAME, temp.toString(), Severity.ERROR)); } } removeChannel(channel); }
void closeRsslChannel(ReactorChannel rsslReactorChannel) { if (rsslReactorChannel == null) return; _rsslErrorInfo.clear(); if (rsslReactorChannel.close(_rsslErrorInfo) != ReactorReturnCodes.SUCCESS) { if (_loggerClient.isErrorEnabled()) { _userLock.lock(); strBuilder().append("Failed to close reactor channel (rsslReactorChannel).") .append("' RsslChannel='") .append(Integer.toHexString(_rsslErrorInfo.error().channel() != null ? _rsslErrorInfo.error().channel().hashCode() : 0)) .append("Error Id ").append(_rsslErrorInfo.error().errorId()) .append("Internal sysError ").append(_rsslErrorInfo.error().sysError()) .append("Error Location ").append(_rsslErrorInfo.location()) .append("Error Text ").append(_rsslErrorInfo.error().text()).append("'. "); _loggerClient.error( formatLogMessage(_activeConfig.instanceName, _strBuilder.toString(), Severity.ERROR)); _userLock.unlock(); } } _channelCallbackClient.removeChannel( (ChannelInfo) rsslReactorChannel.userSpecObj()); }
@Override public int defaultMsgCallback(ReactorMsgEvent event) { Msg msg = event.msg(); if (msg == null) { System.out.printf("defaultMsgCallback() received error: %s(%s)\n", event.errorInfo().error().text(), event.errorInfo().location()); return ReactorCallbackReturnCodes.SUCCESS; } return ReactorCallbackReturnCodes.SUCCESS; }
.append("Error Id ").append(error.errorId()).append(OmmLoggerClient.CR) .append("Internal sysError ").append(error.sysError()).append(OmmLoggerClient.CR) .append("Error Location ").append(_rsslErrorInfo.location()).append(OmmLoggerClient.CR) .append("Error Text ").append(error.text());
.append(OmmLoggerClient.CR).append("Error Id ").append(error.error().errorId()) .append(OmmLoggerClient.CR).append("Internal sysError ").append(error.error().sysError()) .append(OmmLoggerClient.CR).append("Error Location ").append(error.location()) .append(OmmLoggerClient.CR).append("Error Text: ").append(_errorInfo.error().text());
.append("Error Id ").append(error.errorId()).append(OmmLoggerClient.CR) .append("Internal sysError ").append(error.sysError()).append(OmmLoggerClient.CR) .append("Error Location ").append(rsslErrorInfo.location()).append(OmmLoggerClient.CR) .append("Error Text ").append(error.text());
.append("Error Id ").append(error.errorId()).append(OmmLoggerClient.CR) .append("Internal sysError ").append(error.sysError()).append(OmmLoggerClient.CR) .append("Error Location ").append(rsslErrorInfo.location()).append(OmmLoggerClient.CR) .append("Error Text ").append(error.text());
.append("Error Id ").append(error.errorId()).append(OmmLoggerClient.CR) .append("Internal sysError ").append(error.sysError()).append(OmmLoggerClient.CR) .append("Error Location ").append(rsslErrorInfo.location()).append(OmmLoggerClient.CR) .append("Error Text ").append(error.text());
.append("Error Id ").append(error.errorId()).append(OmmLoggerClient.CR) .append("Internal sysError ").append(error.sysError()).append(OmmLoggerClient.CR) .append("Error Location ").append(rsslErrorInfo.location()).append(OmmLoggerClient.CR) .append("Error Text ").append(error.text());
.append("Error Id ").append(error.errorId()).append(OmmLoggerClient.CR) .append("Internal sysError ").append(error.sysError()).append(OmmLoggerClient.CR) .append("Error Location ").append(rsslErrorInfo.location()).append(OmmLoggerClient.CR) .append("Error Text ").append(error.text());
.append(OmmLoggerClient.CR).append("Error Id ").append(error.errorId()) .append(OmmLoggerClient.CR).append("Internal sysError ").append(error.sysError()) .append(OmmLoggerClient.CR).append("Error Location ").append(_rsslErrorInfo.location()) .append(OmmLoggerClient.CR).append("Error Text ").append(error.text());
.append("Error Id ").append(error.errorId()).append(OmmLoggerClient.CR) .append("Internal sysError ").append(error.sysError()).append(OmmLoggerClient.CR) .append("Error Location ").append(_rsslErrorInfo.location()).append(OmmLoggerClient.CR) .append("Error Text ").append(error.text());
int populateErrorInfo(ReactorErrorInfo errorInfo, int reactorReturnCode, String location, String text) { errorInfo.clear(); errorInfo.code(reactorReturnCode).location(location); errorInfo.error().errorId(reactorReturnCode); if (text != null) errorInfo.error().text(text); return reactorReturnCode; }
.append(OmmLoggerClient.CR).append("Error Id ").append(error.errorId()) .append(OmmLoggerClient.CR).append("Internal sysError ").append(error.sysError()) .append(OmmLoggerClient.CR).append("Error Location ").append(_rsslErrorInfo.location()) .append(OmmLoggerClient.CR).append("Error Text ").append(error.text());
/** Sends a Msg to the component's channel. */ int submit(Msg msg, ReactorSubmitOptions submitOptions) { int ret; ret = _reactorChannel.submit(msg, submitOptions, _errorInfo); assertTrue("submit failed: " + ret + "(" + _errorInfo.location() + "--" + _errorInfo.error().text() + ")", ret >= ReactorReturnCodes.SUCCESS); return ret; }
/** Sends an RDM message to the component's channel. */ int submit(MsgBase msg, ReactorSubmitOptions submitOptions) { int ret; ret = _reactorChannel.submit(msg, submitOptions, _errorInfo); assertTrue("submit failed: " + ret + "(" + _errorInfo.location() + "--" + _errorInfo.error().text() + ")", ret >= ReactorReturnCodes.SUCCESS); return ret; }
private int sendChannelEventCallback(int eventType, ReactorChannel reactorChannel, ReactorErrorInfo errorInfo) { ReactorChannelEvent reactorChannelEvent = ReactorFactory.createReactorChannelEvent(); reactorChannelEvent.reactorChannel(reactorChannel); reactorChannelEvent.eventType(eventType); populateErrorInfo(reactorChannelEvent.errorInfo(), errorInfo.code(), errorInfo.location(), errorInfo.error().text()); int retval = reactorChannel.role().channelEventCallback().reactorChannelEventCallback(reactorChannelEvent); reactorChannelEvent.returnToPool(); return retval; }
private void sendWorkerEvent(ReactorChannel reactorChannel, WorkerEventTypes eventType, int reactorReturnCode, String location, String text) { WorkerEvent event = ReactorFactory.createWorkerEvent(); event.reactorChannel(reactorChannel); event.eventType(eventType); event.errorInfo().code(reactorReturnCode); event.errorInfo().error().errorId(reactorReturnCode); if (location != null) event.errorInfo().location(location); if (text != null) event.errorInfo().error().text(text); _queue.write(event); }
private void sendWorkerEvent(ReactorChannel reactorChannel, WorkerEventTypes eventType, TunnelStream tunnelStream, int reactorReturnCode, String location, String text) { WorkerEvent event = ReactorFactory.createWorkerEvent(); event.reactorChannel(reactorChannel); event.eventType(eventType); event.tunnelStream(tunnelStream); event.errorInfo().code(reactorReturnCode); event.errorInfo().error().errorId(reactorReturnCode); if (location != null) event.errorInfo().location(location); if (text != null) event.errorInfo().error().text(text); _queue.write(event); }
/** Copies a ReactorErrorInfo object. */ public static void copyErrorInfo(ReactorErrorInfo srcErrorInfo, ReactorErrorInfo destErrorInfo) { destErrorInfo.location(srcErrorInfo.location()); destErrorInfo.error().channel(srcErrorInfo.error().channel()); destErrorInfo.error().errorId(srcErrorInfo.error().errorId()); destErrorInfo.error().sysError(srcErrorInfo.error().sysError()); if (srcErrorInfo.error().text() != null) destErrorInfo.error().text(srcErrorInfo.error().text()); destErrorInfo.code(srcErrorInfo.code()); }