com.sitewhere.grpc.client.event.DeviceEventManagementGrpcChannel Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sitewhere-grpc-client Show documentation
Show all versions of sitewhere-grpc-client Show documentation
SiteWhere gRPC Client Components
/*
* Copyright (c) SiteWhere, LLC. All rights reserved. http://www.sitewhere.com
*
* The software in this package is published under the terms of the CPAL v1.0
* license, a copy of which has been included with this distribution in the
* LICENSE.txt file.
*/
package com.sitewhere.grpc.client.event;
import com.sitewhere.grpc.client.MultitenantGrpcChannel;
import com.sitewhere.grpc.service.DeviceEventManagementGrpc;
import com.sitewhere.grpc.service.DeviceEventManagementGrpc.DeviceEventManagementBlockingStub;
import com.sitewhere.grpc.service.DeviceEventManagementGrpc.DeviceEventManagementStub;
import com.sitewhere.spi.microservice.IFunctionIdentifier;
import com.sitewhere.spi.microservice.grpc.IGrpcServiceIdentifier;
import com.sitewhere.spi.microservice.instance.IInstanceSettings;
/**
* Channel that allows for communication with a remote device event management
* GRPC server.
*/
public class DeviceEventManagementGrpcChannel
extends MultitenantGrpcChannel {
public DeviceEventManagementGrpcChannel(IInstanceSettings settings, IFunctionIdentifier identifier,
IGrpcServiceIdentifier grpcServiceIdentifier, int port) {
super(settings, identifier, grpcServiceIdentifier, port);
}
/*
* (non-Javadoc)
*
* @see com.sitewhere.grpc.model.client.GrpcChannel#createBlockingStub()
*/
@Override
public DeviceEventManagementBlockingStub createBlockingStub() {
return DeviceEventManagementGrpc.newBlockingStub(getChannel());
}
/*
* (non-Javadoc)
*
* @see com.sitewhere.grpc.model.client.GrpcChannel#createAsyncStub()
*/
@Override
public DeviceEventManagementStub createAsyncStub() {
return DeviceEventManagementGrpc.newStub(getChannel());
}
}