@Override public boolean inheritedFrom(AttributeName attributeName) { try { throw new OperationNotSupportedException(""); } catch (OperationNotSupportedException e) { parent.fireActionEvent(e, e.getMessage()); e.printStackTrace(); } return false; }
@Override public boolean inheritedFrom(AttributeName attributeName) { try { throw new OperationNotSupportedException(""); } catch (OperationNotSupportedException e) { parent.fireActionEvent(e, e.getMessage()); e.printStackTrace(); } return false; }
@Override public boolean checkConstraints () { try { // ensure FirstBurstLength <= MaxBurstLength final int firstBurstLength = getEntry(TextKeyword.FIRST_BURST_LENGTH).getIntegerValue(); final int maxBurstLength = getEntry(TextKeyword.MAX_BURST_LENGTH).getIntegerValue(); if (maxBurstLength > firstBurstLength) return false; } catch (OperationNotSupportedException e) { // programmer error, requested wrong data type e.printStackTrace(); return false; } return true; } }
/** * The {@link ConnectionSettingsBuilderComponent} constructor. The passed {@link Collection} must contain all * connection-specific {@link Entry} objects, since the constructor will try to locate a specific {@link Entry} for * each member variable and copy its current value. * * @param entries a {@link Collection} containing all connection-specific {@link Entry} objects */ ConnectionSettingsBuilderComponent (final Collection<Entry> entries) { try { targetName = SettingsNegotiator.getEntry(TextKeyword.TARGET_NAME, entries).getStringValue(); dataDigest = SettingsNegotiator.getEntry(TextKeyword.DATA_DIGEST, entries).getStringValue(); headerDigest = SettingsNegotiator.getEntry(TextKeyword.HEADER_DIGEST, entries).getStringValue(); ifMarker = SettingsNegotiator.getEntry(TextKeyword.IF_MARKER, entries).getBooleanValue(); ifMarkInt = SettingsNegotiator.getEntry(TextKeyword.IF_MARK_INT, entries).getIntegerValue(); maxRecvDataSegmentLength = SettingsNegotiator.getEntry(TextKeyword.MAX_RECV_DATA_SEGMENT_LENGTH, entries).getIntegerValue(); ofMarker = SettingsNegotiator.getEntry(TextKeyword.OF_MARKER, entries).getBooleanValue(); ofMarkInt = SettingsNegotiator.getEntry(TextKeyword.OF_MARK_INT, entries).getIntegerValue(); } catch (OperationNotSupportedException e) { e.printStackTrace(); } } }
/** * The {@link SessionSettingsBuilderComponent} constructor. The passed {@link Collection} must contain all * session-wide {@link Entry} objects, since the constructor will try to locate a specific {@link Entry} for each * member variable and copy its current value. * * @param entries a {@link Collection} containing all session-wide {@link Entry} objects */ SessionSettingsBuilderComponent (final long settingsId, final Collection<Entry> entries) { this.settingsId = settingsId; try { dataPduInOrder = SettingsNegotiator.getEntry(TextKeyword.DATA_PDU_IN_ORDER, entries).getBooleanValue(); dataSequenceInOrder = SettingsNegotiator.getEntry(TextKeyword.DATA_SEQUENCE_IN_ORDER, entries).getBooleanValue(); defaultTime2Retain = SettingsNegotiator.getEntry(TextKeyword.DEFAULT_TIME_2_RETAIN, entries).getIntegerValue(); defaultTime2Wait = SettingsNegotiator.getEntry(TextKeyword.DEFAULT_TIME_2_WAIT, entries).getIntegerValue(); errorRecoveryLevel = SettingsNegotiator.getEntry(TextKeyword.ERROR_RECOVERY_LEVEL, entries).getIntegerValue(); firstBurstLength = SettingsNegotiator.getEntry(TextKeyword.FIRST_BURST_LENGTH, entries).getIntegerValue(); immediateData = SettingsNegotiator.getEntry(TextKeyword.IMMEDIATE_DATA, entries).getBooleanValue(); initialR2T = SettingsNegotiator.getEntry(TextKeyword.INITIAL_R_2_T, entries).getBooleanValue(); initiatorAlias = SettingsNegotiator.getEntry(TextKeyword.INITIATOR_ALIAS, entries).getStringValue(); initiatorName = SettingsNegotiator.getEntry(TextKeyword.INITIATOR_NAME, entries).getStringValue(); maxBurstLength = SettingsNegotiator.getEntry(TextKeyword.MAX_BURST_LENGTH, entries).getIntegerValue(); maxConnections = SettingsNegotiator.getEntry(TextKeyword.MAX_CONNECTIONS, entries).getIntegerValue(); maxOutstandingR2T = SettingsNegotiator.getEntry(TextKeyword.MAX_OUTSTANDING_R_2_T, entries).getIntegerValue(); sessionType = SettingsNegotiator.getEntry(TextKeyword.SESSION_TYPE, entries).getStringValue(); } catch (OperationNotSupportedException e) { e.printStackTrace(); } } }