|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.eurotech.ermes.ErmesComponent
public class ErmesComponent
| Constructor Summary | |
|---|---|
ErmesComponent()
|
|
| Method Summary | |
|---|---|
protected void |
activate(org.osgi.service.component.ComponentContext componentContext,
Map<String,Object> properties)
|
void |
createOutfilesLocation()
|
protected void |
deactivate(org.osgi.service.component.ComponentContext componentContext)
|
void |
doPublish()
|
void |
doPublish(String topic)
|
void |
doWrite()
|
void |
handleEvent(org.osgi.service.event.Event event)
|
void |
onConnectionEstablished()
Called when the CloudClient has successfully connected with the broker. |
void |
onConnectionLost()
Called when the client has lost its connection with the broker. |
void |
onControlMessageArrived(String deviceId,
String appTopic,
EsfPayload msg,
int qos,
boolean retain)
Called by the CloudClient when it receives a published control message from the broker. |
void |
onMessageArrived(String deviceId,
String appTopic,
EsfPayload msg,
int qos,
boolean retain)
Called by the client when it receives a published data message from the broker. |
void |
onMessageConfirmed(int messageId,
String appTopic)
Called by the CloudClient when a published message has been fully acknowledged by the broker, as appropriate for the quality of service. |
void |
onMessagePublished(int messageId,
String appTopic)
Called by the CloudClient when a message has been transfered from the publishing queue to the underlying DataTransportService for publishing on the wire. |
void |
setClockService(ClockService clockService)
|
void |
setCloudService(CloudService cloudService)
|
void |
setConfigurationService(ConfigurationService configurationService)
|
void |
setConnectionFactory(org.osgi.service.io.ConnectionFactory connectionFactory)
|
void |
setPositionService(PositionService positionService)
|
void |
setUsbService(UsbService usbService)
|
void |
unsetClockService(ClockService clockService)
|
void |
unsetCloudService(CloudService cloudService)
|
void |
unsetConfigurationService(ConfigurationService configurationService)
|
void |
unsetConnectionFactory(org.osgi.service.io.ConnectionFactory connectionFactory)
|
void |
unsetPositionService(PositionService positionService)
|
void |
unsetUsbService(UsbService usbService)
|
void |
updated(Map<String,Object> properties)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ErmesComponent()
| Method Detail |
|---|
public void setCloudService(CloudService cloudService)
public void unsetCloudService(CloudService cloudService)
public void setPositionService(PositionService positionService)
public void unsetPositionService(PositionService positionService)
public void setConnectionFactory(org.osgi.service.io.ConnectionFactory connectionFactory)
public void unsetConnectionFactory(org.osgi.service.io.ConnectionFactory connectionFactory)
public void setConfigurationService(ConfigurationService configurationService)
public void unsetConfigurationService(ConfigurationService configurationService)
public void setClockService(ClockService clockService)
public void unsetClockService(ClockService clockService)
public void setUsbService(UsbService usbService)
public void unsetUsbService(UsbService usbService)
protected void activate(org.osgi.service.component.ComponentContext componentContext,
Map<String,Object> properties)
protected void deactivate(org.osgi.service.component.ComponentContext componentContext)
public void updated(Map<String,Object> properties)
public void doPublish()
public void doPublish(String topic)
public void onControlMessageArrived(String deviceId,
String appTopic,
EsfPayload msg,
int qos,
boolean retain)
CloudClientListener
onControlMessageArrived in interface CloudClientListenerdeviceId - The deviceId this message was addressed to.appTopic - The appTopic the message arrived on.msg - The EsfPayload that arrived.qos - The Quality of Service that the message was received on.retain - Whether the message was retained by the broker.
public void onMessageArrived(String deviceId,
String appTopic,
EsfPayload msg,
int qos,
boolean retain)
CloudClientListener
onMessageArrived in interface CloudClientListenerdeviceId - The asset ID of the semanticTopic prefix the message arrived on.appTopic - The appTopic the message arrived on.msg - The EsfPayload that arrived.qos - The Quality of Service that the message was received on.retain - Whether the message was retained by the broker.public void onConnectionLost()
CloudClientListenerDataService
configuration, the client will attempt to reconnect and call the CloudClientListener.onConnectionEstablished()
method upon a successful reconnect. This is only a notification, the callback handler should
not attempt to handle the reconnect.
CloudClientListener.onConnectionEstablished()
callback method to restore the subscriptions it needs after a connection loss.
onConnectionLost in interface CloudClientListenerpublic void onConnectionEstablished()
CloudClientListenerCloudClientListener.onConnectionEstablished()
callback method to restore the subscriptions it needs after a connection loss.
onConnectionEstablished in interface CloudClientListener
public void onMessagePublished(int messageId,
String appTopic)
CloudClientListenerDataTransportService for publishing on the wire.
onMessagePublished in interface CloudClientListener
public void onMessageConfirmed(int messageId,
String appTopic)
CloudClientListener
onMessageConfirmed in interface CloudClientListenermessageId - The message id of the published messagepublic void handleEvent(org.osgi.service.event.Event event)
handleEvent in interface org.osgi.service.event.EventHandlerpublic void createOutfilesLocation()
public void doWrite()
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||