/** * Returns an unmodifiable collection of all currently active {@link Context}s. This is just a convenient method. * * Note that for each scope, there might be more than one {@link Context}, but there can be at most one active at a time. * * @return Collection of all currently active {@link Context}s */ default Collection<Context> getActiveContexts() { return getScopes().stream() .filter(this::isContextActive) .map(this::getContext) .collect(Collectors.toSet()); }
/** * Returns an unmodifiable collection of all currently active {@link Context}s. This is just a convenient method. * * Note that for each scope, there might be more than one {@link Context}, but there can be at most one active at a time. * * @return Collection of all currently active {@link Context}s */ default Collection<Context> getActiveContexts() { return getScopes().stream() .filter(this::isContextActive) .map(this::getContext) .collect(Collectors.toSet()); }
/** * Returns an unmodifiable collection of all currently active {@link Context}s. This is just a convenient method. * * Note that for each scope, there might be more than one {@link Context}, but there can be at most one active at a time. * * @return Collection of all currently active {@link Context}s */ default Collection<Context> getActiveContexts() { return getScopes().stream() .filter(this::isContextActive) .map(this::getContext) .collect(Collectors.toSet()); }
/** * Returns an unmodifiable collection of all currently active {@link Context}s. This is just a convenient method. * * Note that for each scope, there might be more than one {@link Context}, but there can be at most one active at a time. * * @return Collection of all currently active {@link Context}s */ default Collection<Context> getActiveContexts() { return getScopes().stream() .filter(this::isContextActive) .map(this::getContext) .collect(Collectors.toSet()); }
/** * Returns an unmodifiable collection of all currently active {@link Context}s. This is just a convenient method. * * Note that for each scope, there might be more than one {@link Context}, but there can be at most one active at a time. * * @return Collection of all currently active {@link Context}s */ default Collection<Context> getActiveContexts() { return getScopes().stream() .filter(this::isContextActive) .map(this::getContext) .collect(Collectors.toSet()); }
/** * Returns an unmodifiable collection of all currently active {@link Context}s. This is just a convenient method. * * Note that for each scope, there might be more than one {@link Context}, but there can be at most one active at a time. * * @return Collection of all currently active {@link Context}s */ default Collection<Context> getActiveContexts() { return getScopes().stream() .filter(this::isContextActive) .map(this::getContext) .collect(Collectors.toSet()); }
/** * Returns an unmodifiable collection of all currently active {@link Context}s that implement {@link WeldAlterableContext}. * This is just a convenient method. * * Note that for each scope, there might be more than one {@link Context}, but there can be at most one active at a time. * This method can therefore return an incomplete view of all active contexts as not every context implements {@link WeldAlterableContext}. * * @return Collection of all active contexts implementing {@link WeldAlterableContext} */ default Collection<WeldAlterableContext> getActiveWeldAlterableContexts() { return getScopes().stream() .filter(this::isContextActive) .map(this::getContext) .filter(t -> t instanceof WeldAlterableContext) .map(t -> (WeldAlterableContext) t) .collect(Collectors.toSet()); } }
/** * Returns an unmodifiable collection of all currently active {@link Context}s that implement {@link WeldAlterableContext}. * This is just a convenient method. * * Note that for each scope, there might be more than one {@link Context}, but there can be at most one active at a time. * This method can therefore return an incomplete view of all active contexts as not every context implements {@link WeldAlterableContext}. * * @return Collection of all active contexts implementing {@link WeldAlterableContext} */ default Collection<WeldAlterableContext> getActiveWeldAlterableContexts() { return getScopes().stream() .filter(this::isContextActive) .map(this::getContext) .filter(t -> t instanceof WeldAlterableContext) .map(t -> (WeldAlterableContext) t) .collect(Collectors.toSet()); } }
/** * Returns an unmodifiable collection of all currently active {@link Context}s that implement {@link WeldAlterableContext}. * This is just a convenient method. * * Note that for each scope, there might be more than one {@link Context}, but there can be at most one active at a time. * This method can therefore return an incomplete view of all active contexts as not every context implements {@link WeldAlterableContext}. * * @return Collection of all active contexts implementing {@link WeldAlterableContext} */ default Collection<WeldAlterableContext> getActiveWeldAlterableContexts() { return getScopes().stream() .filter(this::isContextActive) .map(this::getContext) .filter(t -> t instanceof WeldAlterableContext) .map(t -> (WeldAlterableContext) t) .collect(Collectors.toSet()); } }
/** * Returns an unmodifiable collection of all currently active {@link Context}s that implement {@link WeldAlterableContext}. * This is just a convenient method. * * Note that for each scope, there might be more than one {@link Context}, but there can be at most one active at a time. * This method can therefore return an incomplete view of all active contexts as not every context implements {@link WeldAlterableContext}. * * @return Collection of all active contexts implementing {@link WeldAlterableContext} */ default Collection<WeldAlterableContext> getActiveWeldAlterableContexts() { return getScopes().stream() .filter(this::isContextActive) .map(this::getContext) .filter(t -> t instanceof WeldAlterableContext) .map(t -> (WeldAlterableContext) t) .collect(Collectors.toSet()); } }
/** * Returns an unmodifiable collection of all currently active {@link Context}s that implement {@link WeldAlterableContext}. * This is just a convenient method. * * Note that for each scope, there might be more than one {@link Context}, but there can be at most one active at a time. * This method can therefore return an incomplete view of all active contexts as not every context implements {@link WeldAlterableContext}. * * @return Collection of all active contexts implementing {@link WeldAlterableContext} */ default Collection<WeldAlterableContext> getActiveWeldAlterableContexts() { return getScopes().stream() .filter(this::isContextActive) .map(this::getContext) .filter(t -> t instanceof WeldAlterableContext) .map(t -> (WeldAlterableContext) t) .collect(Collectors.toSet()); } }
/** * Returns an unmodifiable collection of all currently active {@link Context}s that implement {@link WeldAlterableContext}. * This is just a convenient method. * * Note that for each scope, there might be more than one {@link Context}, but there can be at most one active at a time. * This method can therefore return an incomplete view of all active contexts as not every context implements {@link WeldAlterableContext}. * * @return Collection of all active contexts implementing {@link WeldAlterableContext} */ default Collection<WeldAlterableContext> getActiveWeldAlterableContexts() { return getScopes().stream() .filter(this::isContextActive) .map(this::getContext) .filter(t -> t instanceof WeldAlterableContext) .map(t -> (WeldAlterableContext) t) .collect(Collectors.toSet()); } }