public final class Cdn extends Object
configure() method or you can take a look at predefined instances in CdnFactory.| Modifier and Type | Method and Description |
|---|---|
static CdnSettings |
configure()
Build custom CDN instance.
|
CdnSettings |
getSettings()
Get settings used by this CDN instance
|
Configuration |
load(@NotNull Source source)
Load configuration as default
Configuration structure. |
<T> T |
load(@NotNull Source source,
@NotNull Class<T> configurationClass)
Load configuration from the given source and map default
Configuration structure into the given configuration class. |
<T> T |
load(@NotNull Source source,
T instance)
Load configuration from the given source and map default
Configuration structure into the given configuration class. |
String |
render(@NotNull Element<?> element)
Convert the given configuration instance to the output string
|
void |
render(@NotNull Element<?> element,
@NotNull File output)
Convert the given instance using
render(net.dzikoysk.cdn.model.Element) method and save the output in the given file using UTF-8 charset. |
void |
render(@NotNull Element<?> element,
@NotNull Path output)
Convert the given instance using
render(net.dzikoysk.cdn.model.Element) method and save the output in the given file using UTF-8 charset. |
String |
render(@NotNull Object entity)
Convert the given instance to the output string
|
void |
render(@NotNull Object entity,
@NotNull File output)
Convert the given instance using
render(Object) method and save the output in the given file using UTF-8 charset. |
void |
render(@NotNull Object entity,
@NotNull Path output)
Convert the given instance using
render(Object) method and save the output in the given file using UTF-8 charset. |
public static CdnSettings configure()
CdnFactory class.CdnFactorypublic Configuration load(@NotNull @NotNull Source source)
Configuration structure.source - the source to loadSourcepublic <T> T load(@NotNull
@NotNull Source source,
@NotNull
@NotNull Class<T> configurationClass)
throws Exception
Configuration structure into the given configuration class.T - the expected typesource - the source to loadconfigurationClass - the class to useConfiguration structureException - in case of any deserialization errorpublic <T> T load(@NotNull
@NotNull Source source,
@NotNull
T instance)
throws Exception
Configuration structure into the given configuration class.T - the expected typesource - the source to loadinstance - the instance to useConfiguration structureException - in case of any deserialization errorpublic String render(@NotNull @NotNull Object entity)
entity - the instance to convertpublic void render(@NotNull
@NotNull Object entity,
@NotNull
@NotNull File output)
throws IOException
render(Object) method and save the output in the given file using UTF-8 charset.entity - the instance to convertoutput - the output fileIOExceptionpublic void render(@NotNull
@NotNull Object entity,
@NotNull
@NotNull Path output)
throws IOException
render(Object) method and save the output in the given file using UTF-8 charset.entity - the instance to convertoutput - the output fileIOExceptionpublic String render(@NotNull @NotNull Element<?> element)
element - the element to convertpublic void render(@NotNull
@NotNull Element<?> element,
@NotNull
@NotNull File output)
throws IOException
render(net.dzikoysk.cdn.model.Element) method and save the output in the given file using UTF-8 charset.element - the element to convertoutput - the output fileIOExceptionpublic void render(@NotNull
@NotNull Element<?> element,
@NotNull
@NotNull Path output)
throws IOException
render(net.dzikoysk.cdn.model.Element) method and save the output in the given file using UTF-8 charset.element - the element to convertoutput - the output fileIOExceptionpublic CdnSettings getSettings()
Copyright © 2021. All rights reserved.