Gets the required Callback objects needed by this login module.

@param callbackHandler
@return
@throws IOException
@throws UnsupportedCallbackException
184926
@Override
    public Callback[] getRequiredCallbacks(CallbackHandler callbackHandler) throws IOException, UnsupportedCallbackException {
        Callback[] callbacks = new Callback[3];
        callbacks[0] = new WSCredTokenCallbackImpl("Credential Token");
        callbacks[1] = new WSAuthMechOidCallbackImpl("AuthMechOid");
        callbacks[2] = new JwtTokenCallback();
        callbackHandler.handle(callbacks);
        return callbacks;
    }
217912
public RequestToken retrieveRequestToken(String callbackURL) {
        OAuthConsumer consumer = new DefaultOAuthConsumer(info.key.key, info.key.secret);
        try {
            provider.retrieveRequestToken(consumer, callbackURL);
            return new RequestToken(consumer.getToken(), consumer.getTokenSecret());
        } catch (OAuthException ex) {
            throw new RuntimeException(ex);
        }
    }
702234
public static Handler newHandler(Handler original, Handler.Callback callback) {
        return new Handler(original.getLooper(), callback);
    }
15976
@SuppressWarnings("unchecked") public Class<T> getAnnotationHandledByThisHandler() {
		return (Class<T>) SpiLoadUtil.findAnnotationClass(getClass(), EclipseAnnotationHandler.class);
	}
70740
public JsonNode handleCallback(final Callback callback) {

        if (callback.getInvoke() != null) {
            return invokeCallbackMethod(callback.getInvoke(), callback.getCookie());
        } else if (callback.getGet() != null) {
            return invokeCallbackGet(callback.getGet());
        } else if (callback.getSet() != null) {
            return invokeCallbackSet(callback.getSet());
        }

        throw new JsiiException("Unrecognized callback type: get/set/invoke");
    }
844634
public AuthorizingCallbackHandler getCallbackHandler(final String mechanismName, final Map<String, String> mechanismProperties) {

      return new AuthorizingCallbackHandler() {
         Subject subject = new Subject();
         Principal userPrincipal;

         public void handle(final Callback[] callbacks) throws IOException, UnsupportedCallbackException {
            String userName = null;
            String realmName = null;
            for (Callback callback : callbacks) {
               if (callback instanceof NameCallback) {
                  final NameCallback nameCallback = (NameCallback) callback;
                  final String defaultName = nameCallback.getDefaultName();
                  userName = defaultName.toLowerCase().trim();
                  nameCallback.setName(userName);
                  userPrincipal = new SimpleUserPrincipal(userName);
                  subject.getPrincipals().add(userPrincipal);
               } else if (callback instanceof RealmCallback) {
                  final RealmCallback realmCallback = (RealmCallback) callback;
                  final String defaultRealm = realmCallback.getDefaultText();
                  if (defaultRealm != null) {
                     realmName = defaultRealm.toLowerCase().trim();
                     realmCallback.setText(realmName);
                  }
               } else if (callback instanceof PasswordCallback) {
                  final PasswordCallback passwordCallback = (PasswordCallback) callback;
                  // retrieve the record based on user and realm (if any)
                  Entry entry = null;
                  if (realmName == null) {
                     // scan all realms
                     synchronized (map) {
                        for (Map<String, Entry> realmMap : map.values()) {
                           if (realmMap.containsKey(userName)) {
                              entry = realmMap.get(userName);
                              break;
                           }
                        }
                     }
                  } else {
                     synchronized (map) {
                        final Map<String, Entry> realmMap = map.get(realmName);
                        if (realmMap != null) {
                           entry = realmMap.get(userName);
                        }
                     }
                  }
                  if (entry == null) {
                     throw new AuthenticationException("No matching user found");
                  }
                  for (String group : entry.getGroups()) {
                     subject.getPrincipals().add(new SimpleGroupPrincipal(group));
                  }
                  passwordCallback.setPassword(entry.getPassword());
               } else if (callback instanceof AuthorizeCallback) {
                  final AuthorizeCallback authorizeCallback = (AuthorizeCallback) callback;
                  authorizeCallback.setAuthorized(authorizeCallback.getAuthenticationID().equals(
                        authorizeCallback.getAuthorizationID()));
               } else {
                  throw new UnsupportedCallbackException(callback, "Callback not supported: " + callback);
               }
            }
         }

         @Override
         public SubjectUserInfo getSubjectUserInfo(Collection<Principal> principals) {
            if (principals != null) {
               subject.getPrincipals().addAll(principals);
            }
            if (userPrincipal != null) {
               return new SimpleSubjectUserInfo(userPrincipal.getName(), subject);
            } else {
               return new SimpleSubjectUserInfo(subject);
            }
         }
      };
   }
507547
public MQLinkHandler getMQLinkHandler() 
  {
    if (tc.isEntryEnabled())
    {
      SibTr.entry(tc, "getMQLinkHandler");
      SibTr.exit(tc, "getMQLinkHandler", _mqLinkHandler);
    }    
    return _mqLinkHandler;
  }
402235
public static <T> AsyncCallback<T> disabler (AsyncCallback<T> callback,
                                                 final HasEnabled... disablees)
    {
        for (HasEnabled widget : disablees) {
            widget.setEnabled(false);
        }
        return new ChainedCallback<T, T>(callback) {
            @Override public void onSuccess (T result) {
                for (HasEnabled widget : disablees) {
                    widget.setEnabled(true);
                }
                forwardSuccess(result);
            }
            @Override public void onFailure (Throwable cause) {
                for (HasEnabled widget : disablees) {
                    widget.setEnabled(true);
                }
                super.onFailure(cause);
            }
        };
    }
92638
@Override
    public boolean asyncCheckBuffers(InterChannelCallback callback) {
        try {
            return checkBuffer();
        } catch (IOException ioe) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "We should never get to this point, exception was : " + ioe);
            }
        }
        return false;
    }
1150141
private HttpRequestRetryHandler getRetryHandler() {
    final HttpRequestRetryHandler myRetryHandler = new HttpRequestRetryHandler() {

      public boolean retryRequest(IOException exception, int executionCount, HttpContext context) {
        if (executionCount >= connectionConfiguration.getExecutionCount()) {
          // Do not retry if over max retry count
          LOG.debug("Execution count {} is bigger than threshold. Stop", executionCount);
          return false;
        }
        if (exception instanceof NoHttpResponseException) {
          LOG.debug("NoHttpResponseException exception. Retry count {}", executionCount);
          return true;
        }
        if (exception instanceof UnknownHostException) {
          LOG.debug("UnknownHostException. Retry count {}", executionCount);
          return true;
        }
        if (exception instanceof ConnectTimeoutException) {
          LOG.debug("ConnectTimeoutException. Retry count {}", executionCount);
          return true;
        }
        if (exception instanceof SocketTimeoutException
            || exception.getClass() == SocketTimeoutException.class
            || exception.getClass().isInstance(SocketTimeoutException.class)) {
          // Connection refused
          LOG.debug("socketTimeoutException Retry count {}", executionCount);
          return true;
        }
        if (exception instanceof InterruptedIOException) {
          // Timeout
          LOG.debug("InterruptedIOException Retry count {}", executionCount);
          return true;
        }
        if (exception instanceof SSLException) {
          LOG.debug("SSLException Retry count {}", executionCount);
          return true;
        }
        final HttpClientContext clientContext = HttpClientContext.adapt(context);
        final HttpRequest request = clientContext.getRequest();
        boolean idempotent = !(request instanceof HttpEntityEnclosingRequest);
        if (idempotent) {
          LOG.debug("HttpEntityEnclosingRequest. Retry count {}", executionCount);
          return true;
        }
        LOG.debug("Retry stopped. Retry count {}", executionCount);
        return false;
      }
    };
    return myRetryHandler;
  }
542413
@Advice.OnMethodExit
	public static void afterGetHandler(@Advice.Return Object handler) {
		SpringMvcRequestNameDeterminerTransformer.setRequestNameByHandler(handler);
	}
1167754
@Override
    public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
        if (serverCallbackHandler.getValue() != null) {
            serverCallbackHandler.getValue().handle((callbacks));
        }
    }
1291827
def callbacks(cls, eventType=None):
        
        key = '_{0}__callbacks'.format(cls.__name__)
        try:
            callbacks = getattr(cls, key)
        except AttributeError:
            callbacks = {}
            setattr(cls, key, callbacks)

        return callbacks.get(eventType, []) if eventType is not None else callbacks
187527
private ClassLoaderHandlerRegistryEntry getRegistryEntry(final ClassLoader classLoader) {
        ClassLoaderHandlerRegistryEntry entry = classLoaderToClassLoaderHandlerRegistryEntry.get(classLoader);
        if (entry == null) {
            // Find a ClassLoaderHandler that can handle the ClassLoader
            for (final ClassLoaderHandlerRegistryEntry handler : ClassLoaderHandlerRegistry.CLASS_LOADER_HANDLERS) {
                if (handler.canHandle(classLoader)) {
                    // This ClassLoaderHandler can handle the ClassLoader
                    entry = handler;
                    break;
                }
            }
            if (entry == null) {
                // Use fallback handler
                entry = ClassLoaderHandlerRegistry.FALLBACK_HANDLER;
            }
            classLoaderToClassLoaderHandlerRegistryEntry.put(classLoader, entry);
        }
        return entry;
    }
946540
private <T> HttpResponseHandler<T> getNonNullResponseHandler(
            HttpResponseHandler<T> responseHandler) {
        if (responseHandler != null) {
            return responseHandler;
        } else {
            // Return a Dummy, No-Op handler
            return new HttpResponseHandler<T>() {

                @Override
                public T handle(HttpResponse response) throws Exception {
                    return null;
                }

                @Override
                public boolean needsConnectionLeftOpen() {
                    return false;
                }
            };
        }
    }
1118639
@SuppressWarnings("unchecked")
    public <E> MessageHandler<? super E> getMessageHandler(Class<E> type) {
        return (MessageHandler<? super E>) receivedMessageHandlers.get(type);
    }
510985
public List<Callback> pendingCallbacks() {
        ObjectNode req = makeRequest("callbacks");
        JsonNode resp = this.runtime.requestResponse(req);

        JsonNode callbacksResp = resp.get("callbacks");
        if (callbacksResp == null || !callbacksResp.isArray()) {
            throw new JsiiException("Expecting a 'callbacks' key with an array in response");
        }

        ArrayNode callbacksArray = (ArrayNode) callbacksResp;

        List<Callback> result = new ArrayList<>();
        callbacksArray.forEach(node -> {
            result.add(JsiiObjectMapper.treeToValue(node, Callback.class));
        });

        return result;
    }