Builder(final EJBClientContext clientContext) { globalInterceptors = Arrays.stream(clientContext.globalInterceptors.getInformation()).collect(Collectors.toCollection(ArrayList::new)); classInterceptors = new ArrayList<>(); for (Map.Entry<String, InterceptorList> entry : clientContext.getConfiguredPerClassInterceptors().entrySet()) { final String className = entry.getKey(); for (EJBClientInterceptorInformation information : entry.getValue().getInformation()) { classInterceptors.add(new ClassInterceptor(className, information)); } } methodInterceptors = new ArrayList<>(); for (Map.Entry<String, Map<EJBMethodLocator, InterceptorList>> entry : clientContext.getConfiguredPerMethodInterceptors().entrySet()) { final String className = entry.getKey(); for (Map.Entry<EJBMethodLocator, InterceptorList> entry1 : entry.getValue().entrySet()) { final EJBMethodLocator methodLocator = entry1.getKey(); for (EJBClientInterceptorInformation information : entry1.getValue().getInformation()) { methodInterceptors.add(new MethodInterceptor(className, methodLocator, information)); } } } transportProviders = new ArrayList<>(); Collections.addAll(transportProviders, clientContext.transportProviders); clientConnections = new ArrayList<>(); clientConnections.addAll(clientContext.getConfiguredConnections()); clientClusters = new ArrayList<>(); clientClusters.addAll(clientContext.configuredClusters.values()); clusterNodeSelector = clientContext.clusterNodeSelector; deploymentNodeSelector = clientContext.deploymentNodeSelector; invocationTimeout = clientContext.invocationTimeout; }
do { final ClassInterceptor classInterceptor = classInterceptorsIterator.next(); map.computeIfAbsent(classInterceptor.getClassName(), ignored -> new ArrayList<>()).add(classInterceptor.getInterceptor()); } while (classInterceptorsIterator.hasNext()); final Iterator<Map.Entry<String, ArrayList<EJBClientInterceptorInformation>>> mapIterator = map.entrySet().iterator();
do { final ClassInterceptor classInterceptor = classInterceptorsIterator.next(); map.computeIfAbsent(classInterceptor.getClassName(), ignored -> new ArrayList<>()).add(classInterceptor.getInterceptor()); } while (classInterceptorsIterator.hasNext()); final Iterator<Map.Entry<String, ArrayList<EJBClientInterceptorInformation>>> mapIterator = map.entrySet().iterator();
do { final ClassInterceptor classInterceptor = classInterceptorsIterator.next(); map.computeIfAbsent(classInterceptor.getClassName(), ignored -> new ArrayList<>()).add(classInterceptor.getInterceptor()); } while (classInterceptorsIterator.hasNext()); final Iterator<Map.Entry<String, ArrayList<EJBClientInterceptorInformation>>> mapIterator = map.entrySet().iterator();
Builder(final EJBClientContext clientContext) { globalInterceptors = Arrays.stream(clientContext.globalInterceptors.getInformation()).collect(Collectors.toCollection(ArrayList::new)); classInterceptors = new ArrayList<>(); for (Map.Entry<String, InterceptorList> entry : clientContext.getConfiguredPerClassInterceptors().entrySet()) { final String className = entry.getKey(); for (EJBClientInterceptorInformation information : entry.getValue().getInformation()) { classInterceptors.add(new ClassInterceptor(className, information)); } } methodInterceptors = new ArrayList<>(); for (Map.Entry<String, Map<EJBMethodLocator, InterceptorList>> entry : clientContext.getConfiguredPerMethodInterceptors().entrySet()) { final String className = entry.getKey(); for (Map.Entry<EJBMethodLocator, InterceptorList> entry1 : entry.getValue().entrySet()) { final EJBMethodLocator methodLocator = entry1.getKey(); for (EJBClientInterceptorInformation information : entry1.getValue().getInformation()) { methodInterceptors.add(new MethodInterceptor(className, methodLocator, information)); } } } transportProviders = new ArrayList<>(); Collections.addAll(transportProviders, clientContext.transportProviders); clientConnections = new ArrayList<>(); clientConnections.addAll(clientContext.getConfiguredConnections()); clientClusters = new ArrayList<>(); clientClusters.addAll(clientContext.configuredClusters.values()); clusterNodeSelector = clientContext.clusterNodeSelector; deploymentNodeSelector = clientContext.deploymentNodeSelector; invocationTimeout = clientContext.invocationTimeout; }
Builder(final EJBClientContext clientContext) { globalInterceptors = Arrays.stream(clientContext.globalInterceptors.getInformation()).collect(Collectors.toCollection(ArrayList::new)); classInterceptors = new ArrayList<>(); for (Map.Entry<String, InterceptorList> entry : clientContext.getConfiguredPerClassInterceptors().entrySet()) { final String className = entry.getKey(); for (EJBClientInterceptorInformation information : entry.getValue().getInformation()) { classInterceptors.add(new ClassInterceptor(className, information)); } } methodInterceptors = new ArrayList<>(); for (Map.Entry<String, Map<EJBMethodLocator, InterceptorList>> entry : clientContext.getConfiguredPerMethodInterceptors().entrySet()) { final String className = entry.getKey(); for (Map.Entry<EJBMethodLocator, InterceptorList> entry1 : entry.getValue().entrySet()) { final EJBMethodLocator methodLocator = entry1.getKey(); for (EJBClientInterceptorInformation information : entry1.getValue().getInformation()) { methodInterceptors.add(new MethodInterceptor(className, methodLocator, information)); } } } transportProviders = new ArrayList<>(); Collections.addAll(transportProviders, clientContext.transportProviders); clientConnections = new ArrayList<>(); clientConnections.addAll(clientContext.getConfiguredConnections()); clientClusters = new ArrayList<>(); clientClusters.addAll(clientContext.configuredClusters.values()); clusterNodeSelector = clientContext.clusterNodeSelector; deploymentNodeSelector = clientContext.deploymentNodeSelector; invocationTimeout = clientContext.invocationTimeout; }
public Builder addClassInterceptor(String className, EJBClientInterceptor interceptor) { Assert.checkNotNullParam("className", className); Assert.checkNotNullParam("interceptor", interceptor); if (classInterceptors == null) { classInterceptors = new ArrayList<>(); } classInterceptors.add(new ClassInterceptor(className, EJBClientInterceptorInformation.forInstance(interceptor))); return this; }
public Builder addClassInterceptor(String className, Class<? extends EJBClientInterceptor> interceptorClass) { Assert.checkNotNullParam("className", className); Assert.checkNotNullParam("interceptorClass", interceptorClass); if (classInterceptors == null) { classInterceptors = new ArrayList<>(); } classInterceptors.add(new ClassInterceptor(className, EJBClientInterceptorInformation.forClass(interceptorClass))); return this; }
public Builder addClassInterceptor(String className, EJBClientInterceptor interceptor) { Assert.checkNotNullParam("className", className); Assert.checkNotNullParam("interceptor", interceptor); if (classInterceptors == null) { classInterceptors = new ArrayList<>(); } classInterceptors.add(new ClassInterceptor(className, EJBClientInterceptorInformation.forInstance(interceptor))); return this; }
public Builder addClassInterceptor(String className, Class<? extends EJBClientInterceptor> interceptorClass) { Assert.checkNotNullParam("className", className); Assert.checkNotNullParam("interceptorClass", interceptorClass); if (classInterceptors == null) { classInterceptors = new ArrayList<>(); } classInterceptors.add(new ClassInterceptor(className, EJBClientInterceptorInformation.forClass(interceptorClass))); return this; }
public Builder addClassInterceptor(String className, EJBClientInterceptor interceptor) { Assert.checkNotNullParam("className", className); Assert.checkNotNullParam("interceptor", interceptor); if (classInterceptors == null) { classInterceptors = new ArrayList<>(); } classInterceptors.add(new ClassInterceptor(className, EJBClientInterceptorInformation.forInstance(interceptor))); return this; }
public Builder addClassInterceptor(String className, Class<? extends EJBClientInterceptor> interceptorClass) { Assert.checkNotNullParam("className", className); Assert.checkNotNullParam("interceptorClass", interceptorClass); if (classInterceptors == null) { classInterceptors = new ArrayList<>(); } classInterceptors.add(new ClassInterceptor(className, EJBClientInterceptorInformation.forClass(interceptorClass))); return this; }