public final class LinkHelper extends Object
LinkInstantaneous and LinkSpeedOfLight.| Modifier and Type | Method and Description | 
|---|---|
static VectorDisplacement | 
getDisplacementVectorByRole(ILinkService link,
                           LinkRole role)
Gets the displacement vector for a given link and role. 
 | 
static VectorDisplacement | 
getDisplacementVectorByRole(IServiceProvider link,
                           LinkRole role)
Gets the displacement vector for a given link and role. 
 | 
static LinkDelayEvaluator | 
getLinkDelayEvaluatorByRole(ILinkService link,
                           EvaluatorGroup group,
                           LinkRole role)
Gets a link delay evaluator for a given link and role. 
 | 
static LinkDelayEvaluator | 
getLinkDelayEvaluatorByRole(IServiceProvider link,
                           EvaluatorGroup group,
                           LinkRole role)
Gets a link delay evaluator for a given link and role. 
 | 
static ILinkService | 
getLinkService(IServiceProvider link)
Gets the  
ILinkService provided by a link. | 
static ILinkService | 
getLinkService(IServiceProvider link,
              String exceptionMessage)
Gets the  
ILinkService provided by a link. | 
static LinkRole | 
getOppositeLinkEnd(LinkRole role)
 | 
static ILinkService | 
getOptionalLinkService(IServiceProvider link)
Gets the  
ILinkService provided by a link, or null if the service does not exist. | 
static IServiceProvider | 
getParticipantByRole(ILinkService link,
                    LinkRole role)
Gets the participant that is playing a specified role in the link. 
 | 
static IServiceProvider | 
getParticipantByRole(IServiceProvider link,
                    LinkRole role)
Gets the participant that is playing a specified role in the link. 
 | 
static LinkRole | 
getRoleOfParticipant(ILinkService link,
                    IServiceProvider participant)
Gets the role played by a specified participant in the link. 
 | 
static LinkRole | 
getRoleOfParticipant(IServiceProvider link,
                    IServiceProvider participant)
Gets the role played by a specified participant in the link. 
 | 
@Nonnull public static ILinkService getLinkService(@Nonnull IServiceProvider link)
ILinkService provided by a link.link - The link from which to obtain the service.ArgumentNullException - Thrown when link is null.ServiceNotAvailableException - Thrown when link does not provide ILinkService.@Nonnull public static ILinkService getLinkService(@Nonnull IServiceProvider link, String exceptionMessage)
ILinkService provided by a link.link - The link from which to obtain the service.exceptionMessage - An error message to include in the exception if the service is unavailable.ArgumentNullException - Thrown when link is null.ServiceNotAvailableException - Thrown when link does not provide ILinkService.@Nullable public static ILinkService getOptionalLinkService(@Nonnull IServiceProvider link)
ILinkService provided by a link, or null if the service does not exist.link - The link from which to obtain the service.null if the service does not exist.ArgumentNullException - Thrown when link is null.public static IServiceProvider getParticipantByRole(@Nonnull IServiceProvider link, @Nonnull LinkRole role)
link - The link.role - The role for which to obtain the participant.ArgumentNullException - Thrown when link is null.ArgumentException - Thrown when role is not LinkRole.TRANSMITTER or LinkRole.RECEIVER.ServiceNotAvailableException - Thrown when link does not provide ILinkService.public static IServiceProvider getParticipantByRole(@Nonnull ILinkService link, @Nonnull LinkRole role)
link - The link.role - The role for which to obtain the participant.ArgumentNullException - Thrown when link is null.ArgumentException - Thrown when role is not LinkRole.TRANSMITTER or LinkRole.RECEIVER.@Nonnull public static VectorDisplacement getDisplacementVectorByRole(@Nonnull IServiceProvider link, @Nonnull LinkRole role)
link - The link.role - The role for which to obtain the displacement vector.ArgumentNullException - Thrown when link is null.ArgumentException - Thrown when role is not LinkRole.TRANSMITTER or LinkRole.RECEIVER.ServiceNotAvailableException - Thrown when link does not provide ILinkService.@Nonnull public static VectorDisplacement getDisplacementVectorByRole(@Nonnull ILinkService link, @Nonnull LinkRole role)
link - The link.role - The role for which to obtain the displacement vector.ArgumentNullException - Thrown when link is null.ArgumentException - Thrown when role is not LinkRole.TRANSMITTER or LinkRole.RECEIVER.@Nonnull public static LinkDelayEvaluator getLinkDelayEvaluatorByRole(@Nonnull IServiceProvider link, @Nonnull EvaluatorGroup group, @Nonnull LinkRole role)
link - The link.group - The group with which to associate the new evaluator.  By grouping evaluators
    that are often evaluated at the same Julian dates, common computations can be performed only once
    for the entire group instead of multiple times for each evaluator.role - The role for which to obtain a link delay evaluator.ArgumentNullException - Thrown when link or group is null.ArgumentException - Thrown when role is not LinkRole.TRANSMITTER or LinkRole.RECEIVER.ServiceNotAvailableException - Thrown when link does not provide ILinkService.@Nonnull public static LinkDelayEvaluator getLinkDelayEvaluatorByRole(@Nonnull ILinkService link, @Nonnull EvaluatorGroup group, @Nonnull LinkRole role)
link - The link.group - The group with which to associate the new evaluator.  By grouping evaluators
    that are often evaluated at the same Julian dates, common computations can be performed only once
    for the entire group instead of multiple times for each evaluator.role - The role for which to obtain a link delay evaluator.ArgumentNullException - Thrown when link or group is null.ArgumentException - Thrown when role is not LinkRole.TRANSMITTER or LinkRole.RECEIVER.@Nonnull public static LinkRole getRoleOfParticipant(@Nonnull IServiceProvider link, IServiceProvider participant)
link - The link.participant - The participant.ArgumentNullException - Thrown when link is null.ServiceNotAvailableException - Thrown when link does not provide ILinkService.ArgumentException - Thrown when participant is not the Transmitter (get) or the Receiver (get) in the link.@Nonnull public static LinkRole getRoleOfParticipant(@Nonnull ILinkService link, IServiceProvider participant)
link - The link.participant - The participant.ArgumentNullException - Thrown when link is null.ServiceNotAvailableException - Thrown when link does not provide ILinkService.ArgumentException - Thrown when participant is not the Transmitter (get) or the Receiver (get) in the link.@Nonnull public static LinkRole getOppositeLinkEnd(@Nonnull LinkRole role)
role - The link role for which to obtain the opposite end.ArgumentException - Thrown when role is not LinkRole.TRANSMITTER or LinkRole.RECEIVER.