Package org.kie.remote.impl
Class AbstractRemoteEntryPoint
- java.lang.Object
-
- org.kie.remote.impl.AbstractRemoteEntryPoint
-
- All Implemented Interfaces:
RemoteWorkingMemory
- Direct Known Subclasses:
RemoteEntryPointImpl,RemoteStreamingEntryPointImpl
public abstract class AbstractRemoteEntryPoint extends Object implements RemoteWorkingMemory
-
-
Field Summary
Fields Modifier and Type Field Description protected StringentryPointprotected Sendersenderprotected TopicsConfigtopicsConfig
-
Constructor Summary
Constructors Constructor Description AbstractRemoteEntryPoint(Sender sender, String entryPoint, TopicsConfig topicsConfig)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected <T> CompletableFuture<T>executeCommand(AbstractCommand command)StringgetEntryPointId()CompletableFuture<Long>getFactCount()<T> CompletableFuture<T>getObject(RemoteFactHandle<T> remoteFactHandle)CompletableFuture<Collection>getObjects()This class is not a general-purpose Collection implementation!<T> CompletableFuture<Collection<T>>getObjects(Class<T> clazztype)CompletableFuture<Collection>getObjects(String namedQuery, String objectName, Serializable... params)protected abstract Map<String,CompletableFuture<Object>>getRequestsStore()
-
-
-
Field Detail
-
sender
protected final Sender sender
-
entryPoint
protected final String entryPoint
-
topicsConfig
protected TopicsConfig topicsConfig
-
-
Constructor Detail
-
AbstractRemoteEntryPoint
public AbstractRemoteEntryPoint(Sender sender, String entryPoint, TopicsConfig topicsConfig)
-
-
Method Detail
-
getEntryPointId
public String getEntryPointId()
- Specified by:
getEntryPointIdin interfaceRemoteWorkingMemory- Returns:
- the String Id of this entry point
-
getObjects
public CompletableFuture<Collection> getObjects()
Description copied from interface:RemoteWorkingMemoryThis class is not a general-purpose Collection implementation! While this class implements the Collection interface, it intentionally violates Collection general contract, which mandates the use of the equals method when comparing objects.
Instead the approach used when comparing objects with the contains(Object) method is dependent on the WorkingMemory configuration, where it can be configured for Identity or for Equality.
- Specified by:
getObjectsin interfaceRemoteWorkingMemory- Returns:
- CompletableFuture of Collection extends Object> to read all facts from the current session as a Collection.
-
getObjects
public <T> CompletableFuture<Collection<T>> getObjects(Class<T> clazztype)
- Specified by:
getObjectsin interfaceRemoteWorkingMemory- Parameters:
clazztype- the filter to be applied to the returned collection of facts.- Returns:
- CompletableFuture of Collection extends Object> to read all facts from the current session that are accepted by the given
ObjectFilter.
-
getObjects
public CompletableFuture<Collection> getObjects(String namedQuery, String objectName, Serializable... params)
- Specified by:
getObjectsin interfaceRemoteWorkingMemory- Parameters:
namedQuery- the filter to be applied to the returned collection of facts.objectName- name of the object to read from the QueryResultsRowparams- for the rule- Returns:
- CompletableFuture of Collection extends Object> to read all facts from the current session that are accepted by the given
ObjectFilter.
-
getFactCount
public CompletableFuture<Long> getFactCount()
- Specified by:
getFactCountin interfaceRemoteWorkingMemory- Returns:
- a completable future with Long to read the total number of facts currently in this entry point
-
getObject
public <T> CompletableFuture<T> getObject(RemoteFactHandle<T> remoteFactHandle)
- Specified by:
getObjectin interfaceRemoteWorkingMemory- Returns:
- CompletableFuture of extends Object> to read related RemoteFactHandle.
-
executeCommand
protected <T> CompletableFuture<T> executeCommand(AbstractCommand command)
-
getRequestsStore
protected abstract Map<String,CompletableFuture<Object>> getRequestsStore()
-
-