11/*
2- Copyright (c) 2012, 2020, Anatole Tresch , Werner Keil and others by the @author tag.
2+ Copyright (c) 2012, 2024 , Werner Keil and others by the @author tag.
33
44 Licensed under the Apache License, Version 2.0 (the "License"); you may not
55 use this file except in compliance with the License. You may obtain a copy of
3535 * JSR's API.
3636 *
3737 * @author Anatole Tresch
38+ * @author Werner Keil
3839 */
3940public interface LoaderService {
4041
@@ -77,7 +78,7 @@ enum UpdatePolicy {
7778 * @see #resetData(String)
7879 * @see #loadData(String)
7980 */
80- interface LoaderListener { // TODO rename to Listener
81+ interface Listener {
8182 /**
8283 * Callback called from the {@link LoaderService}, when new data was
8384 * read for a given data item.
@@ -98,7 +99,7 @@ interface LoaderListener { // TODO rename to Listener
9899 *resourceLocations The remote resource locations, not {@code null}.
99100 *backupResource The backup resource location in the classpath, not
100101 * {@code null}.
101- *loaderListener An (optional) LoaderListener to be registered.
102+ *loaderListener An (optional) Listener to be registered.
102103 */
103104 void registerData (LoadDataInformation loadDataInformation );
104105
@@ -112,19 +113,19 @@ interface LoaderListener { // TODO rename to Listener
112113 * resourceLocations The remote resource locations, not {@code null}.
113114 * backupResource The backup resource location in the classpath, not
114115 * {@code null}.
115- * loaderListener An (optional) LoaderListener to be registered.
116+ * loaderListener An (optional) Listener to be registered.
116117 */
117118 void registerAndLoadData (LoadDataInformation loadDataInformation );
118119
119120 @ Deprecated
120121 void registerAndLoadData (String resourceId , UpdatePolicy updatePolicy ,
121- Map <String , String > properties , LoaderListener loaderListener ,
122+ Map <String , String > properties , Listener listener ,
122123 URI backupResource ,
123124 URI ... resourceLocations );
124125
125126 @ Deprecated
126127 void registerData (String resourceId , UpdatePolicy updatePolicy ,
127- Map <String , String > properties , LoaderListener loaderListener ,
128+ Map <String , String > properties , Listener listener ,
128129 URI backupResource ,
129130 URI ... resourceLocations );
130131
@@ -147,26 +148,26 @@ void registerData(String resourceId, UpdatePolicy updatePolicy,
147148 Map <String , String > getUpdateConfiguration (String resourceId );
148149
149150 /**
150- * Add a {@link LoaderListener } callback that is informed when a data
151+ * Add a {@link Listener } callback that is informed when a data
151152 * resource was update from remote, or resetToFallback. Passing an empty String or
152153 * {@code null} sa {@code dataId} allows to register a listener for all data
153154 * resources registered. {@link #loadData(String)}
154155 * {@link #resetData(String)}
155156 *
156157 * @param resourceIds The unique identifiers of the resource, not {@code null}.
157158 * @param l The listener to be added
158- * @see #removeLoaderListener(LoaderListener , String...)
159+ * @see #removeLoaderListener(Listener , String...)
159160 */
160- void addLoaderListener (LoaderListener l , String ... resourceIds );
161+ void addLoaderListener (Listener l , String ... resourceIds );
161162
162163 /**
163- * Remove a registered {@link LoaderListener } callback.
164+ * Remove a registered {@link Listener } callback.
164165 *
165166 * @param resourceIds The unique identifier of the resource, not {@code null}.
166167 * @param l The listener to be removed
167- * @see #addLoaderListener(LoaderListener , String...)
168+ * @see #addLoaderListener(Listener , String...)
168169 */
169- void removeLoaderListener (LoaderListener l , String ... resourceIds );
170+ void removeLoaderListener (Listener l , String ... resourceIds );
170171
171172 /**
172173 * Allows to check if a data resource with the given dataId is registered.
0 commit comments