if (size > _classOfService.common().maxMsgSize())
private boolean isClassOfServiceValid(ClassOfService classOfService) { return (classOfService.common().maxMsgSize() == _expectedClassOfService.common().maxMsgSize() && classOfService.common().protocolType() == _expectedClassOfService.common().protocolType() && classOfService.common().protocolMajorVersion() == _expectedClassOfService.common().protocolMajorVersion() && classOfService.common().protocolMinorVersion() == _expectedClassOfService.common().protocolMinorVersion() && (classOfService.authentication().type() == _expectedClassOfService.authentication().type() || classOfService.authentication().type() == ClassesOfService.AuthenticationTypes.NOT_REQUIRED) && classOfService.flowControl().type() == _expectedClassOfService.flowControl().type() && classOfService.dataIntegrity().type() == _expectedClassOfService.dataIntegrity().type() && classOfService.guarantee().type() == _expectedClassOfService.guarantee().type()); }
tsOpenOptions.classOfService().common().maxMsgSize(cos.common().maxMsgSize());
if (bufLength > _classOfService.common().maxMsgSize()) bufLength = _classOfService.common().maxMsgSize();
if (reset) fileSize = Header.LENGTH + (MsgHeader.LENGTH + _tunnelSubstream._tunnelStream._classOfService.common().maxMsgSize() + SlicedBufferPool.TUNNEL_STREAM_HDR_SIZE) * Header.MAX_MSGS; else fileSize = fileChannel.size(); _fileByteBuf = fileChannel.map(FileChannel.MapMode.READ_WRITE, 0, fileSize); _maxMsgLength = _tunnelSubstream._tunnelStream.classOfService().common().maxMsgSize(); _tunnelSubstream._lastOutSeqNum = 0; _tunnelSubstream._lastInSeqNum = 0;
if (reset) fileSize = Header.LENGTH + (MsgHeader.LENGTH + _tunnelSubstream._tunnelStream._classOfService.common().maxMsgSize() + SlicedBufferPool.TUNNEL_STREAM_HDR_SIZE) * Header.MAX_MSGS; else fileSize = fileChannel.size(); _maxMsgLength = _tunnelSubstream._tunnelStream.classOfService().common().maxMsgSize(); _tunnelSubstream._lastOutSeqNum = 0; _tunnelSubstream._lastInSeqNum = 0;
TunnelStreamPersistenceBuffer persistenceBuffer; assert (buffer.length() <= _tunnelSubstream._tunnelStream._classOfService.common().maxMsgSize());
destCos.common().maxMsgSize(common().maxMsgSize()); destCos.common().protocolType(common().protocolType()); destCos.common().protocolMajorVersion(common().protocolMajorVersion());
TunnelStreamPersistenceBuffer persistenceBuffer; assert (buffer.length() <= _tunnelSubstream._tunnelStream._classOfService.common().maxMsgSize());
@Override public int listenerCallback(TunnelStreamRequestEvent event) { super.listenerCallback(event); /* Accept the tunnel stream request. */ _acceptOpts.clear(); _acceptOpts.statusEventCallback(this); _acceptOpts.defaultMsgCallback(this); _acceptOpts.classOfService().common().maxMsgSize(_maxMsgSize); _acceptOpts.classOfService().dataIntegrity().type(DataIntegrityTypes.RELIABLE); _acceptOpts.classOfService().flowControl().type(FlowControlTypes.BIDIRECTIONAL); _acceptOpts.classOfService().authentication().type(event.classOfService().authentication().type()); assertEquals(ReactorReturnCodes.SUCCESS, reactorChannel().acceptTunnelStream(event, _acceptOpts, _errorInfo)); return ReactorReturnCodes.SUCCESS; }
if (tunnelBuffer.length() > _classOfService.common().maxMsgSize()) error.text("Submitted buffer cannot be larger than maxMsgSize of " + _classOfService.common().maxMsgSize()); return ReactorReturnCodes.PARAMETER_INVALID;
/** This provider always rejects tunnel streams. */ class TunnelStreamRejectProvider extends Provider { TunnelStreamRejectOptions _rejectOptions = ReactorFactory.createTunnelStreamRejectOptions(); public TunnelStreamRejectProvider(TestReactor reactor) { super(reactor); } @Override public int listenerCallback(TunnelStreamRequestEvent event) { super.listenerCallback(event); /* Accept the tunnel stream request. */ _rejectOptions.clear(); _rejectOptions.state().streamState(StreamStates.CLOSED); _rejectOptions.state().dataState(DataStates.SUSPECT); _rejectOptions.state().code(StateCodes.NOT_ENTITLED); assertEquals(ReactorReturnCodes.SUCCESS, reactorChannel().rejectTunnelStream(event, _rejectOptions, _errorInfo)); return ReactorReturnCodes.SUCCESS; } }
_commonProperties.maxMsgSize((int)_tempUInt.toLong()); _commonProperties.maxMsgSize((int)_tempUInt.toLong());
if (persistBuffer.length() - persistBuffer.tunnelStreamHeaderLen() > _tunnelSubstream._tunnelStream._classOfService.common().maxMsgSize())
_commonProperties.maxMsgSize((int)_tempUInt.toLong());
assertEquals(Codec.majorVersion(), consTunnelStream.classOfService().common().protocolMajorVersion()); assertEquals(Codec.minorVersion(), consTunnelStream.classOfService().common().protocolMinorVersion()); assertEquals(614400, consTunnelStream.classOfService().common().maxMsgSize()); assertEquals(6144, consTunnelStream.classOfService().common().maxFragmentSize()); assertEquals(AuthenticationTypes.OMM_LOGIN, consTunnelStream.classOfService().authentication().type()); assertEquals(Codec.majorVersion(), provTunnelStream.classOfService().common().protocolMajorVersion()); assertEquals(Codec.minorVersion(), provTunnelStream.classOfService().common().protocolMinorVersion()); assertEquals(614400, provTunnelStream.classOfService().common().maxMsgSize()); assertEquals(6144, provTunnelStream.classOfService().common().maxFragmentSize()); assertEquals(AuthenticationTypes.OMM_LOGIN, provTunnelStream.classOfService().authentication().type());
if ( _commonProperties.streamVersion() > 1) _tempUInt.value(_commonProperties.maxMsgSize());
assertEquals(Codec.majorVersion(), consTunnelStream.classOfService().common().protocolMajorVersion()); assertEquals(Codec.minorVersion(), consTunnelStream.classOfService().common().protocolMinorVersion()); assertEquals(maxMsgSize, consTunnelStream.classOfService().common().maxMsgSize()); assertEquals(AuthenticationTypes.NOT_REQUIRED, consTunnelStream.classOfService().authentication().type()); assertEquals(FlowControlTypes.BIDIRECTIONAL, consTunnelStream.classOfService().flowControl().type()); assertEquals(Codec.majorVersion(), provTunnelStream.classOfService().common().protocolMajorVersion()); assertEquals(Codec.minorVersion(), provTunnelStream.classOfService().common().protocolMinorVersion()); assertEquals(maxMsgSize, provTunnelStream.classOfService().common().maxMsgSize()); assertEquals(AuthenticationTypes.NOT_REQUIRED, provTunnelStream.classOfService().authentication().type()); assertEquals(FlowControlTypes.BIDIRECTIONAL, provTunnelStream.classOfService().flowControl().type());