Commit 0501e9d4b4b4e3a3ec15bf1241ac50550481fff8
1 parent
4e39ed53
Was modified addLocalWsSubscription(...)
Showing
1 changed file
with
2 additions
and
12 deletions
... | ... | @@ -132,14 +132,8 @@ public class DefaultTelemetrySubscriptionService implements TelemetrySubscriptio |
132 | 132 | |
133 | 133 | @Override |
134 | 134 | public void addLocalWsSubscription(String sessionId, EntityId entityId, SubscriptionState sub) { |
135 | - String familyName = ModelConstants.DEVICE_FAMILY_NAME; | |
136 | - | |
137 | - //To do | |
138 | - if (entityId.getEntityType().equals(EntityType.ENTITY_VIEW)) { | |
139 | - familyName = ModelConstants.ENTITY_VIEW_FAMILY_NAME; | |
140 | - //EntityView entityView = entityViewService.findEntityViewById((EntityViewId) entityId) | |
141 | - } | |
142 | - | |
135 | + String familyName = entityId.getEntityType().equals(EntityType.ENTITY_VIEW) | |
136 | + ? ModelConstants.ENTITY_VIEW_FAMILY_NAME : ModelConstants.DEVICE_FAMILY_NAME; | |
143 | 137 | Optional<ServerAddress> server = routingService.resolveById(entityId); |
144 | 138 | Subscription subscription; |
145 | 139 | if (server.isPresent()) { |
... | ... | @@ -151,10 +145,6 @@ public class DefaultTelemetrySubscriptionService implements TelemetrySubscriptio |
151 | 145 | log.trace("[{}] Registering local subscription [{}] for " + familyName + " [{}]", sessionId, sub.getSubscriptionId(), entityId); |
152 | 146 | subscription = new Subscription(sub, true); |
153 | 147 | } |
154 | - | |
155 | - /*if (entityId.getEntityType().equals(EntityType.ENTITY_VIEW)) { | |
156 | - registerSubscription(sessionId, entityId, subscription); | |
157 | - }*/ | |
158 | 148 | registerSubscription(sessionId, entityId, subscription); |
159 | 149 | } |
160 | 150 | ... | ... |