com.envision.energy.eos.sdk.DataServiceImpl Maven / Gradle / Ivy
package com.envision.energy.eos.sdk;
import java.util.Collection;
import com.envision.energy.eos.exception.SubscribeException;
class DataServiceImpl implements IDataService{
@Override
public void subscribe(IDataHandler handler)
throws NullPointerException, SubscribeException {
ProxyManager.INSTANCE.getDataProxy().subscribe(handler);
}
@Override
public void subscribe(IDataHandler handler, Collection points)
throws NullPointerException, SubscribeException {
ProxyManager.INSTANCE.getDataProxy().subscribe(handler, points);
}
@Override
public void subscribe(IDataHandler handler, Collection pointIds, String... domainIds)
throws NullPointerException, SubscribeException{
ProxyManager.INSTANCE.getDataProxy().subscribe(handler, pointIds, domainIds);
}
@Override
synchronized public void unsubscribe(IDataHandler handler) throws NullPointerException, SubscribeException {
ProxyManager.INSTANCE.getDataProxy().unsubscribe(handler);
}
@Override
public void unsubscribe(IDataHandler handler,
Collection pointIds, String domainId)
throws NullPointerException, SubscribeException {
ProxyManager.INSTANCE.getDataProxy().unsubscribe(handler, pointIds, domainId);
}
// @Override
// public void unsubscribeAll() {
// // TODO Auto-generated method stub
//
// }
@Override
public void subscribe(IPointCalHandler handler,
Collection pointIds, String... domainIds)
throws NullPointerException, SubscribeException {
ProxyManager.INSTANCE.getDataProxy().subscribe(handler, pointIds, domainIds);
}
@Override
public void shutdown() {
ProxyManager.INSTANCE.getDataProxy().shutdown();
}
}