Constructor and Description |
---|
CepApiImpl(PlatformParameters platformParameters,
RestConnector restConnector,
int pageSize) |
Modifier and Type | Method and Description |
---|---|
CepModuleRepresentation |
create(InputStream content)
Creates an cep module in the platform.
|
CepModuleRepresentation |
create(String content)
Creates an cep module in the platform.
|
void |
delete(CepModuleRepresentation module)
Deletes the cep module from the platform.
|
void |
delete(String id)
Deletes the cep module from the platform.
|
CepModuleRepresentation |
get(String id)
Gets an cep module by id
|
CepCustomNotificationsSubscriber |
getCustomNotificationsSubscriber()
Gets the notifications subscriber, which allows to receive notifications sent from cep.
|
CepModuleCollection |
getModules()
Gets all cep modules from the platform
|
String |
getText(String id)
Gets a cep module text by id
|
<T> T |
health(Class<T> clazz)
Checks state of cep microservice.
|
CepModuleRepresentation |
update(CepModuleRepresentation module) |
CepModuleRepresentation |
update(String id,
InputStream content)
Updates an cep module in the platform.
|
CepModuleRepresentation |
update(String id,
String content) |
public CepApiImpl(PlatformParameters platformParameters, RestConnector restConnector, int pageSize)
public CepCustomNotificationsSubscriber getCustomNotificationsSubscriber()
CepApi
Example:
Subscriber<String, Object> subscriber = deviceControlApi.getNotificationsSubscriber();
subscriber.subscribe( "channelId" , new SubscriptionListener<String, Object>() {
@Override
public void onNotification(Subscription<GId> subscription, Object operation) {
//process notification from cep module
}
@Override
public void onError(Subscription<GId> subscription, Throwable ex) {
// handle subscribe error
}
});
getCustomNotificationsSubscriber
in interface CepApi
public CepModuleRepresentation create(InputStream content)
CepApi
public CepModuleRepresentation create(String content)
CepApi
public CepModuleRepresentation update(String id, InputStream content)
CepApi
public CepModuleRepresentation update(String id, String content)
public CepModuleRepresentation update(CepModuleRepresentation module)
public void delete(CepModuleRepresentation module)
CepApi
public void delete(String id)
CepApi
public <T> T health(Class<T> clazz)
CepApi
public CepModuleRepresentation get(String id)
CepApi
public String getText(String id)
CepApi
public CepModuleCollection getModules()
CepApi
getModules
in interface CepApi
Copyright © 2020 (C) Cumulocity GmbH. All rights reserved.