Class RankedProvider<T>

java.lang.Object
org.glassfish.jersey.model.internal.RankedProvider<T>
Type Parameters:
T - service provider contract Java type.

public class RankedProvider<T> extends Object
Jersey ranked provider model.
Author:
Michal Gajdos
  • Constructor Details

    • RankedProvider

      public RankedProvider(T provider)
      Creates a new RankedProvider instance. The rank of the provider is obtained from the Priority annotation or is set to 5000 if the annotation is not present.
      Parameters:
      provider - service provider to create a RankedProvider instance from.
    • RankedProvider

      public RankedProvider(T provider, int rank)
      Creates a new RankedProvider instance for given provider with specific rank (> 0).
      Parameters:
      provider - service provider to create a RankedProvider instance from.
      rank - rank of this provider.
    • RankedProvider

      public RankedProvider(T provider, int rank, Set<Type> contracts)
      Creates a new RankedProvider instance for given provider with specific rank (> 0).
      Parameters:
      provider - service provider to create a RankedProvider instance from.
      rank - rank of this provider.
      contracts - contracts implemented by the service provider
  • Method Details

    • getProvider

      public T getProvider()
    • getRank

      public int getRank()
    • getContractTypes

      public Set<Type> getContractTypes()
      Get me set of implemented contracts. Returns null if no contracts are implemented.
      Returns:
      set of contracts or null if no contracts have been implemented.
    • toString

      public String toString()
      Overrides:
      toString in class Object