Interface ADEPT2CallbackExport
-
public interface ADEPT2CallbackExportThis module of the communication service is responsible for the export of callback objects, i. e. to enable callback objects to be called remotely.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description URIexportCallback(Class<?> callbackInterface, Object callbackObject)Publishes the given callback object to be ready for receiving callback requests.URIexportCallback(Class<?> callbackInterface, Object callbackObject, boolean serverSideCallback)Deprecated, for removal: This API element is subject to removal in a future version.UseexportCallback(Class, Object)with aServerSideProxyinstead.Pair<Class<?>,Object>getCallback(URI callbackUri)Returns the exported remote interface and the callback object identified by the designated callback URI.URIrevokeCallbackExport(Object callbackObject)Revokes the export of the passed callback object if it is the last revoke.
-
-
-
Method Detail
-
exportCallback
URI exportCallback(Class<?> callbackInterface, Object callbackObject)
Publishes the given callback object to be ready for receiving callback requests. This is re-entrant, that is an object may be exported several times and needs to be revoked for each export.- Parameters:
callbackInterface- The type of the callback.callbackObject- The callbackObject waiting for callbacks. If this is aServerSideProxyit will be automatically closed after its alive time has elapsed (and it has not been closed explicitly before).- Returns:
- The URI the callback object is registered.
-
exportCallback
@Deprecated(since="15.0.0", forRemoval=true) URI exportCallback(Class<?> callbackInterface, Object callbackObject, boolean serverSideCallback)
Deprecated, for removal: This API element is subject to removal in a future version.UseexportCallback(Class, Object)with aServerSideProxyinstead.Publishes the given callback object to be ready for receiving callback requests. This is re-entrant, that is an object may be exported several times and needs to be revoked for each export.- Parameters:
callbackInterface- The type of the callback.callbackObject- The callbackObject waiting for callbacks. If this is aServerSideProxyit will be automatically closed after its alive time has elapsed (and it has not been closed explicitly before).serverSideCallback- Whether the designated object is a callback on server side. These objects are usually only referenced by the callback export and thus should not be referenced by a weak reference only.- Returns:
- The URI the callback object is registered.
-
getCallback
Pair<Class<?>,Object> getCallback(URI callbackUri)
Returns the exported remote interface and the callback object identified by the designated callback URI.- Parameters:
callbackUri- The identifier of the requested callback object.- Returns:
- The remote interface and the callback object associated with the given callbackURI. If
no callback object with the designated name is known,
nullwill be returned. - Throws:
IllegalArgumentException- If the designated URI does not refer to a callback object exported via this communication service, anIllegalArgumentExceptionwill be thrown.
-
revokeCallbackExport
URI revokeCallbackExport(Object callbackObject)
Revokes the export of the passed callback object if it is the last revoke.- Parameters:
callbackObject- The callback object whose export should be revoked.- Returns:
- Returns the URI the designated callback object was registered till now.
- Throws:
IllegalArgumentException- If the designated object is not registered, aIllegalArgumentExceptionwill be thrown.NullArgumentException- If null is provided, aNullArgumentExceptionwill be thrown.
-
-