/*
(non-Javadoc)
@see javax.servlet.sip.SipServletResponse#getChallengeRealms()
544590
public Iterator<String> getChallengeRealms() {
		List<String> realms = new ArrayList<String>();
		final Response response = getResponse();
		if(response.getStatusCode() == SipServletResponse.SC_UNAUTHORIZED) {
			WWWAuthenticateHeader authenticateHeader = (WWWAuthenticateHeader) 
				response.getHeader(WWWAuthenticateHeader.NAME);
			realms.add(authenticateHeader.getRealm());
		} else if (response.getStatusCode() == SipServletResponse.SC_PROXY_AUTHENTICATION_REQUIRED) {
			ProxyAuthenticateHeader authenticateHeader = (ProxyAuthenticateHeader) 
				response.getHeader(ProxyAuthenticateHeader.NAME);
			realms.add(authenticateHeader.getRealm());
		}
		return realms.iterator();
	}
1345164
public final List<MtasSolrStatus> checkForExceptions() {
    List<MtasSolrStatus> statusWithException = null;
    for (MtasSolrStatus item : data) {
      if (item.checkResponseForException()) {
        if (statusWithException == null) {
          statusWithException = new ArrayList<>();
        }
        statusWithException.add(item);
      }
    }
    return statusWithException;
  }
843476
private static String[] decideCipherSuites()
  {
    String sysCipherSuites = System.getProperty("https.cipherSuites");

    String[] cipherSuites = sysCipherSuites != null ? sysCipherSuites.split(",") :
                            // use jdk default cipher suites
                            ((SSLServerSocketFactory) SSLServerSocketFactory.getDefault())
                                .getDefaultCipherSuites();

    // cipher suites need to be picked up in code explicitly for jdk 1.7
    // https://stackoverflow.com/questions/44378970/
    if (logger.isTraceEnabled())
    {
      logger.trace("Cipher suites used: {}", Arrays.toString(cipherSuites));
    }

    return cipherSuites;
  }
324940
public static TrustManager[] getTrustManagers() throws InitializationException {
		String file = System.getProperty("javax.net.ssl.trustStore");
		String pass = System.getProperty("javax.net.ssl.trustStorePassword");

		if (file == null || pass == null) {
			throw new InitializationException("javax.net.ssl.trustStore / "
					+ "javax.net.ssl.trustStorePassword not set");
		}

		return getTrustManagers(file, pass);
	}
801732
public List<String> getErrorMessages() {
        List<String> messages = new ArrayList<String>( errors.size() );

        for ( DroolsParserException activeException : errors ) {
            messages.add( activeException.getMessage() );
        }

        return messages;
    }
308219
public java.util.List<String> getNotificationARNs() {
        if (notificationARNs == null) {
            notificationARNs = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return notificationARNs;
    }
612024
public String[] getServerAliases(String keyType, Principal[] issuers) 
	{
		return parent.getServerAliases(keyType, issuers);
	}
989837
List<Message> getMessages(final Level level) {
        if (level == null) {
            throw new NullPointerException("Level can't be null");
        }

        return Collections.unmodifiableList(this.messages.get(level));
    }
974590
public RespondToAuthChallengeResult withChallengeParameters(java.util.Map<String, String> challengeParameters) {
        setChallengeParameters(challengeParameters);
        return this;
    }
344456
public java.util.List<EvaluationResult> getEvaluationResults() {
        if (evaluationResults == null) {
            evaluationResults = new com.amazonaws.internal.SdkInternalList<EvaluationResult>();
        }
        return evaluationResults;
    }
475434
public java.util.List<? extends com.google.appengine.v1.ErrorHandlerOrBuilder> 
      getErrorHandlersOrBuilderList() {
    return errorHandlers_;
  }
546641
@Override
	public List<String> getDeps() {
		final String sourceMethod = "getDeps"; //$NON-NLS-1$
		if (isTraceLogging) {
			log.entering(RequestedModuleNames.class.getName(), sourceMethod);
			log.exiting(RequestedModuleNames.class.getName(), sourceMethod, deps);
		}
		return deps;
	}
1238023
Set<ConnectionManager> getConnectionManagers()
   {
      if (cmToCl == null)
         return Collections.unmodifiableSet(Collections.emptySet());

      return Collections.unmodifiableSet(cmToCl.keySet());
   }
421961
public java.util.List<ServiceError> getServiceErrors() {
        if (serviceErrors == null) {
            serviceErrors = new com.amazonaws.internal.SdkInternalList<ServiceError>();
        }
        return serviceErrors;
    }
861744
public List<SipServletMessage> getPendingMessages(SipSession session,
            UAMode mode) {
        final MobicentsSipSession sipSessionImpl = (MobicentsSipSession) session;
        if (!sipSessionImpl.isValidInternal()) {
            throw new IllegalArgumentException("the session " + sipSessionImpl.getId() + " is invalid");
        }

        final List<SipServletMessage> retval = new ArrayList<SipServletMessage>();
        if (mode.equals(UAMode.UAC)) {
            final Set<Transaction> ongoingTransactions = sipSessionImpl.getOngoingTransactions();
            if (ongoingTransactions != null) {
                for (Transaction transaction : ongoingTransactions) {
                    if (transaction instanceof ClientTransaction) {
                        final TransactionApplicationData tad = (TransactionApplicationData) transaction.getApplicationData();
                        // Issue1571 http://code.google.com/p/mobicents/issues/detail?id=1571
                        // NullPointerException in SipServletResponseImpl.isCommitted
                        // race condition can occur between app code thread and processTxTerminated or Timeout thread
                        if (tad != null) {
                            final SipServletMessage sipServletMessage = tad.getSipServletMessage();
                            if (sipServletMessage != null) {
                                //not specified if ACK is a committed message in the spec but it seems not since Proxy api test
                                //testCancel101 method adds a header to the ACK and it cannot be on a committed message
                                //so we don't want to return ACK as pending messages here. related to TCK test B2BUAHelper.testCreateRequest002
                                if (!sipServletMessage.isCommitted() && !Request.ACK.equals(sipServletMessage.getMethod()) && !Request.PRACK.equals(sipServletMessage.getMethod())) {
                                    retval.add(sipServletMessage);
                                }
                                final Set<SipServletResponseImpl> sipServletsResponses = tad.getSipServletResponses();
                                if (sipServletsResponses != null) {
                                    for (SipServletResponseImpl sipServletResponseImpl : sipServletsResponses) {
                                        if (!sipServletResponseImpl.isCommitted()) {
                                            //do not return Trying, this makes TCK AppRouter fail.
                                            if (sipServletResponseImpl.getStatus() != 100
                                                    ) {
                                                retval.add(sipServletResponseImpl);
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        } else {
            final Set<Transaction> ongoingTransactions = sipSessionImpl.getOngoingTransactions();
            if (ongoingTransactions != null) {
                for (Transaction transaction : ongoingTransactions) {
                    if (transaction instanceof ServerTransaction) {
                        final TransactionApplicationData tad = (TransactionApplicationData) transaction.getApplicationData();
                        if (tad != null) {
                            final SipServletMessage sipServletMessage = tad.getSipServletMessage();
                            if (sipServletMessage != null) {
                                //not specified if ACK is a committed message in the spec but it seems not since Proxy api test
                                //testCanacel101 method adds a header to the ACK and it cannot be on a committed message
                                //so we don't want to return ACK as pending messages here. related to TCK test B2BUAHelper.testCreateRequest002
                                if (!sipServletMessage.isCommitted() && !Request.ACK.equals(sipServletMessage.getMethod())) {
                                    retval.add(sipServletMessage);
                                }
                            }
                        }
                    }
                }
            }
        }
        if (logger.isDebugEnabled()) {
            StringBuffer buffer = new StringBuffer();
            buffer.append("############pending messages");
            for (SipServletMessage msg : retval) {
                buffer.append(msg);
            }
            buffer.append("############pending messages");
            logger.debug(buffer.toString());
        }
        return retval;
    }
493101
public List<J4pRemoteException> getRemoteExceptions() {
        List<J4pRemoteException> ret = new ArrayList<J4pRemoteException>();
        for (Object entry : results) {
            if (entry instanceof J4pRemoteException) {
                ret.add((J4pRemoteException) entry);
            }
        }
        return ret;
    }
1318077
protected String getRequiredMessage(final String[] messageKeys) {
		MessageSourceResolvable resolvable = new MessageSourceResolvable() {

			public String[] getCodes() {
				return messageKeys;
			}

			public Object[] getArguments() {
				return null;
			}

			public String getDefaultMessage() {
				if (messageKeys.length > 0) {
					return messageKeys[0];
				}
				return "";
			}
		};
		return getMessages().getMessage(resolvable);
	}