Class RemoteAddeEntry.Builder
java.lang.Object
edu.wisc.ssec.mcidasv.servermanager.RemoteAddeEntry.Builder
- Enclosing class:
- RemoteAddeEntry
Something of a hack... this approach allows us to build a 
 
RemoteAddeEntry in a readable way, despite there being
 multiple final fields. 
 
 The only required parameters are
 the RemoteAddeEntry.address and RemoteAddeEntry.group.
Some examples:
 RemoteAddeEntry e = RemoteAddeEntry.Builder("adde.cool.com", "RTIMAGES").build();
 e = RemoteAddeEntry.Builder("adde.cool.com", "RTIMAGES").type(EntryType.IMAGE).account("user", "1337").build();
 e = RemoteAddeEntry.Builder("adde.cool.com", "RTIMAGES").account("user", "1337").type(EntryType.IMAGE).build()
 e = RemoteAddeEntry.Builder("a.c.com", "RTIMGS").validity(EntryValidity.VERIFIED).build();
 - 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate AddeAccountOptionalAddeAccountof the entry.private final StringHostname or IP of the resulting entry.private StringOptional alias for the entry.private StringOptional description of the entry.private AddeEntry.EntrySourceOptionalAddeEntry.EntrySourceof the entry.private AddeEntry.EntryStatusOptionalAddeEntry.EntryStatusof the entry.private AddeEntry.EntryTypeOptionalAddeEntry.EntryTypeof the entry.private AddeEntry.EntryValidityOptionalAddeEntry.EntryValidityof the entry.private final StringADDE group to use for the resulting entry.private booleanOptional flag for whether or not the entry is temporary.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionOptional "parameter" for an ADDE entry.Optionally sets the "alias" that can be used to refer to the resulting entry.build()Creates an entry based upon the values supplied to the other methods.Convenient way to generate a new, invalid entry.source(AddeEntry.EntrySource entrySource) Optional "parameter" for an ADDE entry.status(AddeEntry.EntryStatus entryStatus) Optional "parameter" for an ADDE entry.temporary(boolean temporary) Optionally control whether or not the resulting entry is "temporary".type(AddeEntry.EntryType entryType) Optional "parameter" for an ADDE entry.validity(AddeEntry.EntryValidity entryValidity) Optional "parameter" for an ADDE entry.
- 
Field Details- 
addressHostname or IP of the resulting entry.
- 
groupADDE group to use for the resulting entry.
- 
entryTypeOptionalAddeEntry.EntryTypeof the entry. Defaults toAddeEntry.EntryType.UNKNOWN.
- 
entryValidityOptionalAddeEntry.EntryValidityof the entry. Defaults toAddeEntry.EntryValidity.UNVERIFIED.
- 
entrySourceOptionalAddeEntry.EntrySourceof the entry. Defaults toAddeEntry.EntrySource.SYSTEM.
- 
entryStatusOptionalAddeEntry.EntryStatusof the entry. Defaults toAddeEntry.EntryStatus.ENABLED.
- 
accountOptionalAddeAccountof the entry. Defaults toAddeEntry.DEFAULT_ACCOUNT.
- 
descriptionOptional description of the entry. Defaults to "".
- 
temporaryOptional flag for whether or not the entry is temporary. Defaults tofalse.
- 
aliasOptional alias for the entry. Default to "".
 
- 
- 
Constructor Details- 
BuilderCreates a new "builder" for an ADDE entry. Note that the two parameters to this constructor are the only required parameters to create an ADDE entry.- Parameters:
- address- Address of the ADDE entry. Cannot be null.
- group- Group of the ADDE entry. Cannot be null.
- Throws:
- NullPointerException- if either- addressor- groupis- null.
 
 
- 
- 
Method Details- 
accountOptional "parameter" for an ADDE entry. Allows you to specify the accounting information. If this method is not called, the resulting ADDE entry will be built withAddeEntry.DEFAULT_ACCOUNT.- Parameters:
- username- Username of the ADDE account. Cannot be- null.
- project- Project number for the ADDE account. Cannot be- null.
- Returns:
- Current "builder" for an ADDE entry.
- See Also:
 
- 
typeOptional "parameter" for an ADDE entry. Allows you to set theRemoteAddeEntry.entryType. If this method is not called,entryTypewill default toAddeEntry.EntryType.UNKNOWN.- Parameters:
- entryType- ADDE entry "type".
- Returns:
- Current "builder" for an ADDE entry.
 
- 
validityOptional "parameter" for an ADDE entry. Allows you to set theRemoteAddeEntry.entryValidity. If this method is not called,entryValiditywill default toAddeEntry.EntryValidity.UNVERIFIED.- Parameters:
- entryValidity- ADDE entry "validity".
- Returns:
- Current "builder" for an ADDE entry.
 
- 
sourceOptional "parameter" for an ADDE entry. Allows you to set theRemoteAddeEntry.entrySource. If this method is not called,entrySourcewill default toAddeEntry.EntrySource.SYSTEM.- Parameters:
- entrySource- ADDE entry "source".
- Returns:
- Current "builder" for an ADDE entry.
 
- 
statusOptional "parameter" for an ADDE entry. Allows you to set theRemoteAddeEntry.entryStatus. If this method is not called,entryStatuswill default toAddeEntry.EntryStatus.ENABLED.- Parameters:
- entryStatus- ADDE entry "status".
- Returns:
- Current "builder" for an ADDE entry.
 
- 
invalidateConvenient way to generate a new, invalid entry.- Returns:
- Current "builder" for an ADDE entry.
 
- 
temporaryOptionally control whether or not the resulting entry is "temporary".- Parameters:
- temporary- Whether or not the entry is temporary.
- Returns:
- Current "builder" for an ADDE entry.
 
- 
aliasOptionally sets the "alias" that can be used to refer to the resulting entry.- Parameters:
- alias- Alias for the resulting entry.
- Returns:
- Current "builder" for an ADDE entry.
 
- 
buildCreates an entry based upon the values supplied to the other methods.- Returns:
- A newly created RemoteAddeEntry.
 
 
-