Commit cf5adc06 authored by Karen McElroy's avatar Karen McElroy

Java IVR sample - Initial commit.

parents
File added
File added
#!/bin/sh
java -jar IVR_Java-all.jar
# IVR Java Sample #
This is an ivr sample client.
## Configuration ##
The sample comes with a conf.yaml file located in the current directory
(IVR_Java). This config file must be modified based on your configuration.
Your certifcate must also be located in this directory.
Here is the structure of the config file:
**ip**: ip adress and port of your X2 server
**certificate**: name of your certificate file if it is located in the
ivr_client directory. If it is elsewhere, then the full path to your
certificate file.
**username**: username to use to connect to the X2 server.
**password**: password to use to connect to the X2 server.
the username and password must be configured on the X2 server.
**applicationName**: application name configured on the X2 server.
**dids**: The DIDs that will be used for this application. THose DIDs must be
added to the X2 server.
**connectUsingServername**: if set to true, the server name and port will be used
to establish a connection to the X2 server. If set to false the IP address
and port will be used to establish a connection. This is because if
attempting to connect with the IP address and it is the serverName in the
certificate file, then connection may fail.
## Building the sample ##
If making changes to the sample code, the sample can be built by running the
following command from the current directory:
./gradlew build
The resulting .jar file (IVR_Java-all.jar) will be placed in the current
directory.
## Running the sample ##
The sample can be run in one of two ways:
1. From the current directory (IVR_Java):
./IVR.sh
2. From the current directory (IVR_Java):
java -jar IVR_Java-all.jar
plugins {
id 'application'
id 'com.google.protobuf' version '0.8.15'
id 'com.github.johnrengelman.shadow' version '6.0.0'
id 'java'
}
repositories {
mavenCentral()
}
dependencies {
// https://mvnrepository.com/artifact/com.google.protobuf/protobuf-java/3.15.8
implementation group: 'com.google.protobuf', name: 'protobuf-java', version: '3.15.8'
// https://mvnrepository.com/artifact/io.grpc/grpc-all/1.37.0
implementation group: 'io.grpc', name: 'grpc-all', version: '1.37.0'
// https://mvnrepository.com/artifact/javax.annotation/javax.annotation-api/1.3.2
implementation group: 'javax.annotation', name: 'javax.annotation-api', version: '1.3.2'
// https://mvnrepository.com/artifact/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml
implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: '2.12.3'
// https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.12.3'
}
shadowJar {
manifest {
attributes 'Main-Class': 'com.client.Main'
}
mainClassName = 'com.client.Main'
mergeServiceFiles()
destinationDirectory.set(file("./"))
}
protobuf {
generatedFilesBaseDir = 'src'
// configure the protoc executable
protoc {
// Download from repositories
artifact = 'com.google.protobuf:protoc:3.15.8'
}
plugins {
grpc {
artifact = 'io.grpc:protoc-gen-grpc-java:1.37.0'
}
}
generateProtoTasks {
all()*.plugins {
grpc {}
}
}
}
ip: 51.79.66.231:8888
certificate: ./fullchain.pem
serverName: cloudhmp.pikatech.com
username: karen
password: passme
applicationName: Switch
dids: [6132801060]
connectUsingServername: true
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=`expr $i + 1`
done
case $i in
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
exec "$JAVACMD" "$@"
package com.gpnetd;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.37.0)",
comments = "Source: account.proto")
public final class AccountGrpc {
private AccountGrpc() {}
public static final String SERVICE_NAME = "gpnetd.Account";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor<com.gpnetd.AccountProto.AccountListDIDsReq,
com.gpnetd.AccountProto.AccountListDIDsResp> getListDIDsMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ListDIDs",
requestType = com.gpnetd.AccountProto.AccountListDIDsReq.class,
responseType = com.gpnetd.AccountProto.AccountListDIDsResp.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<com.gpnetd.AccountProto.AccountListDIDsReq,
com.gpnetd.AccountProto.AccountListDIDsResp> getListDIDsMethod() {
io.grpc.MethodDescriptor<com.gpnetd.AccountProto.AccountListDIDsReq, com.gpnetd.AccountProto.AccountListDIDsResp> getListDIDsMethod;
if ((getListDIDsMethod = AccountGrpc.getListDIDsMethod) == null) {
synchronized (AccountGrpc.class) {
if ((getListDIDsMethod = AccountGrpc.getListDIDsMethod) == null) {
AccountGrpc.getListDIDsMethod = getListDIDsMethod =
io.grpc.MethodDescriptor.<com.gpnetd.AccountProto.AccountListDIDsReq, com.gpnetd.AccountProto.AccountListDIDsResp>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListDIDs"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.gpnetd.AccountProto.AccountListDIDsReq.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.gpnetd.AccountProto.AccountListDIDsResp.getDefaultInstance()))
.setSchemaDescriptor(new AccountMethodDescriptorSupplier("ListDIDs"))
.build();
}
}
}
return getListDIDsMethod;
}
private static volatile io.grpc.MethodDescriptor<com.gpnetd.AccountProto.ApplicationAssignDIDReq,
com.gpnetd.CommonProto.SuccessResp> getApplicationAssignDIDIdMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ApplicationAssignDIDId",
requestType = com.gpnetd.AccountProto.ApplicationAssignDIDReq.class,
responseType = com.gpnetd.CommonProto.SuccessResp.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<com.gpnetd.AccountProto.ApplicationAssignDIDReq,
com.gpnetd.CommonProto.SuccessResp> getApplicationAssignDIDIdMethod() {
io.grpc.MethodDescriptor<com.gpnetd.AccountProto.ApplicationAssignDIDReq, com.gpnetd.CommonProto.SuccessResp> getApplicationAssignDIDIdMethod;
if ((getApplicationAssignDIDIdMethod = AccountGrpc.getApplicationAssignDIDIdMethod) == null) {
synchronized (AccountGrpc.class) {
if ((getApplicationAssignDIDIdMethod = AccountGrpc.getApplicationAssignDIDIdMethod) == null) {
AccountGrpc.getApplicationAssignDIDIdMethod = getApplicationAssignDIDIdMethod =
io.grpc.MethodDescriptor.<com.gpnetd.AccountProto.ApplicationAssignDIDReq, com.gpnetd.CommonProto.SuccessResp>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "ApplicationAssignDIDId"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.gpnetd.AccountProto.ApplicationAssignDIDReq.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.gpnetd.CommonProto.SuccessResp.getDefaultInstance()))
.setSchemaDescriptor(new AccountMethodDescriptorSupplier("ApplicationAssignDIDId"))
.build();
}
}
}
return getApplicationAssignDIDIdMethod;
}
private static volatile io.grpc.MethodDescriptor<com.gpnetd.AccountProto.ApplicationUnassignDIDReq,
com.gpnetd.CommonProto.SuccessResp> getApplicationUnassignDIDIdMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ApplicationUnassignDIDId",
requestType = com.gpnetd.AccountProto.ApplicationUnassignDIDReq.class,
responseType = com.gpnetd.CommonProto.SuccessResp.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<com.gpnetd.AccountProto.ApplicationUnassignDIDReq,
com.gpnetd.CommonProto.SuccessResp> getApplicationUnassignDIDIdMethod() {
io.grpc.MethodDescriptor<com.gpnetd.AccountProto.ApplicationUnassignDIDReq, com.gpnetd.CommonProto.SuccessResp> getApplicationUnassignDIDIdMethod;
if ((getApplicationUnassignDIDIdMethod = AccountGrpc.getApplicationUnassignDIDIdMethod) == null) {
synchronized (AccountGrpc.class) {
if ((getApplicationUnassignDIDIdMethod = AccountGrpc.getApplicationUnassignDIDIdMethod) == null) {
AccountGrpc.getApplicationUnassignDIDIdMethod = getApplicationUnassignDIDIdMethod =
io.grpc.MethodDescriptor.<com.gpnetd.AccountProto.ApplicationUnassignDIDReq, com.gpnetd.CommonProto.SuccessResp>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "ApplicationUnassignDIDId"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.gpnetd.AccountProto.ApplicationUnassignDIDReq.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.gpnetd.CommonProto.SuccessResp.getDefaultInstance()))
.setSchemaDescriptor(new AccountMethodDescriptorSupplier("ApplicationUnassignDIDId"))
.build();
}
}
}
return getApplicationUnassignDIDIdMethod;
}
private static volatile io.grpc.MethodDescriptor<com.gpnetd.AccountProto.AccountListApplicationsReq,
com.gpnetd.AccountProto.AccountListApplicationsResp> getListApplicationsMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ListApplications",
requestType = com.gpnetd.AccountProto.AccountListApplicationsReq.class,
responseType = com.gpnetd.AccountProto.AccountListApplicationsResp.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<com.gpnetd.AccountProto.AccountListApplicationsReq,
com.gpnetd.AccountProto.AccountListApplicationsResp> getListApplicationsMethod() {
io.grpc.MethodDescriptor<com.gpnetd.AccountProto.AccountListApplicationsReq, com.gpnetd.AccountProto.AccountListApplicationsResp> getListApplicationsMethod;
if ((getListApplicationsMethod = AccountGrpc.getListApplicationsMethod) == null) {
synchronized (AccountGrpc.class) {
if ((getListApplicationsMethod = AccountGrpc.getListApplicationsMethod) == null) {
AccountGrpc.getListApplicationsMethod = getListApplicationsMethod =
io.grpc.MethodDescriptor.<com.gpnetd.AccountProto.AccountListApplicationsReq, com.gpnetd.AccountProto.AccountListApplicationsResp>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListApplications"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.gpnetd.AccountProto.AccountListApplicationsReq.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.gpnetd.AccountProto.AccountListApplicationsResp.getDefaultInstance()))
.setSchemaDescriptor(new AccountMethodDescriptorSupplier("ListApplications"))
.build();
}
}
}
return getListApplicationsMethod;
}
private static volatile io.grpc.MethodDescriptor<com.gpnetd.AccountProto.AccountCreateApplicationReq,
com.gpnetd.AccountProto.AccountCreateApplicationResp> getCreateApplicationMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "CreateApplication",
requestType = com.gpnetd.AccountProto.AccountCreateApplicationReq.class,
responseType = com.gpnetd.AccountProto.AccountCreateApplicationResp.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<com.gpnetd.AccountProto.AccountCreateApplicationReq,
com.gpnetd.AccountProto.AccountCreateApplicationResp> getCreateApplicationMethod() {
io.grpc.MethodDescriptor<com.gpnetd.AccountProto.AccountCreateApplicationReq, com.gpnetd.AccountProto.AccountCreateApplicationResp> getCreateApplicationMethod;
if ((getCreateApplicationMethod = AccountGrpc.getCreateApplicationMethod) == null) {
synchronized (AccountGrpc.class) {
if ((getCreateApplicationMethod = AccountGrpc.getCreateApplicationMethod) == null) {
AccountGrpc.getCreateApplicationMethod = getCreateApplicationMethod =
io.grpc.MethodDescriptor.<com.gpnetd.AccountProto.AccountCreateApplicationReq, com.gpnetd.AccountProto.AccountCreateApplicationResp>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateApplication"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.gpnetd.AccountProto.AccountCreateApplicationReq.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.gpnetd.AccountProto.AccountCreateApplicationResp.getDefaultInstance()))
.setSchemaDescriptor(new AccountMethodDescriptorSupplier("CreateApplication"))
.build();
}
}
}
return getCreateApplicationMethod;
}
private static volatile io.grpc.MethodDescriptor<com.gpnetd.AccountProto.AccountEditApplicationReq,
com.gpnetd.CommonProto.SuccessResp> getEditApplicationMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "EditApplication",
requestType = com.gpnetd.AccountProto.AccountEditApplicationReq.class,
responseType = com.gpnetd.CommonProto.SuccessResp.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<com.gpnetd.AccountProto.AccountEditApplicationReq,
com.gpnetd.CommonProto.SuccessResp> getEditApplicationMethod() {
io.grpc.MethodDescriptor<com.gpnetd.AccountProto.AccountEditApplicationReq, com.gpnetd.CommonProto.SuccessResp> getEditApplicationMethod;
if ((getEditApplicationMethod = AccountGrpc.getEditApplicationMethod) == null) {
synchronized (AccountGrpc.class) {
if ((getEditApplicationMethod = AccountGrpc.getEditApplicationMethod) == null) {
AccountGrpc.getEditApplicationMethod = getEditApplicationMethod =
io.grpc.MethodDescriptor.<com.gpnetd.AccountProto.AccountEditApplicationReq, com.gpnetd.CommonProto.SuccessResp>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "EditApplication"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.gpnetd.AccountProto.AccountEditApplicationReq.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.gpnetd.CommonProto.SuccessResp.getDefaultInstance()))
.setSchemaDescriptor(new AccountMethodDescriptorSupplier("EditApplication"))
.build();
}
}
}
return getEditApplicationMethod;
}
private static volatile io.grpc.MethodDescriptor<com.gpnetd.AccountProto.AccountGetApplicationReq,
com.gpnetd.AccountProto.AccountGetApplicationResp> getGetApplicationMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetApplication",
requestType = com.gpnetd.AccountProto.AccountGetApplicationReq.class,
responseType = com.gpnetd.AccountProto.AccountGetApplicationResp.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<com.gpnetd.AccountProto.AccountGetApplicationReq,
com.gpnetd.AccountProto.AccountGetApplicationResp> getGetApplicationMethod() {
io.grpc.MethodDescriptor<com.gpnetd.AccountProto.AccountGetApplicationReq, com.gpnetd.AccountProto.AccountGetApplicationResp> getGetApplicationMethod;
if ((getGetApplicationMethod = AccountGrpc.getGetApplicationMethod) == null) {
synchronized (AccountGrpc.class) {
if ((getGetApplicationMethod = AccountGrpc.getGetApplicationMethod) == null) {
AccountGrpc.getGetApplicationMethod = getGetApplicationMethod =
io.grpc.MethodDescriptor.<com.gpnetd.AccountProto.AccountGetApplicationReq, com.gpnetd.AccountProto.AccountGetApplicationResp>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetApplication"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.gpnetd.AccountProto.AccountGetApplicationReq.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.gpnetd.AccountProto.AccountGetApplicationResp.getDefaultInstance()))
.setSchemaDescriptor(new AccountMethodDescriptorSupplier("GetApplication"))
.build();
}
}
}
return getGetApplicationMethod;
}
private static volatile io.grpc.MethodDescriptor<com.gpnetd.AccountProto.AccountGenerateApplicationTokenReq,
com.gpnetd.AccountProto.AccountGenerateApplicationTokenResp> getGenerateApplicationTokenMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GenerateApplicationToken",
requestType = com.gpnetd.AccountProto.AccountGenerateApplicationTokenReq.class,
responseType = com.gpnetd.AccountProto.AccountGenerateApplicationTokenResp.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<com.gpnetd.AccountProto.AccountGenerateApplicationTokenReq,
com.gpnetd.AccountProto.AccountGenerateApplicationTokenResp> getGenerateApplicationTokenMethod() {
io.grpc.MethodDescriptor<com.gpnetd.AccountProto.AccountGenerateApplicationTokenReq, com.gpnetd.AccountProto.AccountGenerateApplicationTokenResp> getGenerateApplicationTokenMethod;
if ((getGenerateApplicationTokenMethod = AccountGrpc.getGenerateApplicationTokenMethod) == null) {
synchronized (AccountGrpc.class) {
if ((getGenerateApplicationTokenMethod = AccountGrpc.getGenerateApplicationTokenMethod) == null) {
AccountGrpc.getGenerateApplicationTokenMethod = getGenerateApplicationTokenMethod =
io.grpc.MethodDescriptor.<com.gpnetd.AccountProto.AccountGenerateApplicationTokenReq, com.gpnetd.AccountProto.AccountGenerateApplicationTokenResp>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GenerateApplicationToken"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.gpnetd.AccountProto.AccountGenerateApplicationTokenReq.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.gpnetd.AccountProto.AccountGenerateApplicationTokenResp.getDefaultInstance()))
.setSchemaDescriptor(new AccountMethodDescriptorSupplier("GenerateApplicationToken"))
.build();
}
}
}
return getGenerateApplicationTokenMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static AccountStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory<AccountStub> factory =
new io.grpc.stub.AbstractStub.StubFactory<AccountStub>() {
@java.lang.Override
public AccountStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new AccountStub(channel, callOptions);
}
};
return AccountStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static AccountBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory<AccountBlockingStub> factory =
new io.grpc.stub.AbstractStub.StubFactory<AccountBlockingStub>() {
@java.lang.Override
public AccountBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new AccountBlockingStub(channel, callOptions);
}
};
return AccountBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static AccountFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory<AccountFutureStub> factory =
new io.grpc.stub.AbstractStub.StubFactory<AccountFutureStub>() {
@java.lang.Override
public AccountFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new AccountFutureStub(channel, callOptions);
}
};
return AccountFutureStub.newStub(factory, channel);
}
/**
*/
public static abstract class AccountImplBase implements io.grpc.BindableService {
/**
* <pre>
* ListDIDs lists all the DIDs for the account.
* </pre>
*/
public void listDIDs(com.gpnetd.AccountProto.AccountListDIDsReq request,
io.grpc.stub.StreamObserver<com.gpnetd.AccountProto.AccountListDIDsResp> responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListDIDsMethod(), responseObserver);
}
/**
* <pre>
* ApplicationAssignDID Assigns DID to the application.
* </pre>
*/
public void applicationAssignDIDId(com.gpnetd.AccountProto.ApplicationAssignDIDReq request,
io.grpc.stub.StreamObserver<com.gpnetd.CommonProto.SuccessResp> responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getApplicationAssignDIDIdMethod(), responseObserver);
}
/**
* <pre>
* ApplicationUnassignDIDId Unassigns DID from the application.
* </pre>
*/
public void applicationUnassignDIDId(com.gpnetd.AccountProto.ApplicationUnassignDIDReq request,
io.grpc.stub.StreamObserver<com.gpnetd.CommonProto.SuccessResp> responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getApplicationUnassignDIDIdMethod(), responseObserver);
}
/**
* <pre>
* ListApplications lists all the applications.
* </pre>
*/
public void listApplications(com.gpnetd.AccountProto.AccountListApplicationsReq request,
io.grpc.stub.StreamObserver<com.gpnetd.AccountProto.AccountListApplicationsResp> responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListApplicationsMethod(), responseObserver);
}
/**
* <pre>
* CreateApplication creates an application.
* </pre>
*/
public void createApplication(com.gpnetd.AccountProto.AccountCreateApplicationReq request,
io.grpc.stub.StreamObserver<com.gpnetd.AccountProto.AccountCreateApplicationResp> responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateApplicationMethod(), responseObserver);
}
/**
* <pre>
* EditApplication edits an application.
* </pre>
*/
public void editApplication(com.gpnetd.AccountProto.AccountEditApplicationReq request,