Annotation Interface TCPPort
@Documented
@Retention(RUNTIME)
@Target({METHOD,FIELD,PARAMETER,TYPE_USE})
@Constraint(validatedBy=Validator.class)
public @interface TCPPort
Validates that a number looks like a TCP port. Always accepts 
null.- Author:
- Donal Fellows
- See Also:
- 
Optional Element SummaryOptional Elements
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intThe maximum TCP port number.static final intThe minimum ordinary TCP port number.
- 
Field Details- 
MIN_TCP_PORTstatic final int MIN_TCP_PORTThe minimum ordinary TCP port number.- See Also:
 
- 
MAX_TCP_PORTstatic final int MAX_TCP_PORTThe maximum TCP port number.- See Also:
 
 
- 
- 
Element Details- 
anyboolean anyWhether to allow the "any" port. Note that this is not the same as allowing any other port; it's more that it isn't bound to a specific port.- Returns:
- Whether 0 is allowed.
 - Default:
- false
 
- 
systemboolean systemWhether to allow system ports.- Returns:
- Whether 1-1023 is allowed.
 - Default:
- false
 
- 
ephemeralboolean ephemeralWhether to allow ephemeral ports.- Returns:
- Whether 32768-65535 is allowed
 - Default:
- true
 
- 
messageString messageMessage on constraint violated.- Returns:
- Message
 - Default:
- "${validatedValue} is a bad TCP port"
 
 
-