/** * {@inheritDoc} */ @Override public int hashCode() { return super.hashCode() + (elytronEnabled? 1: 0); }
/** * {@inheritDoc} */ @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SecurityImpl) { SecurityImpl other = (SecurityImpl) obj; if (elytronEnabled != other.elytronEnabled) return false; } return super.equals(obj); }
/** * {@inheritDoc} */ @Override public String toString() { if (!elytronEnabled) return super.toString(); StringBuilder sb = new StringBuilder(1024); sb.append("<security>"); sb.append("</").append(Security.Tag.ELYTRON_ENABLED).append(">"); if (getSecurityDomain() != null) { sb.append("<").append(Security.Tag.AUTHENTICATION_CONTEXT).append("/>"); sb.append(getSecurityDomain()); sb.append("</").append(Security.Tag.AUTHENTICATION_CONTEXT).append("/>"); } else { sb.append("<").append(Security.Tag.AUTHENTICATION_CONTEXT_AND_APPLICATION).append("/>"); sb.append(getSecurityDomainAndApplication()); sb.append("</").append(Security.Tag.AUTHENTICATION_CONTEXT_AND_APPLICATION).append("/>"); } sb.append("</security>"); return sb.toString(); } }
Integer xaResourceTimeout = ModelNodeUtil.getIntIfSetOrGetDefault(context, connDefModel, XA_RESOURCE_TIMEOUT); TimeOut timeOut = new TimeOutImpl(blockingTimeoutMillis, idleTimeoutMinutes, allocationRetry, allocationRetryWaitMillis, xaResourceTimeout); pool = new XaPoolImpl(minPoolSize, initialPoolSize, maxPoolSize, prefill, useStrictMin, flushStrategy, capacity, fair, isSameRM, interlivng, padXid, wrapXaResource, noTxSeparatePool); } else { pool = new PoolImpl(minPoolSize, initialPoolSize, maxPoolSize, prefill, useStrictMin, flushStrategy, capacity, fair); boolean useFastFail = ModelNodeUtil.getBooleanIfSetOrGetDefault(context, connDefModel, USE_FAST_FAIL); final Boolean validateOnMatch = ModelNodeUtil.getBooleanIfSetOrGetDefault(context, connDefModel, VALIDATE_ON_MATCH ); Validation validation = new ValidationImpl(validateOnMatch, backgroundValidation, backgroundValidationMillis, useFastFail);
Boolean isXA = Boolean.FALSE; if (transactionSupport == TransactionSupport.TransactionSupportLevel.XATransaction) { pool = new XaPoolImpl(minPoolSize < 0 ? Defaults.MIN_POOL_SIZE : minPoolSize, Defaults.INITIAL_POOL_SIZE, maxPoolSize < 0 ? Defaults.MAX_POOL_SIZE : maxPoolSize, Defaults.PREFILL, Defaults.USE_STRICT_MIN, Defaults.FLUSH_STRATEGY, null, Defaults.FAIR, Defaults.IS_SAME_RM_OVERRIDE, Defaults.INTERLEAVING, Defaults.PAD_XID, Defaults.WRAP_XA_RESOURCE, Defaults.NO_TX_SEPARATE_POOL); isXA = Boolean.TRUE; } else { pool = new PoolImpl(minPoolSize < 0 ? Defaults.MIN_POOL_SIZE : minPoolSize, Defaults.INITIAL_POOL_SIZE, maxPoolSize < 0 ? Defaults.MAX_POOL_SIZE : maxPoolSize, Defaults.PREFILL, Defaults.USE_STRICT_MIN, Defaults.FLUSH_STRATEGY, null, Defaults.FAIR);
/** * convert an xml element in String value * * @param reader the StAX reader * @param attributeName the name of the attribute * @return the string representing element * @throws XMLStreamException StAX exception */ protected String attributeAsString(XMLStreamReader reader, String attributeName) throws XMLStreamException { String attributeString = rawAttributeText(reader, attributeName); return getSubstitutionValue(attributeString); }
/** * convert an xml element in String value * * @param reader the StAX reader * @return the string representing element * @throws XMLStreamException StAX exception */ protected String elementAsString(XMLStreamReader reader) throws XMLStreamException { String elementtext = rawElementText(reader); return getSubstitutionValue(elementtext); }
@Override public void validate() throws ValidateException { //just super.validate(). The reaut-plugin is not mandatory super.validate(); }
/** * Constructor * * @param securityDomainManaged securityDomainManaged * @param securityDomainAndApplicationManaged securityDomainAndApplicationManaged * @param applicationManaged applicationManagedS * @throws ValidateException ValidateException */ public SecurityImpl(String securityDomainManaged, String securityDomainAndApplicationManaged, boolean applicationManaged) throws ValidateException { this.securityDomainManaged = securityDomainManaged; this.securityDomainAndApplicationManaged = securityDomainAndApplicationManaged; this.applicationManaged = applicationManaged; this.validate(); }
/** * Constructor * * @param validateOnMatch validateOnMatch * @param backgroundValidation backgroundValidation * @param backgroundValidationMillis backgroundValidationMillis * @param useFastFail useFastFail * @throws ValidateException in case of error */ public ValidationImpl(Boolean validateOnMatch, Boolean backgroundValidation, Long backgroundValidationMillis, Boolean useFastFail) throws ValidateException { this.validateOnMatch = validateOnMatch; this.backgroundValidation = backgroundValidation; this.backgroundValidationMillis = backgroundValidationMillis; this.useFastFail = useFastFail; partialCommonValidate(); }
/** * Constructor * * @param blockingTimeoutMillis blockingTimeoutMillis * @param idleTimeoutMinutes idleTimeoutMinutes * @param allocationRetry allocationRetry * @param allocationRetryWaitMillis allocationRetryWaitMillis * @param xaResourceTimeout xaResourceTimeout * @throws ValidateException ValidateException */ public TimeOutImpl(Long blockingTimeoutMillis, Long idleTimeoutMinutes, Integer allocationRetry, Long allocationRetryWaitMillis, Integer xaResourceTimeout) throws ValidateException { this.blockingTimeoutMillis = blockingTimeoutMillis; this.idleTimeoutMinutes = idleTimeoutMinutes; this.allocationRetry = allocationRetry; this.allocationRetryWaitMillis = allocationRetryWaitMillis; this.xaResourceTimeout = xaResourceTimeout; this.partialCommonValidate(); }
/** * Constructor * * @param minPoolSize minPoolSize * @param initialPoolSize initialPoolSize * @param maxPoolSize maxPoolSize * @param prefill prefill * @param useStrictMin useStrictMin * @param flushStrategy flushStrategy * @param capacity capacity * @throws ValidateException ValidateException */ public PoolImpl(Integer minPoolSize, Integer initialPoolSize, Integer maxPoolSize, Boolean prefill, Boolean useStrictMin, FlushStrategy flushStrategy, Capacity capacity) throws ValidateException { this.minPoolSize = minPoolSize; this.initialPoolSize = initialPoolSize; this.maxPoolSize = maxPoolSize; this.prefill = prefill; this.useStrictMin = useStrictMin; this.flushStrategy = flushStrategy; this.capacity = capacity; this.validate(); }
/** * {@inheritDoc} */ public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + ((interleaving == null) ? 0 : interleaving.hashCode()); result = prime * result + ((isSameRmOverride == null) ? 0 : isSameRmOverride.hashCode()); result = prime * result + ((noTxSeparatePool == null) ? 0 : noTxSeparatePool.hashCode()); result = prime * result + ((padXid == null) ? 0 : padXid.hashCode()); result = prime * result + ((wrapXaResource == null) ? 0 : wrapXaResource.hashCode()); return result; }
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + ((queryTimeout == null) ? 0 : queryTimeout.hashCode()); result = prime * result + ((setTxQueryTimeout == null) ? 0 : setTxQueryTimeout.hashCode()); result = prime * result + ((useTryLock == null) ? 0 : useTryLock.hashCode()); return result; }
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + ((reauthPlugin == null) ? 0 : reauthPlugin.hashCode()); return result; }
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + ((allowMultipleUsers == null) ? 0 : allowMultipleUsers.hashCode()); result = prime * result + ((connectionListener == null) ? 7 : 7 * connectionListener.hashCode()); return result; }
/** * {@inheritDoc} */ @Override public int hashCode() { return super.hashCode() + (elytronEnabled? 1: 0); }
/** * {@inheritDoc} */ @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SecurityImpl) { SecurityImpl other = (SecurityImpl) obj; if (elytronEnabled != other.elytronEnabled) return false; } return super.equals(obj); }
/** * convert an xml element in String value * * @param reader the StAX reader * @param attributeName the name of the attribute * @return the string representing element * @throws XMLStreamException StAX exception */ protected Integer attributeAsInt(XMLStreamReader reader, String attributeName) throws XMLStreamException { String attributeString = getSubstitutionValue(rawAttributeText(reader, attributeName)); return attributeString != null ? Integer.valueOf(getSubstitutionValue(attributeString)) : null; }
/** * Create a new SecurityImpl. * * @param userName userName * @param password password * @param securityDomain securityDomain * @throws ValidateException ValidateException */ public CredentialImpl(String userName, String password, String securityDomain) throws ValidateException { super(); this.userName = userName; this.password = password; this.securityDomain = securityDomain; this.validate(); }