|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Target(value={FIELD,METHOD})
@Retention(value=RUNTIME)
public @interface IsURLRequires that the annotated element be a URL. This annotation can optionally attempt to resolve the host and even fetch the URL in order to check the validity of the value.
| Optional Element Summary | |
|---|---|
boolean |
contactHost
Specifies whether to contact the host. |
java.lang.String |
errorCode
Error code to use if validation fails. |
boolean |
fetchURL
Specifies whether to actually attempt to fetch the URL (only for the http and https protocols). |
java.lang.String |
message
Literal message to use if validation fails. |
java.lang.String |
messageKey
Message key to use if validation fails. |
boolean |
resolveHost
Specifies whether to check the host by performing a DNS lookup |
int |
timeout
Specifies the maximum amount of milliseconds to wait if any of the resolveHost(), contactHost() or
fetchURL() attributes are set to true |
java.lang.String[] |
validProtocols
Set of valid protocols. |
public abstract java.lang.String[] validProtocols
public abstract boolean resolveHost
public abstract boolean contactHost
resolveHost() is ignored and assumed to be true, too.
public abstract boolean fetchURL
resolveHost() and contactHost() are ignored and assumed to be true.
public abstract int timeout
resolveHost(), contactHost() or
fetchURL() attributes are set to true
public abstract java.lang.String message
public abstract java.lang.String errorCode
public abstract java.lang.String messageKey
Messages.NUMERIC
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||