├── .gitignore ├── .gitmodules ├── README.md ├── build.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── settings.gradle └── src └── main ├── java ├── control │ ├── Controlmessage.java │ ├── Heartbeatrequest.java │ └── Uuid.java ├── events │ ├── EnvelopeOuterClass.java │ ├── ErrorOuterClass.java │ ├── HeartbeatOuterClass.java │ ├── Http.java │ ├── Log.java │ ├── Metric.java │ └── Uuid.java └── org │ └── springframework │ └── xd │ └── firehose │ ├── ByteBufferMessageConverter.java │ └── EnvelopeTransformer.java └── resources └── config ├── firehose.properties └── firehose.xml /.gitignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | /bin/ 3 | /lib/ 4 | .DS_Store 5 | target 6 | bin 7 | build 8 | .gradle 9 | .springBeans 10 | pom.xml 11 | *.iml 12 | *.ipr 13 | *.iws 14 | *.log 15 | .classpath 16 | .project 17 | .settings 18 | .idea 19 | out 20 | 21 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "src/main/proto"] 2 | path = src/main/proto 3 | url = https://github.com/cloudfoundry/dropsonde-protocol 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # xd-firehose 2 | 3 | A spring-xd module that consumes messages from [doppler](https://github.com/cloudfoundry/loggregator) firehose endpoint. 4 | 5 | ## Building and installing 6 | 7 | $./gradlew clean test bootRepackage 8 | 9 | Deploy the jar file to spring XD: 10 | 11 | ``` 12 | _____ __ _______ 13 | / ___| (-) \ \ / / _ \ 14 | \ `--. _ __ _ __ _ _ __ __ _ \ V /| | | | 15 | `--. \ '_ \| '__| | '_ \ / _` | / ^ \| | | | 16 | /\__/ / |_) | | | | | | | (_| | / / \ \ |/ / 17 | \____/| .__/|_| |_|_| |_|\__, | \/ \/___/ 18 | | | __/ | 19 | |_| |___/ 20 | eXtreme Data 21 | 1.1.0.RELEASE | Admin Server Target: http://localhost:9393 22 | Welcome to the Spring XD shell. For assistance hit TAB or type "help". 23 | xd:>module upload --file /build/libs/firehose-1.0.0.BUILD-SNAPSHOT.jar --name firehose --type source 24 | 25 | ``` 26 | 27 | You can now list the arguments you need to pass to the firehose: 28 | 29 | ``` 30 | module info source:firehose 31 | Information about source module 'firehose': 32 | 33 | Option Name Description Default Type 34 | ------------- ------------------------------------------------ -------------------------------- -------- 35 | dopplerUrl Doppler WSS url wss://doppler.10.244.0.34.xip.io String 36 | cfAccessToken JWT Access Token "" String 37 | outputType how this module should emit messages it produces MimeType 38 | 39 | ``` 40 | 41 | 42 | 43 | ##Pre requisites: 44 | 45 | You will need access to a recent CF install [Deploying CF with bosh-lite](https://github.com/cloudfoundry/bosh-lite/blob/master/docs/deploy-cf.md). 46 | 47 | Follow the instructions on how to enable firehose access to your admin token [here](https://github.com/cloudfoundry/loggregator#adding-scope-to-a-running-cluster-via-uaac) or even a better one from [CloudCredo](http://www.cloudcredo.com/cloud-foundry-firehose-and-friends/) 48 | 49 | Now that you have your CF token, just deploy the firehose: 50 | 51 | ``` 52 | xd:>stream create --name firehose2log --definition "firehose --cfAccessToken='bearer eyJhbGciOiJSUzI1NiJ9.eyJqdGkiOiI2NzYzNmU1Ni03MzY3LTQxYTQtOWI0ZC00MDNkNzU2YTEwODIiLCJzdWIiOiJhZG1pbiIsImF1dGhvcml0aWVzIjpbInBhc3N3b3JkLndyaXRlIiwic2NpbS53cml0ZSIsImNsaWVudHMud3JpdGUiLCJjbGllbnRzLnJlYWQiLCJzY2ltLnJlYWQiLCJ1YWEuYWRtaW4iLCJjbGllbnRzLnNlY3JldCIsImRvcHBsZXIuZmlyZWhvc2UiXSwic2NvcGUiOlsic2NpbS5yZWFkIiwidWFhLmFkbWluIiwicGFzc3dvcmQud3JpdGUiLCJzY2ltLndyaXRlIiwiY2xpZW50cy53cml0ZSIsImNsaWVudHMucmVhZCIsImNsaWVudHMuc2VjcmV0IiwiZG9wcGxlci5maXJlaG9zZSJdLCJjbGllbnRfaWQiOiJhZG1pbiIsImNpZCI6ImFkbWluIiwiYXpwIjoiYWRtaW4iLCJncmFudF90eXBlIjoiY2xpZW50X2NyZWRlbnRpYWxzIiwiaWF0IjoxNDI2NjgzNjc0LCJleHAiOjE0MjY3MjY4NzQsImlzcyI6Imh0dHBzOi8vdWFhLjEwLjI0NC4wLjM0LnhpcC5pby9vYXV0aC90b2tlbiIsImF1ZCI6WyJhZG1pbiIsInNjaW0iLCJ1YWEiLCJwYXNzd29yZCIsImNsaWVudHMiLCJkb3BwbGVyIl19.Un9D5wAP7f8XRUWhPi6HEa5lijvufJqqNTsS6zYmT0KtjYqaJdyul0Hjxcy35DLyshxAti_8V5Edu9s_Xf9lcbBbGRmZg0wX87DCpmZih4q3Wh0Iip80FnWw90YuJ9SZrC0kjEhax00k027fvGCVml-IOhr11Fab5yID0b2jsNc' | log" 53 | Created new stream 'firehose2log' 54 | xd:>stream deploy --name firehose2log 55 | Deployed stream 'firehose2log' 56 | ``` 57 | Your console now should display the metrics : 58 | 59 | ``` 60 | 2015-03-18 09:02:50,231 1.1.0.RELEASE DEBUG WebSocketClient@1274731094-67 handler.LoggingHandler - org.springframework.integration.handler.LoggingHandler#0 received message: GenericMessage [payload=origin: "syslog_drain_binder" 61 | eventType: Heartbeat 62 | heartbeat { 63 | sentCount: 2214 64 | receivedCount: 2214 65 | errorCount: 0 66 | controlMessageIdentifier { 67 | low: 13712409313612728631 68 | high: 6638444458909832046 69 | } 70 | } 71 | timestamp: 1426683770230759660 72 | , headers={simpMessageType=MESSAGE, content-length=66, id=aefc34d2-6058-6056-530a-d189d3290bad, simpSessionAttributes={}, simpSessionId=6b79796b, timestamp=1426683770231}] 73 | ``` 74 | 75 | ##Issues 76 | 77 | It seems that only one websocket session can be active per token. If you run into errors on websocket client complaining about *Didn't switch protocol* the real issue is a 401 sent from doppler. Try deleting the token, and getting a new one 78 | 79 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | maven { url "http://repo.spring.io/plugins-snapshot" } 4 | maven { url "http://repo.spring.io/release" } 5 | jcenter() 6 | maven { url "http://repo.spring.io/snapshot" } 7 | maven { url "http://repo.spring.io/milestone" } 8 | } 9 | dependencies { 10 | classpath("org.springframework.xd:spring-xd-module-plugin:1.1.0.RELEASE") 11 | } 12 | } 13 | 14 | ext { 15 | springXdVersion = '1.1.0.RELEASE' 16 | springIntegrationVersion = '4.1.2.RELEASE' 17 | } 18 | 19 | apply plugin: 'java' 20 | apply plugin: 'eclipse' 21 | apply plugin: 'idea' 22 | apply plugin: 'spring-xd-module' 23 | 24 | task wrapper(type: Wrapper) { 25 | gradleVersion = '1.12' 26 | } 27 | 28 | dependencies { 29 | compile("org.springframework.integration:spring-integration-websocket:4.1.2.RELEASE") 30 | compile("org.eclipse.jetty.websocket:websocket-client:9.3.0.M2") 31 | compile("com.google.protobuf:protobuf-java:2.6.1") 32 | testCompile("org.springframework.boot:spring-boot-starter-test") 33 | } 34 | 35 | group = 'org.springframework.xd.cf.firehose' 36 | version = '1.0.0.BUILD-SNAPSHOT' 37 | 38 | description = "Spring XD load-generator source module" 39 | 40 | sourceCompatibility = 1.7 41 | targetCompatibility = 1.7 42 | 43 | repositories { 44 | maven { url "http://repo.spring.io/release" } 45 | mavenCentral() 46 | jcenter() 47 | maven { url "http://repo.spring.io/snapshot" } 48 | maven { url "http://repo.spring.io/milestone" } 49 | } -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viniciusccarvalho/xd-firehose/eb1fdea6db68b320da000cfcaaec1229d3d830bf/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Mar 17 23:30:39 EDT 2015 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.1-all.zip 7 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # For Cygwin, ensure paths are in UNIX format before anything is touched. 46 | if $cygwin ; then 47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 48 | fi 49 | 50 | # Attempt to set APP_HOME 51 | # Resolve links: $0 may be a link 52 | PRG="$0" 53 | # Need this for relative symlinks. 54 | while [ -h "$PRG" ] ; do 55 | ls=`ls -ld "$PRG"` 56 | link=`expr "$ls" : '.*-> \(.*\)$'` 57 | if expr "$link" : '/.*' > /dev/null; then 58 | PRG="$link" 59 | else 60 | PRG=`dirname "$PRG"`"/$link" 61 | fi 62 | done 63 | SAVED="`pwd`" 64 | cd "`dirname \"$PRG\"`/" >&- 65 | APP_HOME="`pwd -P`" 66 | cd "$SAVED" >&- 67 | 68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 69 | 70 | # Determine the Java command to use to start the JVM. 71 | if [ -n "$JAVA_HOME" ] ; then 72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 73 | # IBM's JDK on AIX uses strange locations for the executables 74 | JAVACMD="$JAVA_HOME/jre/sh/java" 75 | else 76 | JAVACMD="$JAVA_HOME/bin/java" 77 | fi 78 | if [ ! -x "$JAVACMD" ] ; then 79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 80 | 81 | Please set the JAVA_HOME variable in your environment to match the 82 | location of your Java installation." 83 | fi 84 | else 85 | JAVACMD="java" 86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 87 | 88 | Please set the JAVA_HOME variable in your environment to match the 89 | location of your Java installation." 90 | fi 91 | 92 | # Increase the maximum file descriptors if we can. 93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 94 | MAX_FD_LIMIT=`ulimit -H -n` 95 | if [ $? -eq 0 ] ; then 96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 97 | MAX_FD="$MAX_FD_LIMIT" 98 | fi 99 | ulimit -n $MAX_FD 100 | if [ $? -ne 0 ] ; then 101 | warn "Could not set maximum file descriptor limit: $MAX_FD" 102 | fi 103 | else 104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 105 | fi 106 | fi 107 | 108 | # For Darwin, add options to specify how the application appears in the dock 109 | if $darwin; then 110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 111 | fi 112 | 113 | # For Cygwin, switch paths to Windows format before running java 114 | if $cygwin ; then 115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 158 | function splitJvmOpts() { 159 | JVM_OPTS=("$@") 160 | } 161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 163 | 164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 165 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'firehose' 2 | 3 | -------------------------------------------------------------------------------- /src/main/java/control/Heartbeatrequest.java: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: heartbeatrequest.proto 3 | 4 | package control; 5 | 6 | public final class Heartbeatrequest { 7 | private Heartbeatrequest() {} 8 | public static void registerAllExtensions( 9 | com.google.protobuf.ExtensionRegistry registry) { 10 | } 11 | public interface HeartbeatRequestOrBuilder extends 12 | // @@protoc_insertion_point(interface_extends:control.HeartbeatRequest) 13 | com.google.protobuf.MessageOrBuilder { 14 | } 15 | /** 16 | * Protobuf type {@code control.HeartbeatRequest} 17 | * 18 | *
 19 |    */ A HeartbeatRequest command elicits a heartbeat from a component or app. When a HeartbeatRequest is received, a Heartbeat event MUST be returned with controlMessageIdentifier set to the UUID received in the request.
 20 |    * 
21 | */ 22 | public static final class HeartbeatRequest extends 23 | com.google.protobuf.GeneratedMessage implements 24 | // @@protoc_insertion_point(message_implements:control.HeartbeatRequest) 25 | HeartbeatRequestOrBuilder { 26 | // Use HeartbeatRequest.newBuilder() to construct. 27 | private HeartbeatRequest(com.google.protobuf.GeneratedMessage.Builder builder) { 28 | super(builder); 29 | this.unknownFields = builder.getUnknownFields(); 30 | } 31 | private HeartbeatRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } 32 | 33 | private static final HeartbeatRequest defaultInstance; 34 | public static HeartbeatRequest getDefaultInstance() { 35 | return defaultInstance; 36 | } 37 | 38 | public HeartbeatRequest getDefaultInstanceForType() { 39 | return defaultInstance; 40 | } 41 | 42 | private final com.google.protobuf.UnknownFieldSet unknownFields; 43 | @Override 44 | public final com.google.protobuf.UnknownFieldSet 45 | getUnknownFields() { 46 | return this.unknownFields; 47 | } 48 | private HeartbeatRequest( 49 | com.google.protobuf.CodedInputStream input, 50 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 51 | throws com.google.protobuf.InvalidProtocolBufferException { 52 | initFields(); 53 | com.google.protobuf.UnknownFieldSet.Builder unknownFields = 54 | com.google.protobuf.UnknownFieldSet.newBuilder(); 55 | try { 56 | boolean done = false; 57 | while (!done) { 58 | int tag = input.readTag(); 59 | switch (tag) { 60 | case 0: 61 | done = true; 62 | break; 63 | default: { 64 | if (!parseUnknownField(input, unknownFields, 65 | extensionRegistry, tag)) { 66 | done = true; 67 | } 68 | break; 69 | } 70 | } 71 | } 72 | } catch (com.google.protobuf.InvalidProtocolBufferException e) { 73 | throw e.setUnfinishedMessage(this); 74 | } catch (java.io.IOException e) { 75 | throw new com.google.protobuf.InvalidProtocolBufferException( 76 | e.getMessage()).setUnfinishedMessage(this); 77 | } finally { 78 | this.unknownFields = unknownFields.build(); 79 | makeExtensionsImmutable(); 80 | } 81 | } 82 | public static final com.google.protobuf.Descriptors.Descriptor 83 | getDescriptor() { 84 | return control.Heartbeatrequest.internal_static_control_HeartbeatRequest_descriptor; 85 | } 86 | 87 | protected FieldAccessorTable 88 | internalGetFieldAccessorTable() { 89 | return control.Heartbeatrequest.internal_static_control_HeartbeatRequest_fieldAccessorTable 90 | .ensureFieldAccessorsInitialized( 91 | control.Heartbeatrequest.HeartbeatRequest.class, control.Heartbeatrequest.HeartbeatRequest.Builder.class); 92 | } 93 | 94 | public static com.google.protobuf.Parser PARSER = 95 | new com.google.protobuf.AbstractParser() { 96 | public HeartbeatRequest parsePartialFrom( 97 | com.google.protobuf.CodedInputStream input, 98 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 99 | throws com.google.protobuf.InvalidProtocolBufferException { 100 | return new HeartbeatRequest(input, extensionRegistry); 101 | } 102 | }; 103 | 104 | @Override 105 | public com.google.protobuf.Parser getParserForType() { 106 | return PARSER; 107 | } 108 | 109 | private void initFields() { 110 | } 111 | private byte memoizedIsInitialized = -1; 112 | public final boolean isInitialized() { 113 | byte isInitialized = memoizedIsInitialized; 114 | if (isInitialized == 1) return true; 115 | if (isInitialized == 0) return false; 116 | 117 | memoizedIsInitialized = 1; 118 | return true; 119 | } 120 | 121 | public void writeTo(com.google.protobuf.CodedOutputStream output) 122 | throws java.io.IOException { 123 | getSerializedSize(); 124 | getUnknownFields().writeTo(output); 125 | } 126 | 127 | private int memoizedSerializedSize = -1; 128 | public int getSerializedSize() { 129 | int size = memoizedSerializedSize; 130 | if (size != -1) return size; 131 | 132 | size = 0; 133 | size += getUnknownFields().getSerializedSize(); 134 | memoizedSerializedSize = size; 135 | return size; 136 | } 137 | 138 | private static final long serialVersionUID = 0L; 139 | @Override 140 | protected Object writeReplace() 141 | throws java.io.ObjectStreamException { 142 | return super.writeReplace(); 143 | } 144 | 145 | public static control.Heartbeatrequest.HeartbeatRequest parseFrom( 146 | com.google.protobuf.ByteString data) 147 | throws com.google.protobuf.InvalidProtocolBufferException { 148 | return PARSER.parseFrom(data); 149 | } 150 | public static control.Heartbeatrequest.HeartbeatRequest parseFrom( 151 | com.google.protobuf.ByteString data, 152 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 153 | throws com.google.protobuf.InvalidProtocolBufferException { 154 | return PARSER.parseFrom(data, extensionRegistry); 155 | } 156 | public static control.Heartbeatrequest.HeartbeatRequest parseFrom(byte[] data) 157 | throws com.google.protobuf.InvalidProtocolBufferException { 158 | return PARSER.parseFrom(data); 159 | } 160 | public static control.Heartbeatrequest.HeartbeatRequest parseFrom( 161 | byte[] data, 162 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 163 | throws com.google.protobuf.InvalidProtocolBufferException { 164 | return PARSER.parseFrom(data, extensionRegistry); 165 | } 166 | public static control.Heartbeatrequest.HeartbeatRequest parseFrom(java.io.InputStream input) 167 | throws java.io.IOException { 168 | return PARSER.parseFrom(input); 169 | } 170 | public static control.Heartbeatrequest.HeartbeatRequest parseFrom( 171 | java.io.InputStream input, 172 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 173 | throws java.io.IOException { 174 | return PARSER.parseFrom(input, extensionRegistry); 175 | } 176 | public static control.Heartbeatrequest.HeartbeatRequest parseDelimitedFrom(java.io.InputStream input) 177 | throws java.io.IOException { 178 | return PARSER.parseDelimitedFrom(input); 179 | } 180 | public static control.Heartbeatrequest.HeartbeatRequest parseDelimitedFrom( 181 | java.io.InputStream input, 182 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 183 | throws java.io.IOException { 184 | return PARSER.parseDelimitedFrom(input, extensionRegistry); 185 | } 186 | public static control.Heartbeatrequest.HeartbeatRequest parseFrom( 187 | com.google.protobuf.CodedInputStream input) 188 | throws java.io.IOException { 189 | return PARSER.parseFrom(input); 190 | } 191 | public static control.Heartbeatrequest.HeartbeatRequest parseFrom( 192 | com.google.protobuf.CodedInputStream input, 193 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 194 | throws java.io.IOException { 195 | return PARSER.parseFrom(input, extensionRegistry); 196 | } 197 | 198 | public static Builder newBuilder() { return Builder.create(); } 199 | public Builder newBuilderForType() { return newBuilder(); } 200 | public static Builder newBuilder(control.Heartbeatrequest.HeartbeatRequest prototype) { 201 | return newBuilder().mergeFrom(prototype); 202 | } 203 | public Builder toBuilder() { return newBuilder(this); } 204 | 205 | @Override 206 | protected Builder newBuilderForType( 207 | BuilderParent parent) { 208 | Builder builder = new Builder(parent); 209 | return builder; 210 | } 211 | /** 212 | * Protobuf type {@code control.HeartbeatRequest} 213 | * 214 | *
215 |      */ A HeartbeatRequest command elicits a heartbeat from a component or app. When a HeartbeatRequest is received, a Heartbeat event MUST be returned with controlMessageIdentifier set to the UUID received in the request.
216 |      * 
217 | */ 218 | public static final class Builder extends 219 | com.google.protobuf.GeneratedMessage.Builder implements 220 | // @@protoc_insertion_point(builder_implements:control.HeartbeatRequest) 221 | control.Heartbeatrequest.HeartbeatRequestOrBuilder { 222 | public static final com.google.protobuf.Descriptors.Descriptor 223 | getDescriptor() { 224 | return control.Heartbeatrequest.internal_static_control_HeartbeatRequest_descriptor; 225 | } 226 | 227 | protected FieldAccessorTable 228 | internalGetFieldAccessorTable() { 229 | return control.Heartbeatrequest.internal_static_control_HeartbeatRequest_fieldAccessorTable 230 | .ensureFieldAccessorsInitialized( 231 | control.Heartbeatrequest.HeartbeatRequest.class, control.Heartbeatrequest.HeartbeatRequest.Builder.class); 232 | } 233 | 234 | // Construct using control.Heartbeatrequest.HeartbeatRequest.newBuilder() 235 | private Builder() { 236 | maybeForceBuilderInitialization(); 237 | } 238 | 239 | private Builder( 240 | BuilderParent parent) { 241 | super(parent); 242 | maybeForceBuilderInitialization(); 243 | } 244 | private void maybeForceBuilderInitialization() { 245 | if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { 246 | } 247 | } 248 | private static Builder create() { 249 | return new Builder(); 250 | } 251 | 252 | public Builder clear() { 253 | super.clear(); 254 | return this; 255 | } 256 | 257 | public Builder clone() { 258 | return create().mergeFrom(buildPartial()); 259 | } 260 | 261 | public com.google.protobuf.Descriptors.Descriptor 262 | getDescriptorForType() { 263 | return control.Heartbeatrequest.internal_static_control_HeartbeatRequest_descriptor; 264 | } 265 | 266 | public control.Heartbeatrequest.HeartbeatRequest getDefaultInstanceForType() { 267 | return control.Heartbeatrequest.HeartbeatRequest.getDefaultInstance(); 268 | } 269 | 270 | public control.Heartbeatrequest.HeartbeatRequest build() { 271 | control.Heartbeatrequest.HeartbeatRequest result = buildPartial(); 272 | if (!result.isInitialized()) { 273 | throw newUninitializedMessageException(result); 274 | } 275 | return result; 276 | } 277 | 278 | public control.Heartbeatrequest.HeartbeatRequest buildPartial() { 279 | control.Heartbeatrequest.HeartbeatRequest result = new control.Heartbeatrequest.HeartbeatRequest(this); 280 | onBuilt(); 281 | return result; 282 | } 283 | 284 | public Builder mergeFrom(com.google.protobuf.Message other) { 285 | if (other instanceof control.Heartbeatrequest.HeartbeatRequest) { 286 | return mergeFrom((control.Heartbeatrequest.HeartbeatRequest)other); 287 | } else { 288 | super.mergeFrom(other); 289 | return this; 290 | } 291 | } 292 | 293 | public Builder mergeFrom(control.Heartbeatrequest.HeartbeatRequest other) { 294 | if (other == control.Heartbeatrequest.HeartbeatRequest.getDefaultInstance()) return this; 295 | this.mergeUnknownFields(other.getUnknownFields()); 296 | return this; 297 | } 298 | 299 | public final boolean isInitialized() { 300 | return true; 301 | } 302 | 303 | public Builder mergeFrom( 304 | com.google.protobuf.CodedInputStream input, 305 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 306 | throws java.io.IOException { 307 | control.Heartbeatrequest.HeartbeatRequest parsedMessage = null; 308 | try { 309 | parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); 310 | } catch (com.google.protobuf.InvalidProtocolBufferException e) { 311 | parsedMessage = (control.Heartbeatrequest.HeartbeatRequest) e.getUnfinishedMessage(); 312 | throw e; 313 | } finally { 314 | if (parsedMessage != null) { 315 | mergeFrom(parsedMessage); 316 | } 317 | } 318 | return this; 319 | } 320 | 321 | // @@protoc_insertion_point(builder_scope:control.HeartbeatRequest) 322 | } 323 | 324 | static { 325 | defaultInstance = new HeartbeatRequest(true); 326 | defaultInstance.initFields(); 327 | } 328 | 329 | // @@protoc_insertion_point(class_scope:control.HeartbeatRequest) 330 | } 331 | 332 | private static final com.google.protobuf.Descriptors.Descriptor 333 | internal_static_control_HeartbeatRequest_descriptor; 334 | private static 335 | com.google.protobuf.GeneratedMessage.FieldAccessorTable 336 | internal_static_control_HeartbeatRequest_fieldAccessorTable; 337 | 338 | public static com.google.protobuf.Descriptors.FileDescriptor 339 | getDescriptor() { 340 | return descriptor; 341 | } 342 | private static com.google.protobuf.Descriptors.FileDescriptor 343 | descriptor; 344 | static { 345 | String[] descriptorData = { 346 | "\n\026heartbeatrequest.proto\022\007control\"\022\n\020Hea" + 347 | "rtbeatRequest" 348 | }; 349 | com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = 350 | new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { 351 | public com.google.protobuf.ExtensionRegistry assignDescriptors( 352 | com.google.protobuf.Descriptors.FileDescriptor root) { 353 | descriptor = root; 354 | return null; 355 | } 356 | }; 357 | com.google.protobuf.Descriptors.FileDescriptor 358 | .internalBuildGeneratedFileFrom(descriptorData, 359 | new com.google.protobuf.Descriptors.FileDescriptor[] { 360 | }, assigner); 361 | internal_static_control_HeartbeatRequest_descriptor = 362 | getDescriptor().getMessageTypes().get(0); 363 | internal_static_control_HeartbeatRequest_fieldAccessorTable = new 364 | com.google.protobuf.GeneratedMessage.FieldAccessorTable( 365 | internal_static_control_HeartbeatRequest_descriptor, 366 | new String[] { }); 367 | } 368 | 369 | // @@protoc_insertion_point(outer_class_scope) 370 | } 371 | -------------------------------------------------------------------------------- /src/main/java/control/Uuid.java: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: uuid.proto 3 | 4 | package control; 5 | 6 | public final class Uuid { 7 | private Uuid() {} 8 | public static void registerAllExtensions( 9 | com.google.protobuf.ExtensionRegistry registry) { 10 | } 11 | public interface UUIDOrBuilder extends 12 | // @@protoc_insertion_point(interface_extends:control.UUID) 13 | com.google.protobuf.MessageOrBuilder { 14 | 15 | /** 16 | * required uint64 low = 1; 17 | */ 18 | boolean hasLow(); 19 | /** 20 | * required uint64 low = 1; 21 | */ 22 | long getLow(); 23 | 24 | /** 25 | * required uint64 high = 2; 26 | */ 27 | boolean hasHigh(); 28 | /** 29 | * required uint64 high = 2; 30 | */ 31 | long getHigh(); 32 | } 33 | /** 34 | * Protobuf type {@code control.UUID} 35 | * 36 | *
 37 |    */ Type representing a 128-bit UUID.
 38 |    * 
39 | */ 40 | public static final class UUID extends 41 | com.google.protobuf.GeneratedMessage implements 42 | // @@protoc_insertion_point(message_implements:control.UUID) 43 | UUIDOrBuilder { 44 | // Use UUID.newBuilder() to construct. 45 | private UUID(com.google.protobuf.GeneratedMessage.Builder builder) { 46 | super(builder); 47 | this.unknownFields = builder.getUnknownFields(); 48 | } 49 | private UUID(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } 50 | 51 | private static final UUID defaultInstance; 52 | public static UUID getDefaultInstance() { 53 | return defaultInstance; 54 | } 55 | 56 | public UUID getDefaultInstanceForType() { 57 | return defaultInstance; 58 | } 59 | 60 | private final com.google.protobuf.UnknownFieldSet unknownFields; 61 | @Override 62 | public final com.google.protobuf.UnknownFieldSet 63 | getUnknownFields() { 64 | return this.unknownFields; 65 | } 66 | private UUID( 67 | com.google.protobuf.CodedInputStream input, 68 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 69 | throws com.google.protobuf.InvalidProtocolBufferException { 70 | initFields(); 71 | int mutable_bitField0_ = 0; 72 | com.google.protobuf.UnknownFieldSet.Builder unknownFields = 73 | com.google.protobuf.UnknownFieldSet.newBuilder(); 74 | try { 75 | boolean done = false; 76 | while (!done) { 77 | int tag = input.readTag(); 78 | switch (tag) { 79 | case 0: 80 | done = true; 81 | break; 82 | default: { 83 | if (!parseUnknownField(input, unknownFields, 84 | extensionRegistry, tag)) { 85 | done = true; 86 | } 87 | break; 88 | } 89 | case 8: { 90 | bitField0_ |= 0x00000001; 91 | low_ = input.readUInt64(); 92 | break; 93 | } 94 | case 16: { 95 | bitField0_ |= 0x00000002; 96 | high_ = input.readUInt64(); 97 | break; 98 | } 99 | } 100 | } 101 | } catch (com.google.protobuf.InvalidProtocolBufferException e) { 102 | throw e.setUnfinishedMessage(this); 103 | } catch (java.io.IOException e) { 104 | throw new com.google.protobuf.InvalidProtocolBufferException( 105 | e.getMessage()).setUnfinishedMessage(this); 106 | } finally { 107 | this.unknownFields = unknownFields.build(); 108 | makeExtensionsImmutable(); 109 | } 110 | } 111 | public static final com.google.protobuf.Descriptors.Descriptor 112 | getDescriptor() { 113 | return control.Uuid.internal_static_control_UUID_descriptor; 114 | } 115 | 116 | protected FieldAccessorTable 117 | internalGetFieldAccessorTable() { 118 | return control.Uuid.internal_static_control_UUID_fieldAccessorTable 119 | .ensureFieldAccessorsInitialized( 120 | control.Uuid.UUID.class, control.Uuid.UUID.Builder.class); 121 | } 122 | 123 | public static com.google.protobuf.Parser PARSER = 124 | new com.google.protobuf.AbstractParser() { 125 | public UUID parsePartialFrom( 126 | com.google.protobuf.CodedInputStream input, 127 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 128 | throws com.google.protobuf.InvalidProtocolBufferException { 129 | return new UUID(input, extensionRegistry); 130 | } 131 | }; 132 | 133 | @Override 134 | public com.google.protobuf.Parser getParserForType() { 135 | return PARSER; 136 | } 137 | 138 | private int bitField0_; 139 | public static final int LOW_FIELD_NUMBER = 1; 140 | private long low_; 141 | /** 142 | * required uint64 low = 1; 143 | */ 144 | public boolean hasLow() { 145 | return ((bitField0_ & 0x00000001) == 0x00000001); 146 | } 147 | /** 148 | * required uint64 low = 1; 149 | */ 150 | public long getLow() { 151 | return low_; 152 | } 153 | 154 | public static final int HIGH_FIELD_NUMBER = 2; 155 | private long high_; 156 | /** 157 | * required uint64 high = 2; 158 | */ 159 | public boolean hasHigh() { 160 | return ((bitField0_ & 0x00000002) == 0x00000002); 161 | } 162 | /** 163 | * required uint64 high = 2; 164 | */ 165 | public long getHigh() { 166 | return high_; 167 | } 168 | 169 | private void initFields() { 170 | low_ = 0L; 171 | high_ = 0L; 172 | } 173 | private byte memoizedIsInitialized = -1; 174 | public final boolean isInitialized() { 175 | byte isInitialized = memoizedIsInitialized; 176 | if (isInitialized == 1) return true; 177 | if (isInitialized == 0) return false; 178 | 179 | if (!hasLow()) { 180 | memoizedIsInitialized = 0; 181 | return false; 182 | } 183 | if (!hasHigh()) { 184 | memoizedIsInitialized = 0; 185 | return false; 186 | } 187 | memoizedIsInitialized = 1; 188 | return true; 189 | } 190 | 191 | public void writeTo(com.google.protobuf.CodedOutputStream output) 192 | throws java.io.IOException { 193 | getSerializedSize(); 194 | if (((bitField0_ & 0x00000001) == 0x00000001)) { 195 | output.writeUInt64(1, low_); 196 | } 197 | if (((bitField0_ & 0x00000002) == 0x00000002)) { 198 | output.writeUInt64(2, high_); 199 | } 200 | getUnknownFields().writeTo(output); 201 | } 202 | 203 | private int memoizedSerializedSize = -1; 204 | public int getSerializedSize() { 205 | int size = memoizedSerializedSize; 206 | if (size != -1) return size; 207 | 208 | size = 0; 209 | if (((bitField0_ & 0x00000001) == 0x00000001)) { 210 | size += com.google.protobuf.CodedOutputStream 211 | .computeUInt64Size(1, low_); 212 | } 213 | if (((bitField0_ & 0x00000002) == 0x00000002)) { 214 | size += com.google.protobuf.CodedOutputStream 215 | .computeUInt64Size(2, high_); 216 | } 217 | size += getUnknownFields().getSerializedSize(); 218 | memoizedSerializedSize = size; 219 | return size; 220 | } 221 | 222 | private static final long serialVersionUID = 0L; 223 | @Override 224 | protected Object writeReplace() 225 | throws java.io.ObjectStreamException { 226 | return super.writeReplace(); 227 | } 228 | 229 | public static control.Uuid.UUID parseFrom( 230 | com.google.protobuf.ByteString data) 231 | throws com.google.protobuf.InvalidProtocolBufferException { 232 | return PARSER.parseFrom(data); 233 | } 234 | public static control.Uuid.UUID parseFrom( 235 | com.google.protobuf.ByteString data, 236 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 237 | throws com.google.protobuf.InvalidProtocolBufferException { 238 | return PARSER.parseFrom(data, extensionRegistry); 239 | } 240 | public static control.Uuid.UUID parseFrom(byte[] data) 241 | throws com.google.protobuf.InvalidProtocolBufferException { 242 | return PARSER.parseFrom(data); 243 | } 244 | public static control.Uuid.UUID parseFrom( 245 | byte[] data, 246 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 247 | throws com.google.protobuf.InvalidProtocolBufferException { 248 | return PARSER.parseFrom(data, extensionRegistry); 249 | } 250 | public static control.Uuid.UUID parseFrom(java.io.InputStream input) 251 | throws java.io.IOException { 252 | return PARSER.parseFrom(input); 253 | } 254 | public static control.Uuid.UUID parseFrom( 255 | java.io.InputStream input, 256 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 257 | throws java.io.IOException { 258 | return PARSER.parseFrom(input, extensionRegistry); 259 | } 260 | public static control.Uuid.UUID parseDelimitedFrom(java.io.InputStream input) 261 | throws java.io.IOException { 262 | return PARSER.parseDelimitedFrom(input); 263 | } 264 | public static control.Uuid.UUID parseDelimitedFrom( 265 | java.io.InputStream input, 266 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 267 | throws java.io.IOException { 268 | return PARSER.parseDelimitedFrom(input, extensionRegistry); 269 | } 270 | public static control.Uuid.UUID parseFrom( 271 | com.google.protobuf.CodedInputStream input) 272 | throws java.io.IOException { 273 | return PARSER.parseFrom(input); 274 | } 275 | public static control.Uuid.UUID parseFrom( 276 | com.google.protobuf.CodedInputStream input, 277 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 278 | throws java.io.IOException { 279 | return PARSER.parseFrom(input, extensionRegistry); 280 | } 281 | 282 | public static Builder newBuilder() { return Builder.create(); } 283 | public Builder newBuilderForType() { return newBuilder(); } 284 | public static Builder newBuilder(control.Uuid.UUID prototype) { 285 | return newBuilder().mergeFrom(prototype); 286 | } 287 | public Builder toBuilder() { return newBuilder(this); } 288 | 289 | @Override 290 | protected Builder newBuilderForType( 291 | BuilderParent parent) { 292 | Builder builder = new Builder(parent); 293 | return builder; 294 | } 295 | /** 296 | * Protobuf type {@code control.UUID} 297 | * 298 | *
299 |      */ Type representing a 128-bit UUID.
300 |      * 
301 | */ 302 | public static final class Builder extends 303 | com.google.protobuf.GeneratedMessage.Builder implements 304 | // @@protoc_insertion_point(builder_implements:control.UUID) 305 | control.Uuid.UUIDOrBuilder { 306 | public static final com.google.protobuf.Descriptors.Descriptor 307 | getDescriptor() { 308 | return control.Uuid.internal_static_control_UUID_descriptor; 309 | } 310 | 311 | protected FieldAccessorTable 312 | internalGetFieldAccessorTable() { 313 | return control.Uuid.internal_static_control_UUID_fieldAccessorTable 314 | .ensureFieldAccessorsInitialized( 315 | control.Uuid.UUID.class, control.Uuid.UUID.Builder.class); 316 | } 317 | 318 | // Construct using control.Uuid.UUID.newBuilder() 319 | private Builder() { 320 | maybeForceBuilderInitialization(); 321 | } 322 | 323 | private Builder( 324 | BuilderParent parent) { 325 | super(parent); 326 | maybeForceBuilderInitialization(); 327 | } 328 | private void maybeForceBuilderInitialization() { 329 | if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { 330 | } 331 | } 332 | private static Builder create() { 333 | return new Builder(); 334 | } 335 | 336 | public Builder clear() { 337 | super.clear(); 338 | low_ = 0L; 339 | bitField0_ = (bitField0_ & ~0x00000001); 340 | high_ = 0L; 341 | bitField0_ = (bitField0_ & ~0x00000002); 342 | return this; 343 | } 344 | 345 | public Builder clone() { 346 | return create().mergeFrom(buildPartial()); 347 | } 348 | 349 | public com.google.protobuf.Descriptors.Descriptor 350 | getDescriptorForType() { 351 | return control.Uuid.internal_static_control_UUID_descriptor; 352 | } 353 | 354 | public control.Uuid.UUID getDefaultInstanceForType() { 355 | return control.Uuid.UUID.getDefaultInstance(); 356 | } 357 | 358 | public control.Uuid.UUID build() { 359 | control.Uuid.UUID result = buildPartial(); 360 | if (!result.isInitialized()) { 361 | throw newUninitializedMessageException(result); 362 | } 363 | return result; 364 | } 365 | 366 | public control.Uuid.UUID buildPartial() { 367 | control.Uuid.UUID result = new control.Uuid.UUID(this); 368 | int from_bitField0_ = bitField0_; 369 | int to_bitField0_ = 0; 370 | if (((from_bitField0_ & 0x00000001) == 0x00000001)) { 371 | to_bitField0_ |= 0x00000001; 372 | } 373 | result.low_ = low_; 374 | if (((from_bitField0_ & 0x00000002) == 0x00000002)) { 375 | to_bitField0_ |= 0x00000002; 376 | } 377 | result.high_ = high_; 378 | result.bitField0_ = to_bitField0_; 379 | onBuilt(); 380 | return result; 381 | } 382 | 383 | public Builder mergeFrom(com.google.protobuf.Message other) { 384 | if (other instanceof control.Uuid.UUID) { 385 | return mergeFrom((control.Uuid.UUID)other); 386 | } else { 387 | super.mergeFrom(other); 388 | return this; 389 | } 390 | } 391 | 392 | public Builder mergeFrom(control.Uuid.UUID other) { 393 | if (other == control.Uuid.UUID.getDefaultInstance()) return this; 394 | if (other.hasLow()) { 395 | setLow(other.getLow()); 396 | } 397 | if (other.hasHigh()) { 398 | setHigh(other.getHigh()); 399 | } 400 | this.mergeUnknownFields(other.getUnknownFields()); 401 | return this; 402 | } 403 | 404 | public final boolean isInitialized() { 405 | if (!hasLow()) { 406 | 407 | return false; 408 | } 409 | if (!hasHigh()) { 410 | 411 | return false; 412 | } 413 | return true; 414 | } 415 | 416 | public Builder mergeFrom( 417 | com.google.protobuf.CodedInputStream input, 418 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 419 | throws java.io.IOException { 420 | control.Uuid.UUID parsedMessage = null; 421 | try { 422 | parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); 423 | } catch (com.google.protobuf.InvalidProtocolBufferException e) { 424 | parsedMessage = (control.Uuid.UUID) e.getUnfinishedMessage(); 425 | throw e; 426 | } finally { 427 | if (parsedMessage != null) { 428 | mergeFrom(parsedMessage); 429 | } 430 | } 431 | return this; 432 | } 433 | private int bitField0_; 434 | 435 | private long low_ ; 436 | /** 437 | * required uint64 low = 1; 438 | */ 439 | public boolean hasLow() { 440 | return ((bitField0_ & 0x00000001) == 0x00000001); 441 | } 442 | /** 443 | * required uint64 low = 1; 444 | */ 445 | public long getLow() { 446 | return low_; 447 | } 448 | /** 449 | * required uint64 low = 1; 450 | */ 451 | public Builder setLow(long value) { 452 | bitField0_ |= 0x00000001; 453 | low_ = value; 454 | onChanged(); 455 | return this; 456 | } 457 | /** 458 | * required uint64 low = 1; 459 | */ 460 | public Builder clearLow() { 461 | bitField0_ = (bitField0_ & ~0x00000001); 462 | low_ = 0L; 463 | onChanged(); 464 | return this; 465 | } 466 | 467 | private long high_ ; 468 | /** 469 | * required uint64 high = 2; 470 | */ 471 | public boolean hasHigh() { 472 | return ((bitField0_ & 0x00000002) == 0x00000002); 473 | } 474 | /** 475 | * required uint64 high = 2; 476 | */ 477 | public long getHigh() { 478 | return high_; 479 | } 480 | /** 481 | * required uint64 high = 2; 482 | */ 483 | public Builder setHigh(long value) { 484 | bitField0_ |= 0x00000002; 485 | high_ = value; 486 | onChanged(); 487 | return this; 488 | } 489 | /** 490 | * required uint64 high = 2; 491 | */ 492 | public Builder clearHigh() { 493 | bitField0_ = (bitField0_ & ~0x00000002); 494 | high_ = 0L; 495 | onChanged(); 496 | return this; 497 | } 498 | 499 | // @@protoc_insertion_point(builder_scope:control.UUID) 500 | } 501 | 502 | static { 503 | defaultInstance = new UUID(true); 504 | defaultInstance.initFields(); 505 | } 506 | 507 | // @@protoc_insertion_point(class_scope:control.UUID) 508 | } 509 | 510 | private static final com.google.protobuf.Descriptors.Descriptor 511 | internal_static_control_UUID_descriptor; 512 | private static 513 | com.google.protobuf.GeneratedMessage.FieldAccessorTable 514 | internal_static_control_UUID_fieldAccessorTable; 515 | 516 | public static com.google.protobuf.Descriptors.FileDescriptor 517 | getDescriptor() { 518 | return descriptor; 519 | } 520 | private static com.google.protobuf.Descriptors.FileDescriptor 521 | descriptor; 522 | static { 523 | String[] descriptorData = { 524 | "\n\nuuid.proto\022\007control\"!\n\004UUID\022\013\n\003low\030\001 \002" + 525 | "(\004\022\014\n\004high\030\002 \002(\004" 526 | }; 527 | com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = 528 | new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { 529 | public com.google.protobuf.ExtensionRegistry assignDescriptors( 530 | com.google.protobuf.Descriptors.FileDescriptor root) { 531 | descriptor = root; 532 | return null; 533 | } 534 | }; 535 | com.google.protobuf.Descriptors.FileDescriptor 536 | .internalBuildGeneratedFileFrom(descriptorData, 537 | new com.google.protobuf.Descriptors.FileDescriptor[] { 538 | }, assigner); 539 | internal_static_control_UUID_descriptor = 540 | getDescriptor().getMessageTypes().get(0); 541 | internal_static_control_UUID_fieldAccessorTable = new 542 | com.google.protobuf.GeneratedMessage.FieldAccessorTable( 543 | internal_static_control_UUID_descriptor, 544 | new String[] { "Low", "High", }); 545 | } 546 | 547 | // @@protoc_insertion_point(outer_class_scope) 548 | } 549 | -------------------------------------------------------------------------------- /src/main/java/events/ErrorOuterClass.java: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: error.proto 3 | 4 | package events; 5 | 6 | public final class ErrorOuterClass { 7 | private ErrorOuterClass() {} 8 | public static void registerAllExtensions( 9 | com.google.protobuf.ExtensionRegistry registry) { 10 | } 11 | public interface ErrorOrBuilder extends 12 | // @@protoc_insertion_point(interface_extends:events.Error) 13 | com.google.protobuf.MessageOrBuilder { 14 | 15 | /** 16 | * required string source = 1; 17 | * 18 | *
 19 |      */ Source of the error. This may or may not be the same as the Origin in the envelope.
 20 |      * 
21 | */ 22 | boolean hasSource(); 23 | /** 24 | * required string source = 1; 25 | * 26 | *
 27 |      */ Source of the error. This may or may not be the same as the Origin in the envelope.
 28 |      * 
29 | */ 30 | String getSource(); 31 | /** 32 | * required string source = 1; 33 | * 34 | *
 35 |      */ Source of the error. This may or may not be the same as the Origin in the envelope.
 36 |      * 
37 | */ 38 | com.google.protobuf.ByteString 39 | getSourceBytes(); 40 | 41 | /** 42 | * required int32 code = 2; 43 | * 44 | *
 45 |      */ Numeric error code. This is provided for programmatic responses to the error.
 46 |      * 
47 | */ 48 | boolean hasCode(); 49 | /** 50 | * required int32 code = 2; 51 | * 52 | *
 53 |      */ Numeric error code. This is provided for programmatic responses to the error.
 54 |      * 
55 | */ 56 | int getCode(); 57 | 58 | /** 59 | * required string message = 3; 60 | * 61 | *
 62 |      */ Error description (preferably human-readable).
 63 |      * 
64 | */ 65 | boolean hasMessage(); 66 | /** 67 | * required string message = 3; 68 | * 69 | *
 70 |      */ Error description (preferably human-readable).
 71 |      * 
72 | */ 73 | String getMessage(); 74 | /** 75 | * required string message = 3; 76 | * 77 | *
 78 |      */ Error description (preferably human-readable).
 79 |      * 
80 | */ 81 | com.google.protobuf.ByteString 82 | getMessageBytes(); 83 | } 84 | /** 85 | * Protobuf type {@code events.Error} 86 | * 87 | *
 88 |    */ An Error event represents an error in the originating process.
 89 |    * 
90 | */ 91 | public static final class Error extends 92 | com.google.protobuf.GeneratedMessage implements 93 | // @@protoc_insertion_point(message_implements:events.Error) 94 | ErrorOrBuilder { 95 | // Use Error.newBuilder() to construct. 96 | private Error(com.google.protobuf.GeneratedMessage.Builder builder) { 97 | super(builder); 98 | this.unknownFields = builder.getUnknownFields(); 99 | } 100 | private Error(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } 101 | 102 | private static final Error defaultInstance; 103 | public static Error getDefaultInstance() { 104 | return defaultInstance; 105 | } 106 | 107 | public Error getDefaultInstanceForType() { 108 | return defaultInstance; 109 | } 110 | 111 | private final com.google.protobuf.UnknownFieldSet unknownFields; 112 | @Override 113 | public final com.google.protobuf.UnknownFieldSet 114 | getUnknownFields() { 115 | return this.unknownFields; 116 | } 117 | private Error( 118 | com.google.protobuf.CodedInputStream input, 119 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 120 | throws com.google.protobuf.InvalidProtocolBufferException { 121 | initFields(); 122 | int mutable_bitField0_ = 0; 123 | com.google.protobuf.UnknownFieldSet.Builder unknownFields = 124 | com.google.protobuf.UnknownFieldSet.newBuilder(); 125 | try { 126 | boolean done = false; 127 | while (!done) { 128 | int tag = input.readTag(); 129 | switch (tag) { 130 | case 0: 131 | done = true; 132 | break; 133 | default: { 134 | if (!parseUnknownField(input, unknownFields, 135 | extensionRegistry, tag)) { 136 | done = true; 137 | } 138 | break; 139 | } 140 | case 10: { 141 | com.google.protobuf.ByteString bs = input.readBytes(); 142 | bitField0_ |= 0x00000001; 143 | source_ = bs; 144 | break; 145 | } 146 | case 16: { 147 | bitField0_ |= 0x00000002; 148 | code_ = input.readInt32(); 149 | break; 150 | } 151 | case 26: { 152 | com.google.protobuf.ByteString bs = input.readBytes(); 153 | bitField0_ |= 0x00000004; 154 | message_ = bs; 155 | break; 156 | } 157 | } 158 | } 159 | } catch (com.google.protobuf.InvalidProtocolBufferException e) { 160 | throw e.setUnfinishedMessage(this); 161 | } catch (java.io.IOException e) { 162 | throw new com.google.protobuf.InvalidProtocolBufferException( 163 | e.getMessage()).setUnfinishedMessage(this); 164 | } finally { 165 | this.unknownFields = unknownFields.build(); 166 | makeExtensionsImmutable(); 167 | } 168 | } 169 | public static final com.google.protobuf.Descriptors.Descriptor 170 | getDescriptor() { 171 | return events.ErrorOuterClass.internal_static_events_Error_descriptor; 172 | } 173 | 174 | protected FieldAccessorTable 175 | internalGetFieldAccessorTable() { 176 | return events.ErrorOuterClass.internal_static_events_Error_fieldAccessorTable 177 | .ensureFieldAccessorsInitialized( 178 | events.ErrorOuterClass.Error.class, events.ErrorOuterClass.Error.Builder.class); 179 | } 180 | 181 | public static com.google.protobuf.Parser PARSER = 182 | new com.google.protobuf.AbstractParser() { 183 | public Error parsePartialFrom( 184 | com.google.protobuf.CodedInputStream input, 185 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 186 | throws com.google.protobuf.InvalidProtocolBufferException { 187 | return new Error(input, extensionRegistry); 188 | } 189 | }; 190 | 191 | @Override 192 | public com.google.protobuf.Parser getParserForType() { 193 | return PARSER; 194 | } 195 | 196 | private int bitField0_; 197 | public static final int SOURCE_FIELD_NUMBER = 1; 198 | private Object source_; 199 | /** 200 | * required string source = 1; 201 | * 202 | *
203 |      */ Source of the error. This may or may not be the same as the Origin in the envelope.
204 |      * 
205 | */ 206 | public boolean hasSource() { 207 | return ((bitField0_ & 0x00000001) == 0x00000001); 208 | } 209 | /** 210 | * required string source = 1; 211 | * 212 | *
213 |      */ Source of the error. This may or may not be the same as the Origin in the envelope.
214 |      * 
215 | */ 216 | public String getSource() { 217 | Object ref = source_; 218 | if (ref instanceof String) { 219 | return (String) ref; 220 | } else { 221 | com.google.protobuf.ByteString bs = 222 | (com.google.protobuf.ByteString) ref; 223 | String s = bs.toStringUtf8(); 224 | if (bs.isValidUtf8()) { 225 | source_ = s; 226 | } 227 | return s; 228 | } 229 | } 230 | /** 231 | * required string source = 1; 232 | * 233 | *
234 |      */ Source of the error. This may or may not be the same as the Origin in the envelope.
235 |      * 
236 | */ 237 | public com.google.protobuf.ByteString 238 | getSourceBytes() { 239 | Object ref = source_; 240 | if (ref instanceof String) { 241 | com.google.protobuf.ByteString b = 242 | com.google.protobuf.ByteString.copyFromUtf8( 243 | (String) ref); 244 | source_ = b; 245 | return b; 246 | } else { 247 | return (com.google.protobuf.ByteString) ref; 248 | } 249 | } 250 | 251 | public static final int CODE_FIELD_NUMBER = 2; 252 | private int code_; 253 | /** 254 | * required int32 code = 2; 255 | * 256 | *
257 |      */ Numeric error code. This is provided for programmatic responses to the error.
258 |      * 
259 | */ 260 | public boolean hasCode() { 261 | return ((bitField0_ & 0x00000002) == 0x00000002); 262 | } 263 | /** 264 | * required int32 code = 2; 265 | * 266 | *
267 |      */ Numeric error code. This is provided for programmatic responses to the error.
268 |      * 
269 | */ 270 | public int getCode() { 271 | return code_; 272 | } 273 | 274 | public static final int MESSAGE_FIELD_NUMBER = 3; 275 | private Object message_; 276 | /** 277 | * required string message = 3; 278 | * 279 | *
280 |      */ Error description (preferably human-readable).
281 |      * 
282 | */ 283 | public boolean hasMessage() { 284 | return ((bitField0_ & 0x00000004) == 0x00000004); 285 | } 286 | /** 287 | * required string message = 3; 288 | * 289 | *
290 |      */ Error description (preferably human-readable).
291 |      * 
292 | */ 293 | public String getMessage() { 294 | Object ref = message_; 295 | if (ref instanceof String) { 296 | return (String) ref; 297 | } else { 298 | com.google.protobuf.ByteString bs = 299 | (com.google.protobuf.ByteString) ref; 300 | String s = bs.toStringUtf8(); 301 | if (bs.isValidUtf8()) { 302 | message_ = s; 303 | } 304 | return s; 305 | } 306 | } 307 | /** 308 | * required string message = 3; 309 | * 310 | *
311 |      */ Error description (preferably human-readable).
312 |      * 
313 | */ 314 | public com.google.protobuf.ByteString 315 | getMessageBytes() { 316 | Object ref = message_; 317 | if (ref instanceof String) { 318 | com.google.protobuf.ByteString b = 319 | com.google.protobuf.ByteString.copyFromUtf8( 320 | (String) ref); 321 | message_ = b; 322 | return b; 323 | } else { 324 | return (com.google.protobuf.ByteString) ref; 325 | } 326 | } 327 | 328 | private void initFields() { 329 | source_ = ""; 330 | code_ = 0; 331 | message_ = ""; 332 | } 333 | private byte memoizedIsInitialized = -1; 334 | public final boolean isInitialized() { 335 | byte isInitialized = memoizedIsInitialized; 336 | if (isInitialized == 1) return true; 337 | if (isInitialized == 0) return false; 338 | 339 | if (!hasSource()) { 340 | memoizedIsInitialized = 0; 341 | return false; 342 | } 343 | if (!hasCode()) { 344 | memoizedIsInitialized = 0; 345 | return false; 346 | } 347 | if (!hasMessage()) { 348 | memoizedIsInitialized = 0; 349 | return false; 350 | } 351 | memoizedIsInitialized = 1; 352 | return true; 353 | } 354 | 355 | public void writeTo(com.google.protobuf.CodedOutputStream output) 356 | throws java.io.IOException { 357 | getSerializedSize(); 358 | if (((bitField0_ & 0x00000001) == 0x00000001)) { 359 | output.writeBytes(1, getSourceBytes()); 360 | } 361 | if (((bitField0_ & 0x00000002) == 0x00000002)) { 362 | output.writeInt32(2, code_); 363 | } 364 | if (((bitField0_ & 0x00000004) == 0x00000004)) { 365 | output.writeBytes(3, getMessageBytes()); 366 | } 367 | getUnknownFields().writeTo(output); 368 | } 369 | 370 | private int memoizedSerializedSize = -1; 371 | public int getSerializedSize() { 372 | int size = memoizedSerializedSize; 373 | if (size != -1) return size; 374 | 375 | size = 0; 376 | if (((bitField0_ & 0x00000001) == 0x00000001)) { 377 | size += com.google.protobuf.CodedOutputStream 378 | .computeBytesSize(1, getSourceBytes()); 379 | } 380 | if (((bitField0_ & 0x00000002) == 0x00000002)) { 381 | size += com.google.protobuf.CodedOutputStream 382 | .computeInt32Size(2, code_); 383 | } 384 | if (((bitField0_ & 0x00000004) == 0x00000004)) { 385 | size += com.google.protobuf.CodedOutputStream 386 | .computeBytesSize(3, getMessageBytes()); 387 | } 388 | size += getUnknownFields().getSerializedSize(); 389 | memoizedSerializedSize = size; 390 | return size; 391 | } 392 | 393 | private static final long serialVersionUID = 0L; 394 | @Override 395 | protected Object writeReplace() 396 | throws java.io.ObjectStreamException { 397 | return super.writeReplace(); 398 | } 399 | 400 | public static events.ErrorOuterClass.Error parseFrom( 401 | com.google.protobuf.ByteString data) 402 | throws com.google.protobuf.InvalidProtocolBufferException { 403 | return PARSER.parseFrom(data); 404 | } 405 | public static events.ErrorOuterClass.Error parseFrom( 406 | com.google.protobuf.ByteString data, 407 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 408 | throws com.google.protobuf.InvalidProtocolBufferException { 409 | return PARSER.parseFrom(data, extensionRegistry); 410 | } 411 | public static events.ErrorOuterClass.Error parseFrom(byte[] data) 412 | throws com.google.protobuf.InvalidProtocolBufferException { 413 | return PARSER.parseFrom(data); 414 | } 415 | public static events.ErrorOuterClass.Error parseFrom( 416 | byte[] data, 417 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 418 | throws com.google.protobuf.InvalidProtocolBufferException { 419 | return PARSER.parseFrom(data, extensionRegistry); 420 | } 421 | public static events.ErrorOuterClass.Error parseFrom(java.io.InputStream input) 422 | throws java.io.IOException { 423 | return PARSER.parseFrom(input); 424 | } 425 | public static events.ErrorOuterClass.Error parseFrom( 426 | java.io.InputStream input, 427 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 428 | throws java.io.IOException { 429 | return PARSER.parseFrom(input, extensionRegistry); 430 | } 431 | public static events.ErrorOuterClass.Error parseDelimitedFrom(java.io.InputStream input) 432 | throws java.io.IOException { 433 | return PARSER.parseDelimitedFrom(input); 434 | } 435 | public static events.ErrorOuterClass.Error parseDelimitedFrom( 436 | java.io.InputStream input, 437 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 438 | throws java.io.IOException { 439 | return PARSER.parseDelimitedFrom(input, extensionRegistry); 440 | } 441 | public static events.ErrorOuterClass.Error parseFrom( 442 | com.google.protobuf.CodedInputStream input) 443 | throws java.io.IOException { 444 | return PARSER.parseFrom(input); 445 | } 446 | public static events.ErrorOuterClass.Error parseFrom( 447 | com.google.protobuf.CodedInputStream input, 448 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 449 | throws java.io.IOException { 450 | return PARSER.parseFrom(input, extensionRegistry); 451 | } 452 | 453 | public static Builder newBuilder() { return Builder.create(); } 454 | public Builder newBuilderForType() { return newBuilder(); } 455 | public static Builder newBuilder(events.ErrorOuterClass.Error prototype) { 456 | return newBuilder().mergeFrom(prototype); 457 | } 458 | public Builder toBuilder() { return newBuilder(this); } 459 | 460 | @Override 461 | protected Builder newBuilderForType( 462 | BuilderParent parent) { 463 | Builder builder = new Builder(parent); 464 | return builder; 465 | } 466 | /** 467 | * Protobuf type {@code events.Error} 468 | * 469 | *
470 |      */ An Error event represents an error in the originating process.
471 |      * 
472 | */ 473 | public static final class Builder extends 474 | com.google.protobuf.GeneratedMessage.Builder implements 475 | // @@protoc_insertion_point(builder_implements:events.Error) 476 | events.ErrorOuterClass.ErrorOrBuilder { 477 | public static final com.google.protobuf.Descriptors.Descriptor 478 | getDescriptor() { 479 | return events.ErrorOuterClass.internal_static_events_Error_descriptor; 480 | } 481 | 482 | protected FieldAccessorTable 483 | internalGetFieldAccessorTable() { 484 | return events.ErrorOuterClass.internal_static_events_Error_fieldAccessorTable 485 | .ensureFieldAccessorsInitialized( 486 | events.ErrorOuterClass.Error.class, events.ErrorOuterClass.Error.Builder.class); 487 | } 488 | 489 | // Construct using events.ErrorOuterClass.Error.newBuilder() 490 | private Builder() { 491 | maybeForceBuilderInitialization(); 492 | } 493 | 494 | private Builder( 495 | BuilderParent parent) { 496 | super(parent); 497 | maybeForceBuilderInitialization(); 498 | } 499 | private void maybeForceBuilderInitialization() { 500 | if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { 501 | } 502 | } 503 | private static Builder create() { 504 | return new Builder(); 505 | } 506 | 507 | public Builder clear() { 508 | super.clear(); 509 | source_ = ""; 510 | bitField0_ = (bitField0_ & ~0x00000001); 511 | code_ = 0; 512 | bitField0_ = (bitField0_ & ~0x00000002); 513 | message_ = ""; 514 | bitField0_ = (bitField0_ & ~0x00000004); 515 | return this; 516 | } 517 | 518 | public Builder clone() { 519 | return create().mergeFrom(buildPartial()); 520 | } 521 | 522 | public com.google.protobuf.Descriptors.Descriptor 523 | getDescriptorForType() { 524 | return events.ErrorOuterClass.internal_static_events_Error_descriptor; 525 | } 526 | 527 | public events.ErrorOuterClass.Error getDefaultInstanceForType() { 528 | return events.ErrorOuterClass.Error.getDefaultInstance(); 529 | } 530 | 531 | public events.ErrorOuterClass.Error build() { 532 | events.ErrorOuterClass.Error result = buildPartial(); 533 | if (!result.isInitialized()) { 534 | throw newUninitializedMessageException(result); 535 | } 536 | return result; 537 | } 538 | 539 | public events.ErrorOuterClass.Error buildPartial() { 540 | events.ErrorOuterClass.Error result = new events.ErrorOuterClass.Error(this); 541 | int from_bitField0_ = bitField0_; 542 | int to_bitField0_ = 0; 543 | if (((from_bitField0_ & 0x00000001) == 0x00000001)) { 544 | to_bitField0_ |= 0x00000001; 545 | } 546 | result.source_ = source_; 547 | if (((from_bitField0_ & 0x00000002) == 0x00000002)) { 548 | to_bitField0_ |= 0x00000002; 549 | } 550 | result.code_ = code_; 551 | if (((from_bitField0_ & 0x00000004) == 0x00000004)) { 552 | to_bitField0_ |= 0x00000004; 553 | } 554 | result.message_ = message_; 555 | result.bitField0_ = to_bitField0_; 556 | onBuilt(); 557 | return result; 558 | } 559 | 560 | public Builder mergeFrom(com.google.protobuf.Message other) { 561 | if (other instanceof events.ErrorOuterClass.Error) { 562 | return mergeFrom((events.ErrorOuterClass.Error)other); 563 | } else { 564 | super.mergeFrom(other); 565 | return this; 566 | } 567 | } 568 | 569 | public Builder mergeFrom(events.ErrorOuterClass.Error other) { 570 | if (other == events.ErrorOuterClass.Error.getDefaultInstance()) return this; 571 | if (other.hasSource()) { 572 | bitField0_ |= 0x00000001; 573 | source_ = other.source_; 574 | onChanged(); 575 | } 576 | if (other.hasCode()) { 577 | setCode(other.getCode()); 578 | } 579 | if (other.hasMessage()) { 580 | bitField0_ |= 0x00000004; 581 | message_ = other.message_; 582 | onChanged(); 583 | } 584 | this.mergeUnknownFields(other.getUnknownFields()); 585 | return this; 586 | } 587 | 588 | public final boolean isInitialized() { 589 | if (!hasSource()) { 590 | 591 | return false; 592 | } 593 | if (!hasCode()) { 594 | 595 | return false; 596 | } 597 | if (!hasMessage()) { 598 | 599 | return false; 600 | } 601 | return true; 602 | } 603 | 604 | public Builder mergeFrom( 605 | com.google.protobuf.CodedInputStream input, 606 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 607 | throws java.io.IOException { 608 | events.ErrorOuterClass.Error parsedMessage = null; 609 | try { 610 | parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); 611 | } catch (com.google.protobuf.InvalidProtocolBufferException e) { 612 | parsedMessage = (events.ErrorOuterClass.Error) e.getUnfinishedMessage(); 613 | throw e; 614 | } finally { 615 | if (parsedMessage != null) { 616 | mergeFrom(parsedMessage); 617 | } 618 | } 619 | return this; 620 | } 621 | private int bitField0_; 622 | 623 | private Object source_ = ""; 624 | /** 625 | * required string source = 1; 626 | * 627 | *
628 |        */ Source of the error. This may or may not be the same as the Origin in the envelope.
629 |        * 
630 | */ 631 | public boolean hasSource() { 632 | return ((bitField0_ & 0x00000001) == 0x00000001); 633 | } 634 | /** 635 | * required string source = 1; 636 | * 637 | *
638 |        */ Source of the error. This may or may not be the same as the Origin in the envelope.
639 |        * 
640 | */ 641 | public String getSource() { 642 | Object ref = source_; 643 | if (!(ref instanceof String)) { 644 | com.google.protobuf.ByteString bs = 645 | (com.google.protobuf.ByteString) ref; 646 | String s = bs.toStringUtf8(); 647 | if (bs.isValidUtf8()) { 648 | source_ = s; 649 | } 650 | return s; 651 | } else { 652 | return (String) ref; 653 | } 654 | } 655 | /** 656 | * required string source = 1; 657 | * 658 | *
659 |        */ Source of the error. This may or may not be the same as the Origin in the envelope.
660 |        * 
661 | */ 662 | public com.google.protobuf.ByteString 663 | getSourceBytes() { 664 | Object ref = source_; 665 | if (ref instanceof String) { 666 | com.google.protobuf.ByteString b = 667 | com.google.protobuf.ByteString.copyFromUtf8( 668 | (String) ref); 669 | source_ = b; 670 | return b; 671 | } else { 672 | return (com.google.protobuf.ByteString) ref; 673 | } 674 | } 675 | /** 676 | * required string source = 1; 677 | * 678 | *
679 |        */ Source of the error. This may or may not be the same as the Origin in the envelope.
680 |        * 
681 | */ 682 | public Builder setSource( 683 | String value) { 684 | if (value == null) { 685 | throw new NullPointerException(); 686 | } 687 | bitField0_ |= 0x00000001; 688 | source_ = value; 689 | onChanged(); 690 | return this; 691 | } 692 | /** 693 | * required string source = 1; 694 | * 695 | *
696 |        */ Source of the error. This may or may not be the same as the Origin in the envelope.
697 |        * 
698 | */ 699 | public Builder clearSource() { 700 | bitField0_ = (bitField0_ & ~0x00000001); 701 | source_ = getDefaultInstance().getSource(); 702 | onChanged(); 703 | return this; 704 | } 705 | /** 706 | * required string source = 1; 707 | * 708 | *
709 |        */ Source of the error. This may or may not be the same as the Origin in the envelope.
710 |        * 
711 | */ 712 | public Builder setSourceBytes( 713 | com.google.protobuf.ByteString value) { 714 | if (value == null) { 715 | throw new NullPointerException(); 716 | } 717 | bitField0_ |= 0x00000001; 718 | source_ = value; 719 | onChanged(); 720 | return this; 721 | } 722 | 723 | private int code_ ; 724 | /** 725 | * required int32 code = 2; 726 | * 727 | *
728 |        */ Numeric error code. This is provided for programmatic responses to the error.
729 |        * 
730 | */ 731 | public boolean hasCode() { 732 | return ((bitField0_ & 0x00000002) == 0x00000002); 733 | } 734 | /** 735 | * required int32 code = 2; 736 | * 737 | *
738 |        */ Numeric error code. This is provided for programmatic responses to the error.
739 |        * 
740 | */ 741 | public int getCode() { 742 | return code_; 743 | } 744 | /** 745 | * required int32 code = 2; 746 | * 747 | *
748 |        */ Numeric error code. This is provided for programmatic responses to the error.
749 |        * 
750 | */ 751 | public Builder setCode(int value) { 752 | bitField0_ |= 0x00000002; 753 | code_ = value; 754 | onChanged(); 755 | return this; 756 | } 757 | /** 758 | * required int32 code = 2; 759 | * 760 | *
761 |        */ Numeric error code. This is provided for programmatic responses to the error.
762 |        * 
763 | */ 764 | public Builder clearCode() { 765 | bitField0_ = (bitField0_ & ~0x00000002); 766 | code_ = 0; 767 | onChanged(); 768 | return this; 769 | } 770 | 771 | private Object message_ = ""; 772 | /** 773 | * required string message = 3; 774 | * 775 | *
776 |        */ Error description (preferably human-readable).
777 |        * 
778 | */ 779 | public boolean hasMessage() { 780 | return ((bitField0_ & 0x00000004) == 0x00000004); 781 | } 782 | /** 783 | * required string message = 3; 784 | * 785 | *
786 |        */ Error description (preferably human-readable).
787 |        * 
788 | */ 789 | public String getMessage() { 790 | Object ref = message_; 791 | if (!(ref instanceof String)) { 792 | com.google.protobuf.ByteString bs = 793 | (com.google.protobuf.ByteString) ref; 794 | String s = bs.toStringUtf8(); 795 | if (bs.isValidUtf8()) { 796 | message_ = s; 797 | } 798 | return s; 799 | } else { 800 | return (String) ref; 801 | } 802 | } 803 | /** 804 | * required string message = 3; 805 | * 806 | *
807 |        */ Error description (preferably human-readable).
808 |        * 
809 | */ 810 | public com.google.protobuf.ByteString 811 | getMessageBytes() { 812 | Object ref = message_; 813 | if (ref instanceof String) { 814 | com.google.protobuf.ByteString b = 815 | com.google.protobuf.ByteString.copyFromUtf8( 816 | (String) ref); 817 | message_ = b; 818 | return b; 819 | } else { 820 | return (com.google.protobuf.ByteString) ref; 821 | } 822 | } 823 | /** 824 | * required string message = 3; 825 | * 826 | *
827 |        */ Error description (preferably human-readable).
828 |        * 
829 | */ 830 | public Builder setMessage( 831 | String value) { 832 | if (value == null) { 833 | throw new NullPointerException(); 834 | } 835 | bitField0_ |= 0x00000004; 836 | message_ = value; 837 | onChanged(); 838 | return this; 839 | } 840 | /** 841 | * required string message = 3; 842 | * 843 | *
844 |        */ Error description (preferably human-readable).
845 |        * 
846 | */ 847 | public Builder clearMessage() { 848 | bitField0_ = (bitField0_ & ~0x00000004); 849 | message_ = getDefaultInstance().getMessage(); 850 | onChanged(); 851 | return this; 852 | } 853 | /** 854 | * required string message = 3; 855 | * 856 | *
857 |        */ Error description (preferably human-readable).
858 |        * 
859 | */ 860 | public Builder setMessageBytes( 861 | com.google.protobuf.ByteString value) { 862 | if (value == null) { 863 | throw new NullPointerException(); 864 | } 865 | bitField0_ |= 0x00000004; 866 | message_ = value; 867 | onChanged(); 868 | return this; 869 | } 870 | 871 | // @@protoc_insertion_point(builder_scope:events.Error) 872 | } 873 | 874 | static { 875 | defaultInstance = new Error(true); 876 | defaultInstance.initFields(); 877 | } 878 | 879 | // @@protoc_insertion_point(class_scope:events.Error) 880 | } 881 | 882 | private static final com.google.protobuf.Descriptors.Descriptor 883 | internal_static_events_Error_descriptor; 884 | private static 885 | com.google.protobuf.GeneratedMessage.FieldAccessorTable 886 | internal_static_events_Error_fieldAccessorTable; 887 | 888 | public static com.google.protobuf.Descriptors.FileDescriptor 889 | getDescriptor() { 890 | return descriptor; 891 | } 892 | private static com.google.protobuf.Descriptors.FileDescriptor 893 | descriptor; 894 | static { 895 | String[] descriptorData = { 896 | "\n\013error.proto\022\006events\"6\n\005Error\022\016\n\006source" + 897 | "\030\001 \002(\t\022\014\n\004code\030\002 \002(\005\022\017\n\007message\030\003 \002(\t" 898 | }; 899 | com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = 900 | new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { 901 | public com.google.protobuf.ExtensionRegistry assignDescriptors( 902 | com.google.protobuf.Descriptors.FileDescriptor root) { 903 | descriptor = root; 904 | return null; 905 | } 906 | }; 907 | com.google.protobuf.Descriptors.FileDescriptor 908 | .internalBuildGeneratedFileFrom(descriptorData, 909 | new com.google.protobuf.Descriptors.FileDescriptor[] { 910 | }, assigner); 911 | internal_static_events_Error_descriptor = 912 | getDescriptor().getMessageTypes().get(0); 913 | internal_static_events_Error_fieldAccessorTable = new 914 | com.google.protobuf.GeneratedMessage.FieldAccessorTable( 915 | internal_static_events_Error_descriptor, 916 | new String[] { "Source", "Code", "Message", }); 917 | } 918 | 919 | // @@protoc_insertion_point(outer_class_scope) 920 | } 921 | -------------------------------------------------------------------------------- /src/main/java/events/HeartbeatOuterClass.java: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: heartbeat.proto 3 | 4 | package events; 5 | 6 | public final class HeartbeatOuterClass { 7 | private HeartbeatOuterClass() {} 8 | public static void registerAllExtensions( 9 | com.google.protobuf.ExtensionRegistry registry) { 10 | } 11 | public interface HeartbeatOrBuilder extends 12 | // @@protoc_insertion_point(interface_extends:events.Heartbeat) 13 | com.google.protobuf.MessageOrBuilder { 14 | 15 | /** 16 | * required uint64 sentCount = 1; 17 | * 18 | *
 19 |      */ Number of events sent by this emitter.
 20 |      * 
21 | */ 22 | boolean hasSentCount(); 23 | /** 24 | * required uint64 sentCount = 1; 25 | * 26 | *
 27 |      */ Number of events sent by this emitter.
 28 |      * 
29 | */ 30 | long getSentCount(); 31 | 32 | /** 33 | * required uint64 receivedCount = 2; 34 | * 35 | *
 36 |      */ Number of events received by this emitter from the host process.
 37 |      * 
38 | */ 39 | boolean hasReceivedCount(); 40 | /** 41 | * required uint64 receivedCount = 2; 42 | * 43 | *
 44 |      */ Number of events received by this emitter from the host process.
 45 |      * 
46 | */ 47 | long getReceivedCount(); 48 | 49 | /** 50 | * required uint64 errorCount = 3; 51 | * 52 | *
 53 |      */ Number of errors encountered while sending.
 54 |      * 
55 | */ 56 | boolean hasErrorCount(); 57 | /** 58 | * required uint64 errorCount = 3; 59 | * 60 | *
 61 |      */ Number of errors encountered while sending.
 62 |      * 
63 | */ 64 | long getErrorCount(); 65 | 66 | /** 67 | * optional .events.UUID controlMessageIdentifier = 4; 68 | * 69 | *
 70 |      */ The id of the control message which requested this heartbeat
 71 |      * 
72 | */ 73 | boolean hasControlMessageIdentifier(); 74 | /** 75 | * optional .events.UUID controlMessageIdentifier = 4; 76 | * 77 | *
 78 |      */ The id of the control message which requested this heartbeat
 79 |      * 
80 | */ 81 | events.Uuid.UUID getControlMessageIdentifier(); 82 | /** 83 | * optional .events.UUID controlMessageIdentifier = 4; 84 | * 85 | *
 86 |      */ The id of the control message which requested this heartbeat
 87 |      * 
88 | */ 89 | events.Uuid.UUIDOrBuilder getControlMessageIdentifierOrBuilder(); 90 | } 91 | /** 92 | * Protobuf type {@code events.Heartbeat} 93 | * 94 | *
 95 |    */ A Heartbeat event both indicates liveness of the emitter, and communicates counts of events processed.
 96 |    * 
97 | */ 98 | public static final class Heartbeat extends 99 | com.google.protobuf.GeneratedMessage implements 100 | // @@protoc_insertion_point(message_implements:events.Heartbeat) 101 | HeartbeatOrBuilder { 102 | // Use Heartbeat.newBuilder() to construct. 103 | private Heartbeat(com.google.protobuf.GeneratedMessage.Builder builder) { 104 | super(builder); 105 | this.unknownFields = builder.getUnknownFields(); 106 | } 107 | private Heartbeat(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } 108 | 109 | private static final Heartbeat defaultInstance; 110 | public static Heartbeat getDefaultInstance() { 111 | return defaultInstance; 112 | } 113 | 114 | public Heartbeat getDefaultInstanceForType() { 115 | return defaultInstance; 116 | } 117 | 118 | private final com.google.protobuf.UnknownFieldSet unknownFields; 119 | @Override 120 | public final com.google.protobuf.UnknownFieldSet 121 | getUnknownFields() { 122 | return this.unknownFields; 123 | } 124 | private Heartbeat( 125 | com.google.protobuf.CodedInputStream input, 126 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 127 | throws com.google.protobuf.InvalidProtocolBufferException { 128 | initFields(); 129 | int mutable_bitField0_ = 0; 130 | com.google.protobuf.UnknownFieldSet.Builder unknownFields = 131 | com.google.protobuf.UnknownFieldSet.newBuilder(); 132 | try { 133 | boolean done = false; 134 | while (!done) { 135 | int tag = input.readTag(); 136 | switch (tag) { 137 | case 0: 138 | done = true; 139 | break; 140 | default: { 141 | if (!parseUnknownField(input, unknownFields, 142 | extensionRegistry, tag)) { 143 | done = true; 144 | } 145 | break; 146 | } 147 | case 8: { 148 | bitField0_ |= 0x00000001; 149 | sentCount_ = input.readUInt64(); 150 | break; 151 | } 152 | case 16: { 153 | bitField0_ |= 0x00000002; 154 | receivedCount_ = input.readUInt64(); 155 | break; 156 | } 157 | case 24: { 158 | bitField0_ |= 0x00000004; 159 | errorCount_ = input.readUInt64(); 160 | break; 161 | } 162 | case 34: { 163 | events.Uuid.UUID.Builder subBuilder = null; 164 | if (((bitField0_ & 0x00000008) == 0x00000008)) { 165 | subBuilder = controlMessageIdentifier_.toBuilder(); 166 | } 167 | controlMessageIdentifier_ = input.readMessage(events.Uuid.UUID.PARSER, extensionRegistry); 168 | if (subBuilder != null) { 169 | subBuilder.mergeFrom(controlMessageIdentifier_); 170 | controlMessageIdentifier_ = subBuilder.buildPartial(); 171 | } 172 | bitField0_ |= 0x00000008; 173 | break; 174 | } 175 | } 176 | } 177 | } catch (com.google.protobuf.InvalidProtocolBufferException e) { 178 | throw e.setUnfinishedMessage(this); 179 | } catch (java.io.IOException e) { 180 | throw new com.google.protobuf.InvalidProtocolBufferException( 181 | e.getMessage()).setUnfinishedMessage(this); 182 | } finally { 183 | this.unknownFields = unknownFields.build(); 184 | makeExtensionsImmutable(); 185 | } 186 | } 187 | public static final com.google.protobuf.Descriptors.Descriptor 188 | getDescriptor() { 189 | return events.HeartbeatOuterClass.internal_static_events_Heartbeat_descriptor; 190 | } 191 | 192 | protected FieldAccessorTable 193 | internalGetFieldAccessorTable() { 194 | return events.HeartbeatOuterClass.internal_static_events_Heartbeat_fieldAccessorTable 195 | .ensureFieldAccessorsInitialized( 196 | events.HeartbeatOuterClass.Heartbeat.class, events.HeartbeatOuterClass.Heartbeat.Builder.class); 197 | } 198 | 199 | public static com.google.protobuf.Parser PARSER = 200 | new com.google.protobuf.AbstractParser() { 201 | public Heartbeat parsePartialFrom( 202 | com.google.protobuf.CodedInputStream input, 203 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 204 | throws com.google.protobuf.InvalidProtocolBufferException { 205 | return new Heartbeat(input, extensionRegistry); 206 | } 207 | }; 208 | 209 | @Override 210 | public com.google.protobuf.Parser getParserForType() { 211 | return PARSER; 212 | } 213 | 214 | private int bitField0_; 215 | public static final int SENTCOUNT_FIELD_NUMBER = 1; 216 | private long sentCount_; 217 | /** 218 | * required uint64 sentCount = 1; 219 | * 220 | *
221 |      */ Number of events sent by this emitter.
222 |      * 
223 | */ 224 | public boolean hasSentCount() { 225 | return ((bitField0_ & 0x00000001) == 0x00000001); 226 | } 227 | /** 228 | * required uint64 sentCount = 1; 229 | * 230 | *
231 |      */ Number of events sent by this emitter.
232 |      * 
233 | */ 234 | public long getSentCount() { 235 | return sentCount_; 236 | } 237 | 238 | public static final int RECEIVEDCOUNT_FIELD_NUMBER = 2; 239 | private long receivedCount_; 240 | /** 241 | * required uint64 receivedCount = 2; 242 | * 243 | *
244 |      */ Number of events received by this emitter from the host process.
245 |      * 
246 | */ 247 | public boolean hasReceivedCount() { 248 | return ((bitField0_ & 0x00000002) == 0x00000002); 249 | } 250 | /** 251 | * required uint64 receivedCount = 2; 252 | * 253 | *
254 |      */ Number of events received by this emitter from the host process.
255 |      * 
256 | */ 257 | public long getReceivedCount() { 258 | return receivedCount_; 259 | } 260 | 261 | public static final int ERRORCOUNT_FIELD_NUMBER = 3; 262 | private long errorCount_; 263 | /** 264 | * required uint64 errorCount = 3; 265 | * 266 | *
267 |      */ Number of errors encountered while sending.
268 |      * 
269 | */ 270 | public boolean hasErrorCount() { 271 | return ((bitField0_ & 0x00000004) == 0x00000004); 272 | } 273 | /** 274 | * required uint64 errorCount = 3; 275 | * 276 | *
277 |      */ Number of errors encountered while sending.
278 |      * 
279 | */ 280 | public long getErrorCount() { 281 | return errorCount_; 282 | } 283 | 284 | public static final int CONTROLMESSAGEIDENTIFIER_FIELD_NUMBER = 4; 285 | private events.Uuid.UUID controlMessageIdentifier_; 286 | /** 287 | * optional .events.UUID controlMessageIdentifier = 4; 288 | * 289 | *
290 |      */ The id of the control message which requested this heartbeat
291 |      * 
292 | */ 293 | public boolean hasControlMessageIdentifier() { 294 | return ((bitField0_ & 0x00000008) == 0x00000008); 295 | } 296 | /** 297 | * optional .events.UUID controlMessageIdentifier = 4; 298 | * 299 | *
300 |      */ The id of the control message which requested this heartbeat
301 |      * 
302 | */ 303 | public events.Uuid.UUID getControlMessageIdentifier() { 304 | return controlMessageIdentifier_; 305 | } 306 | /** 307 | * optional .events.UUID controlMessageIdentifier = 4; 308 | * 309 | *
310 |      */ The id of the control message which requested this heartbeat
311 |      * 
312 | */ 313 | public events.Uuid.UUIDOrBuilder getControlMessageIdentifierOrBuilder() { 314 | return controlMessageIdentifier_; 315 | } 316 | 317 | private void initFields() { 318 | sentCount_ = 0L; 319 | receivedCount_ = 0L; 320 | errorCount_ = 0L; 321 | controlMessageIdentifier_ = events.Uuid.UUID.getDefaultInstance(); 322 | } 323 | private byte memoizedIsInitialized = -1; 324 | public final boolean isInitialized() { 325 | byte isInitialized = memoizedIsInitialized; 326 | if (isInitialized == 1) return true; 327 | if (isInitialized == 0) return false; 328 | 329 | if (!hasSentCount()) { 330 | memoizedIsInitialized = 0; 331 | return false; 332 | } 333 | if (!hasReceivedCount()) { 334 | memoizedIsInitialized = 0; 335 | return false; 336 | } 337 | if (!hasErrorCount()) { 338 | memoizedIsInitialized = 0; 339 | return false; 340 | } 341 | if (hasControlMessageIdentifier()) { 342 | if (!getControlMessageIdentifier().isInitialized()) { 343 | memoizedIsInitialized = 0; 344 | return false; 345 | } 346 | } 347 | memoizedIsInitialized = 1; 348 | return true; 349 | } 350 | 351 | public void writeTo(com.google.protobuf.CodedOutputStream output) 352 | throws java.io.IOException { 353 | getSerializedSize(); 354 | if (((bitField0_ & 0x00000001) == 0x00000001)) { 355 | output.writeUInt64(1, sentCount_); 356 | } 357 | if (((bitField0_ & 0x00000002) == 0x00000002)) { 358 | output.writeUInt64(2, receivedCount_); 359 | } 360 | if (((bitField0_ & 0x00000004) == 0x00000004)) { 361 | output.writeUInt64(3, errorCount_); 362 | } 363 | if (((bitField0_ & 0x00000008) == 0x00000008)) { 364 | output.writeMessage(4, controlMessageIdentifier_); 365 | } 366 | getUnknownFields().writeTo(output); 367 | } 368 | 369 | private int memoizedSerializedSize = -1; 370 | public int getSerializedSize() { 371 | int size = memoizedSerializedSize; 372 | if (size != -1) return size; 373 | 374 | size = 0; 375 | if (((bitField0_ & 0x00000001) == 0x00000001)) { 376 | size += com.google.protobuf.CodedOutputStream 377 | .computeUInt64Size(1, sentCount_); 378 | } 379 | if (((bitField0_ & 0x00000002) == 0x00000002)) { 380 | size += com.google.protobuf.CodedOutputStream 381 | .computeUInt64Size(2, receivedCount_); 382 | } 383 | if (((bitField0_ & 0x00000004) == 0x00000004)) { 384 | size += com.google.protobuf.CodedOutputStream 385 | .computeUInt64Size(3, errorCount_); 386 | } 387 | if (((bitField0_ & 0x00000008) == 0x00000008)) { 388 | size += com.google.protobuf.CodedOutputStream 389 | .computeMessageSize(4, controlMessageIdentifier_); 390 | } 391 | size += getUnknownFields().getSerializedSize(); 392 | memoizedSerializedSize = size; 393 | return size; 394 | } 395 | 396 | private static final long serialVersionUID = 0L; 397 | @Override 398 | protected Object writeReplace() 399 | throws java.io.ObjectStreamException { 400 | return super.writeReplace(); 401 | } 402 | 403 | public static events.HeartbeatOuterClass.Heartbeat parseFrom( 404 | com.google.protobuf.ByteString data) 405 | throws com.google.protobuf.InvalidProtocolBufferException { 406 | return PARSER.parseFrom(data); 407 | } 408 | public static events.HeartbeatOuterClass.Heartbeat parseFrom( 409 | com.google.protobuf.ByteString data, 410 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 411 | throws com.google.protobuf.InvalidProtocolBufferException { 412 | return PARSER.parseFrom(data, extensionRegistry); 413 | } 414 | public static events.HeartbeatOuterClass.Heartbeat parseFrom(byte[] data) 415 | throws com.google.protobuf.InvalidProtocolBufferException { 416 | return PARSER.parseFrom(data); 417 | } 418 | public static events.HeartbeatOuterClass.Heartbeat parseFrom( 419 | byte[] data, 420 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 421 | throws com.google.protobuf.InvalidProtocolBufferException { 422 | return PARSER.parseFrom(data, extensionRegistry); 423 | } 424 | public static events.HeartbeatOuterClass.Heartbeat parseFrom(java.io.InputStream input) 425 | throws java.io.IOException { 426 | return PARSER.parseFrom(input); 427 | } 428 | public static events.HeartbeatOuterClass.Heartbeat parseFrom( 429 | java.io.InputStream input, 430 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 431 | throws java.io.IOException { 432 | return PARSER.parseFrom(input, extensionRegistry); 433 | } 434 | public static events.HeartbeatOuterClass.Heartbeat parseDelimitedFrom(java.io.InputStream input) 435 | throws java.io.IOException { 436 | return PARSER.parseDelimitedFrom(input); 437 | } 438 | public static events.HeartbeatOuterClass.Heartbeat parseDelimitedFrom( 439 | java.io.InputStream input, 440 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 441 | throws java.io.IOException { 442 | return PARSER.parseDelimitedFrom(input, extensionRegistry); 443 | } 444 | public static events.HeartbeatOuterClass.Heartbeat parseFrom( 445 | com.google.protobuf.CodedInputStream input) 446 | throws java.io.IOException { 447 | return PARSER.parseFrom(input); 448 | } 449 | public static events.HeartbeatOuterClass.Heartbeat parseFrom( 450 | com.google.protobuf.CodedInputStream input, 451 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 452 | throws java.io.IOException { 453 | return PARSER.parseFrom(input, extensionRegistry); 454 | } 455 | 456 | public static Builder newBuilder() { return Builder.create(); } 457 | public Builder newBuilderForType() { return newBuilder(); } 458 | public static Builder newBuilder(events.HeartbeatOuterClass.Heartbeat prototype) { 459 | return newBuilder().mergeFrom(prototype); 460 | } 461 | public Builder toBuilder() { return newBuilder(this); } 462 | 463 | @Override 464 | protected Builder newBuilderForType( 465 | BuilderParent parent) { 466 | Builder builder = new Builder(parent); 467 | return builder; 468 | } 469 | /** 470 | * Protobuf type {@code events.Heartbeat} 471 | * 472 | *
473 |      */ A Heartbeat event both indicates liveness of the emitter, and communicates counts of events processed.
474 |      * 
475 | */ 476 | public static final class Builder extends 477 | com.google.protobuf.GeneratedMessage.Builder implements 478 | // @@protoc_insertion_point(builder_implements:events.Heartbeat) 479 | events.HeartbeatOuterClass.HeartbeatOrBuilder { 480 | public static final com.google.protobuf.Descriptors.Descriptor 481 | getDescriptor() { 482 | return events.HeartbeatOuterClass.internal_static_events_Heartbeat_descriptor; 483 | } 484 | 485 | protected FieldAccessorTable 486 | internalGetFieldAccessorTable() { 487 | return events.HeartbeatOuterClass.internal_static_events_Heartbeat_fieldAccessorTable 488 | .ensureFieldAccessorsInitialized( 489 | events.HeartbeatOuterClass.Heartbeat.class, events.HeartbeatOuterClass.Heartbeat.Builder.class); 490 | } 491 | 492 | // Construct using events.HeartbeatOuterClass.Heartbeat.newBuilder() 493 | private Builder() { 494 | maybeForceBuilderInitialization(); 495 | } 496 | 497 | private Builder( 498 | BuilderParent parent) { 499 | super(parent); 500 | maybeForceBuilderInitialization(); 501 | } 502 | private void maybeForceBuilderInitialization() { 503 | if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { 504 | getControlMessageIdentifierFieldBuilder(); 505 | } 506 | } 507 | private static Builder create() { 508 | return new Builder(); 509 | } 510 | 511 | public Builder clear() { 512 | super.clear(); 513 | sentCount_ = 0L; 514 | bitField0_ = (bitField0_ & ~0x00000001); 515 | receivedCount_ = 0L; 516 | bitField0_ = (bitField0_ & ~0x00000002); 517 | errorCount_ = 0L; 518 | bitField0_ = (bitField0_ & ~0x00000004); 519 | if (controlMessageIdentifierBuilder_ == null) { 520 | controlMessageIdentifier_ = events.Uuid.UUID.getDefaultInstance(); 521 | } else { 522 | controlMessageIdentifierBuilder_.clear(); 523 | } 524 | bitField0_ = (bitField0_ & ~0x00000008); 525 | return this; 526 | } 527 | 528 | public Builder clone() { 529 | return create().mergeFrom(buildPartial()); 530 | } 531 | 532 | public com.google.protobuf.Descriptors.Descriptor 533 | getDescriptorForType() { 534 | return events.HeartbeatOuterClass.internal_static_events_Heartbeat_descriptor; 535 | } 536 | 537 | public events.HeartbeatOuterClass.Heartbeat getDefaultInstanceForType() { 538 | return events.HeartbeatOuterClass.Heartbeat.getDefaultInstance(); 539 | } 540 | 541 | public events.HeartbeatOuterClass.Heartbeat build() { 542 | events.HeartbeatOuterClass.Heartbeat result = buildPartial(); 543 | if (!result.isInitialized()) { 544 | throw newUninitializedMessageException(result); 545 | } 546 | return result; 547 | } 548 | 549 | public events.HeartbeatOuterClass.Heartbeat buildPartial() { 550 | events.HeartbeatOuterClass.Heartbeat result = new events.HeartbeatOuterClass.Heartbeat(this); 551 | int from_bitField0_ = bitField0_; 552 | int to_bitField0_ = 0; 553 | if (((from_bitField0_ & 0x00000001) == 0x00000001)) { 554 | to_bitField0_ |= 0x00000001; 555 | } 556 | result.sentCount_ = sentCount_; 557 | if (((from_bitField0_ & 0x00000002) == 0x00000002)) { 558 | to_bitField0_ |= 0x00000002; 559 | } 560 | result.receivedCount_ = receivedCount_; 561 | if (((from_bitField0_ & 0x00000004) == 0x00000004)) { 562 | to_bitField0_ |= 0x00000004; 563 | } 564 | result.errorCount_ = errorCount_; 565 | if (((from_bitField0_ & 0x00000008) == 0x00000008)) { 566 | to_bitField0_ |= 0x00000008; 567 | } 568 | if (controlMessageIdentifierBuilder_ == null) { 569 | result.controlMessageIdentifier_ = controlMessageIdentifier_; 570 | } else { 571 | result.controlMessageIdentifier_ = controlMessageIdentifierBuilder_.build(); 572 | } 573 | result.bitField0_ = to_bitField0_; 574 | onBuilt(); 575 | return result; 576 | } 577 | 578 | public Builder mergeFrom(com.google.protobuf.Message other) { 579 | if (other instanceof events.HeartbeatOuterClass.Heartbeat) { 580 | return mergeFrom((events.HeartbeatOuterClass.Heartbeat)other); 581 | } else { 582 | super.mergeFrom(other); 583 | return this; 584 | } 585 | } 586 | 587 | public Builder mergeFrom(events.HeartbeatOuterClass.Heartbeat other) { 588 | if (other == events.HeartbeatOuterClass.Heartbeat.getDefaultInstance()) return this; 589 | if (other.hasSentCount()) { 590 | setSentCount(other.getSentCount()); 591 | } 592 | if (other.hasReceivedCount()) { 593 | setReceivedCount(other.getReceivedCount()); 594 | } 595 | if (other.hasErrorCount()) { 596 | setErrorCount(other.getErrorCount()); 597 | } 598 | if (other.hasControlMessageIdentifier()) { 599 | mergeControlMessageIdentifier(other.getControlMessageIdentifier()); 600 | } 601 | this.mergeUnknownFields(other.getUnknownFields()); 602 | return this; 603 | } 604 | 605 | public final boolean isInitialized() { 606 | if (!hasSentCount()) { 607 | 608 | return false; 609 | } 610 | if (!hasReceivedCount()) { 611 | 612 | return false; 613 | } 614 | if (!hasErrorCount()) { 615 | 616 | return false; 617 | } 618 | if (hasControlMessageIdentifier()) { 619 | if (!getControlMessageIdentifier().isInitialized()) { 620 | 621 | return false; 622 | } 623 | } 624 | return true; 625 | } 626 | 627 | public Builder mergeFrom( 628 | com.google.protobuf.CodedInputStream input, 629 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 630 | throws java.io.IOException { 631 | events.HeartbeatOuterClass.Heartbeat parsedMessage = null; 632 | try { 633 | parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); 634 | } catch (com.google.protobuf.InvalidProtocolBufferException e) { 635 | parsedMessage = (events.HeartbeatOuterClass.Heartbeat) e.getUnfinishedMessage(); 636 | throw e; 637 | } finally { 638 | if (parsedMessage != null) { 639 | mergeFrom(parsedMessage); 640 | } 641 | } 642 | return this; 643 | } 644 | private int bitField0_; 645 | 646 | private long sentCount_ ; 647 | /** 648 | * required uint64 sentCount = 1; 649 | * 650 | *
651 |        */ Number of events sent by this emitter.
652 |        * 
653 | */ 654 | public boolean hasSentCount() { 655 | return ((bitField0_ & 0x00000001) == 0x00000001); 656 | } 657 | /** 658 | * required uint64 sentCount = 1; 659 | * 660 | *
661 |        */ Number of events sent by this emitter.
662 |        * 
663 | */ 664 | public long getSentCount() { 665 | return sentCount_; 666 | } 667 | /** 668 | * required uint64 sentCount = 1; 669 | * 670 | *
671 |        */ Number of events sent by this emitter.
672 |        * 
673 | */ 674 | public Builder setSentCount(long value) { 675 | bitField0_ |= 0x00000001; 676 | sentCount_ = value; 677 | onChanged(); 678 | return this; 679 | } 680 | /** 681 | * required uint64 sentCount = 1; 682 | * 683 | *
684 |        */ Number of events sent by this emitter.
685 |        * 
686 | */ 687 | public Builder clearSentCount() { 688 | bitField0_ = (bitField0_ & ~0x00000001); 689 | sentCount_ = 0L; 690 | onChanged(); 691 | return this; 692 | } 693 | 694 | private long receivedCount_ ; 695 | /** 696 | * required uint64 receivedCount = 2; 697 | * 698 | *
699 |        */ Number of events received by this emitter from the host process.
700 |        * 
701 | */ 702 | public boolean hasReceivedCount() { 703 | return ((bitField0_ & 0x00000002) == 0x00000002); 704 | } 705 | /** 706 | * required uint64 receivedCount = 2; 707 | * 708 | *
709 |        */ Number of events received by this emitter from the host process.
710 |        * 
711 | */ 712 | public long getReceivedCount() { 713 | return receivedCount_; 714 | } 715 | /** 716 | * required uint64 receivedCount = 2; 717 | * 718 | *
719 |        */ Number of events received by this emitter from the host process.
720 |        * 
721 | */ 722 | public Builder setReceivedCount(long value) { 723 | bitField0_ |= 0x00000002; 724 | receivedCount_ = value; 725 | onChanged(); 726 | return this; 727 | } 728 | /** 729 | * required uint64 receivedCount = 2; 730 | * 731 | *
732 |        */ Number of events received by this emitter from the host process.
733 |        * 
734 | */ 735 | public Builder clearReceivedCount() { 736 | bitField0_ = (bitField0_ & ~0x00000002); 737 | receivedCount_ = 0L; 738 | onChanged(); 739 | return this; 740 | } 741 | 742 | private long errorCount_ ; 743 | /** 744 | * required uint64 errorCount = 3; 745 | * 746 | *
747 |        */ Number of errors encountered while sending.
748 |        * 
749 | */ 750 | public boolean hasErrorCount() { 751 | return ((bitField0_ & 0x00000004) == 0x00000004); 752 | } 753 | /** 754 | * required uint64 errorCount = 3; 755 | * 756 | *
757 |        */ Number of errors encountered while sending.
758 |        * 
759 | */ 760 | public long getErrorCount() { 761 | return errorCount_; 762 | } 763 | /** 764 | * required uint64 errorCount = 3; 765 | * 766 | *
767 |        */ Number of errors encountered while sending.
768 |        * 
769 | */ 770 | public Builder setErrorCount(long value) { 771 | bitField0_ |= 0x00000004; 772 | errorCount_ = value; 773 | onChanged(); 774 | return this; 775 | } 776 | /** 777 | * required uint64 errorCount = 3; 778 | * 779 | *
780 |        */ Number of errors encountered while sending.
781 |        * 
782 | */ 783 | public Builder clearErrorCount() { 784 | bitField0_ = (bitField0_ & ~0x00000004); 785 | errorCount_ = 0L; 786 | onChanged(); 787 | return this; 788 | } 789 | 790 | private events.Uuid.UUID controlMessageIdentifier_ = events.Uuid.UUID.getDefaultInstance(); 791 | private com.google.protobuf.SingleFieldBuilder< 792 | events.Uuid.UUID, events.Uuid.UUID.Builder, events.Uuid.UUIDOrBuilder> controlMessageIdentifierBuilder_; 793 | /** 794 | * optional .events.UUID controlMessageIdentifier = 4; 795 | * 796 | *
797 |        */ The id of the control message which requested this heartbeat
798 |        * 
799 | */ 800 | public boolean hasControlMessageIdentifier() { 801 | return ((bitField0_ & 0x00000008) == 0x00000008); 802 | } 803 | /** 804 | * optional .events.UUID controlMessageIdentifier = 4; 805 | * 806 | *
807 |        */ The id of the control message which requested this heartbeat
808 |        * 
809 | */ 810 | public events.Uuid.UUID getControlMessageIdentifier() { 811 | if (controlMessageIdentifierBuilder_ == null) { 812 | return controlMessageIdentifier_; 813 | } else { 814 | return controlMessageIdentifierBuilder_.getMessage(); 815 | } 816 | } 817 | /** 818 | * optional .events.UUID controlMessageIdentifier = 4; 819 | * 820 | *
821 |        */ The id of the control message which requested this heartbeat
822 |        * 
823 | */ 824 | public Builder setControlMessageIdentifier(events.Uuid.UUID value) { 825 | if (controlMessageIdentifierBuilder_ == null) { 826 | if (value == null) { 827 | throw new NullPointerException(); 828 | } 829 | controlMessageIdentifier_ = value; 830 | onChanged(); 831 | } else { 832 | controlMessageIdentifierBuilder_.setMessage(value); 833 | } 834 | bitField0_ |= 0x00000008; 835 | return this; 836 | } 837 | /** 838 | * optional .events.UUID controlMessageIdentifier = 4; 839 | * 840 | *
841 |        */ The id of the control message which requested this heartbeat
842 |        * 
843 | */ 844 | public Builder setControlMessageIdentifier( 845 | events.Uuid.UUID.Builder builderForValue) { 846 | if (controlMessageIdentifierBuilder_ == null) { 847 | controlMessageIdentifier_ = builderForValue.build(); 848 | onChanged(); 849 | } else { 850 | controlMessageIdentifierBuilder_.setMessage(builderForValue.build()); 851 | } 852 | bitField0_ |= 0x00000008; 853 | return this; 854 | } 855 | /** 856 | * optional .events.UUID controlMessageIdentifier = 4; 857 | * 858 | *
859 |        */ The id of the control message which requested this heartbeat
860 |        * 
861 | */ 862 | public Builder mergeControlMessageIdentifier(events.Uuid.UUID value) { 863 | if (controlMessageIdentifierBuilder_ == null) { 864 | if (((bitField0_ & 0x00000008) == 0x00000008) && 865 | controlMessageIdentifier_ != events.Uuid.UUID.getDefaultInstance()) { 866 | controlMessageIdentifier_ = 867 | events.Uuid.UUID.newBuilder(controlMessageIdentifier_).mergeFrom(value).buildPartial(); 868 | } else { 869 | controlMessageIdentifier_ = value; 870 | } 871 | onChanged(); 872 | } else { 873 | controlMessageIdentifierBuilder_.mergeFrom(value); 874 | } 875 | bitField0_ |= 0x00000008; 876 | return this; 877 | } 878 | /** 879 | * optional .events.UUID controlMessageIdentifier = 4; 880 | * 881 | *
882 |        */ The id of the control message which requested this heartbeat
883 |        * 
884 | */ 885 | public Builder clearControlMessageIdentifier() { 886 | if (controlMessageIdentifierBuilder_ == null) { 887 | controlMessageIdentifier_ = events.Uuid.UUID.getDefaultInstance(); 888 | onChanged(); 889 | } else { 890 | controlMessageIdentifierBuilder_.clear(); 891 | } 892 | bitField0_ = (bitField0_ & ~0x00000008); 893 | return this; 894 | } 895 | /** 896 | * optional .events.UUID controlMessageIdentifier = 4; 897 | * 898 | *
899 |        */ The id of the control message which requested this heartbeat
900 |        * 
901 | */ 902 | public events.Uuid.UUID.Builder getControlMessageIdentifierBuilder() { 903 | bitField0_ |= 0x00000008; 904 | onChanged(); 905 | return getControlMessageIdentifierFieldBuilder().getBuilder(); 906 | } 907 | /** 908 | * optional .events.UUID controlMessageIdentifier = 4; 909 | * 910 | *
911 |        */ The id of the control message which requested this heartbeat
912 |        * 
913 | */ 914 | public events.Uuid.UUIDOrBuilder getControlMessageIdentifierOrBuilder() { 915 | if (controlMessageIdentifierBuilder_ != null) { 916 | return controlMessageIdentifierBuilder_.getMessageOrBuilder(); 917 | } else { 918 | return controlMessageIdentifier_; 919 | } 920 | } 921 | /** 922 | * optional .events.UUID controlMessageIdentifier = 4; 923 | * 924 | *
925 |        */ The id of the control message which requested this heartbeat
926 |        * 
927 | */ 928 | private com.google.protobuf.SingleFieldBuilder< 929 | events.Uuid.UUID, events.Uuid.UUID.Builder, events.Uuid.UUIDOrBuilder> 930 | getControlMessageIdentifierFieldBuilder() { 931 | if (controlMessageIdentifierBuilder_ == null) { 932 | controlMessageIdentifierBuilder_ = new com.google.protobuf.SingleFieldBuilder< 933 | events.Uuid.UUID, events.Uuid.UUID.Builder, events.Uuid.UUIDOrBuilder>( 934 | getControlMessageIdentifier(), 935 | getParentForChildren(), 936 | isClean()); 937 | controlMessageIdentifier_ = null; 938 | } 939 | return controlMessageIdentifierBuilder_; 940 | } 941 | 942 | // @@protoc_insertion_point(builder_scope:events.Heartbeat) 943 | } 944 | 945 | static { 946 | defaultInstance = new Heartbeat(true); 947 | defaultInstance.initFields(); 948 | } 949 | 950 | // @@protoc_insertion_point(class_scope:events.Heartbeat) 951 | } 952 | 953 | private static final com.google.protobuf.Descriptors.Descriptor 954 | internal_static_events_Heartbeat_descriptor; 955 | private static 956 | com.google.protobuf.GeneratedMessage.FieldAccessorTable 957 | internal_static_events_Heartbeat_fieldAccessorTable; 958 | 959 | public static com.google.protobuf.Descriptors.FileDescriptor 960 | getDescriptor() { 961 | return descriptor; 962 | } 963 | private static com.google.protobuf.Descriptors.FileDescriptor 964 | descriptor; 965 | static { 966 | String[] descriptorData = { 967 | "\n\017heartbeat.proto\022\006events\032\nuuid.proto\"y\n" + 968 | "\tHeartbeat\022\021\n\tsentCount\030\001 \002(\004\022\025\n\rreceive" + 969 | "dCount\030\002 \002(\004\022\022\n\nerrorCount\030\003 \002(\004\022.\n\030cont" + 970 | "rolMessageIdentifier\030\004 \001(\0132\014.events.UUID" 971 | }; 972 | com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = 973 | new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { 974 | public com.google.protobuf.ExtensionRegistry assignDescriptors( 975 | com.google.protobuf.Descriptors.FileDescriptor root) { 976 | descriptor = root; 977 | return null; 978 | } 979 | }; 980 | com.google.protobuf.Descriptors.FileDescriptor 981 | .internalBuildGeneratedFileFrom(descriptorData, 982 | new com.google.protobuf.Descriptors.FileDescriptor[] { 983 | events.Uuid.getDescriptor(), 984 | }, assigner); 985 | internal_static_events_Heartbeat_descriptor = 986 | getDescriptor().getMessageTypes().get(0); 987 | internal_static_events_Heartbeat_fieldAccessorTable = new 988 | com.google.protobuf.GeneratedMessage.FieldAccessorTable( 989 | internal_static_events_Heartbeat_descriptor, 990 | new String[] { "SentCount", "ReceivedCount", "ErrorCount", "ControlMessageIdentifier", }); 991 | events.Uuid.getDescriptor(); 992 | } 993 | 994 | // @@protoc_insertion_point(outer_class_scope) 995 | } 996 | -------------------------------------------------------------------------------- /src/main/java/events/Log.java: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: log.proto 3 | 4 | package events; 5 | 6 | public final class Log { 7 | private Log() {} 8 | public static void registerAllExtensions( 9 | com.google.protobuf.ExtensionRegistry registry) { 10 | } 11 | public interface LogMessageOrBuilder extends 12 | // @@protoc_insertion_point(interface_extends:events.LogMessage) 13 | com.google.protobuf.MessageOrBuilder { 14 | 15 | /** 16 | * required bytes message = 1; 17 | * 18 | *
  19 |      */ Bytes of the log message. (Note that it is not required to be a single line.)
  20 |      * 
21 | */ 22 | boolean hasMessage(); 23 | /** 24 | * required bytes message = 1; 25 | * 26 | *
  27 |      */ Bytes of the log message. (Note that it is not required to be a single line.)
  28 |      * 
29 | */ 30 | com.google.protobuf.ByteString getMessage(); 31 | 32 | /** 33 | * required .events.LogMessage.MessageType message_type = 2; 34 | * 35 | *
  36 |      */ Type of the message (OUT or ERR).
  37 |      * 
38 | */ 39 | boolean hasMessageType(); 40 | /** 41 | * required .events.LogMessage.MessageType message_type = 2; 42 | * 43 | *
  44 |      */ Type of the message (OUT or ERR).
  45 |      * 
46 | */ 47 | events.Log.LogMessage.MessageType getMessageType(); 48 | 49 | /** 50 | * required int64 timestamp = 3; 51 | * 52 | *
  53 |      */ UNIX timestamp (in nanoseconds) when the log was written.
  54 |      * 
55 | */ 56 | boolean hasTimestamp(); 57 | /** 58 | * required int64 timestamp = 3; 59 | * 60 | *
  61 |      */ UNIX timestamp (in nanoseconds) when the log was written.
  62 |      * 
63 | */ 64 | long getTimestamp(); 65 | 66 | /** 67 | * optional string app_id = 4; 68 | * 69 | *
  70 |      */ Application that emitted the message (or to which the application is related).
  71 |      * 
72 | */ 73 | boolean hasAppId(); 74 | /** 75 | * optional string app_id = 4; 76 | * 77 | *
  78 |      */ Application that emitted the message (or to which the application is related).
  79 |      * 
80 | */ 81 | String getAppId(); 82 | /** 83 | * optional string app_id = 4; 84 | * 85 | *
  86 |      */ Application that emitted the message (or to which the application is related).
  87 |      * 
88 | */ 89 | com.google.protobuf.ByteString 90 | getAppIdBytes(); 91 | 92 | /** 93 | * optional string source_type = 5; 94 | * 95 | *
  96 |      */ Source of the message. For Cloud Foundry, this can be "APP", "RTR", "DEA", "STG", etc.
  97 |      * 
98 | */ 99 | boolean hasSourceType(); 100 | /** 101 | * optional string source_type = 5; 102 | * 103 | *
 104 |      */ Source of the message. For Cloud Foundry, this can be "APP", "RTR", "DEA", "STG", etc.
 105 |      * 
106 | */ 107 | String getSourceType(); 108 | /** 109 | * optional string source_type = 5; 110 | * 111 | *
 112 |      */ Source of the message. For Cloud Foundry, this can be "APP", "RTR", "DEA", "STG", etc.
 113 |      * 
114 | */ 115 | com.google.protobuf.ByteString 116 | getSourceTypeBytes(); 117 | 118 | /** 119 | * optional string source_instance = 6; 120 | * 121 | *
 122 |      */ Instance that emitted the message.
 123 |      * 
124 | */ 125 | boolean hasSourceInstance(); 126 | /** 127 | * optional string source_instance = 6; 128 | * 129 | *
 130 |      */ Instance that emitted the message.
 131 |      * 
132 | */ 133 | String getSourceInstance(); 134 | /** 135 | * optional string source_instance = 6; 136 | * 137 | *
 138 |      */ Instance that emitted the message.
 139 |      * 
140 | */ 141 | com.google.protobuf.ByteString 142 | getSourceInstanceBytes(); 143 | } 144 | /** 145 | * Protobuf type {@code events.LogMessage} 146 | * 147 | *
 148 |    */ A LogMessage contains a "log line" and associated metadata.
 149 |    * 
150 | */ 151 | public static final class LogMessage extends 152 | com.google.protobuf.GeneratedMessage implements 153 | // @@protoc_insertion_point(message_implements:events.LogMessage) 154 | LogMessageOrBuilder { 155 | // Use LogMessage.newBuilder() to construct. 156 | private LogMessage(com.google.protobuf.GeneratedMessage.Builder builder) { 157 | super(builder); 158 | this.unknownFields = builder.getUnknownFields(); 159 | } 160 | private LogMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } 161 | 162 | private static final LogMessage defaultInstance; 163 | public static LogMessage getDefaultInstance() { 164 | return defaultInstance; 165 | } 166 | 167 | public LogMessage getDefaultInstanceForType() { 168 | return defaultInstance; 169 | } 170 | 171 | private final com.google.protobuf.UnknownFieldSet unknownFields; 172 | @Override 173 | public final com.google.protobuf.UnknownFieldSet 174 | getUnknownFields() { 175 | return this.unknownFields; 176 | } 177 | private LogMessage( 178 | com.google.protobuf.CodedInputStream input, 179 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 180 | throws com.google.protobuf.InvalidProtocolBufferException { 181 | initFields(); 182 | int mutable_bitField0_ = 0; 183 | com.google.protobuf.UnknownFieldSet.Builder unknownFields = 184 | com.google.protobuf.UnknownFieldSet.newBuilder(); 185 | try { 186 | boolean done = false; 187 | while (!done) { 188 | int tag = input.readTag(); 189 | switch (tag) { 190 | case 0: 191 | done = true; 192 | break; 193 | default: { 194 | if (!parseUnknownField(input, unknownFields, 195 | extensionRegistry, tag)) { 196 | done = true; 197 | } 198 | break; 199 | } 200 | case 10: { 201 | bitField0_ |= 0x00000001; 202 | message_ = input.readBytes(); 203 | break; 204 | } 205 | case 16: { 206 | int rawValue = input.readEnum(); 207 | events.Log.LogMessage.MessageType value = events.Log.LogMessage.MessageType.valueOf(rawValue); 208 | if (value == null) { 209 | unknownFields.mergeVarintField(2, rawValue); 210 | } else { 211 | bitField0_ |= 0x00000002; 212 | messageType_ = value; 213 | } 214 | break; 215 | } 216 | case 24: { 217 | bitField0_ |= 0x00000004; 218 | timestamp_ = input.readInt64(); 219 | break; 220 | } 221 | case 34: { 222 | com.google.protobuf.ByteString bs = input.readBytes(); 223 | bitField0_ |= 0x00000008; 224 | appId_ = bs; 225 | break; 226 | } 227 | case 42: { 228 | com.google.protobuf.ByteString bs = input.readBytes(); 229 | bitField0_ |= 0x00000010; 230 | sourceType_ = bs; 231 | break; 232 | } 233 | case 50: { 234 | com.google.protobuf.ByteString bs = input.readBytes(); 235 | bitField0_ |= 0x00000020; 236 | sourceInstance_ = bs; 237 | break; 238 | } 239 | } 240 | } 241 | } catch (com.google.protobuf.InvalidProtocolBufferException e) { 242 | throw e.setUnfinishedMessage(this); 243 | } catch (java.io.IOException e) { 244 | throw new com.google.protobuf.InvalidProtocolBufferException( 245 | e.getMessage()).setUnfinishedMessage(this); 246 | } finally { 247 | this.unknownFields = unknownFields.build(); 248 | makeExtensionsImmutable(); 249 | } 250 | } 251 | public static final com.google.protobuf.Descriptors.Descriptor 252 | getDescriptor() { 253 | return events.Log.internal_static_events_LogMessage_descriptor; 254 | } 255 | 256 | protected FieldAccessorTable 257 | internalGetFieldAccessorTable() { 258 | return events.Log.internal_static_events_LogMessage_fieldAccessorTable 259 | .ensureFieldAccessorsInitialized( 260 | events.Log.LogMessage.class, events.Log.LogMessage.Builder.class); 261 | } 262 | 263 | public static com.google.protobuf.Parser PARSER = 264 | new com.google.protobuf.AbstractParser() { 265 | public LogMessage parsePartialFrom( 266 | com.google.protobuf.CodedInputStream input, 267 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 268 | throws com.google.protobuf.InvalidProtocolBufferException { 269 | return new LogMessage(input, extensionRegistry); 270 | } 271 | }; 272 | 273 | @Override 274 | public com.google.protobuf.Parser getParserForType() { 275 | return PARSER; 276 | } 277 | 278 | /** 279 | * Protobuf enum {@code events.LogMessage.MessageType} 280 | * 281 | *
 282 |      */ MessageType stores the destination of the message (corresponding to STDOUT or STDERR).
 283 |      * 
284 | */ 285 | public enum MessageType 286 | implements com.google.protobuf.ProtocolMessageEnum { 287 | /** 288 | * OUT = 1; 289 | */ 290 | OUT(0, 1), 291 | /** 292 | * ERR = 2; 293 | */ 294 | ERR(1, 2), 295 | ; 296 | 297 | /** 298 | * OUT = 1; 299 | */ 300 | public static final int OUT_VALUE = 1; 301 | /** 302 | * ERR = 2; 303 | */ 304 | public static final int ERR_VALUE = 2; 305 | 306 | 307 | public final int getNumber() { return value; } 308 | 309 | public static MessageType valueOf(int value) { 310 | switch (value) { 311 | case 1: return OUT; 312 | case 2: return ERR; 313 | default: return null; 314 | } 315 | } 316 | 317 | public static com.google.protobuf.Internal.EnumLiteMap 318 | internalGetValueMap() { 319 | return internalValueMap; 320 | } 321 | private static com.google.protobuf.Internal.EnumLiteMap 322 | internalValueMap = 323 | new com.google.protobuf.Internal.EnumLiteMap() { 324 | public MessageType findValueByNumber(int number) { 325 | return MessageType.valueOf(number); 326 | } 327 | }; 328 | 329 | public final com.google.protobuf.Descriptors.EnumValueDescriptor 330 | getValueDescriptor() { 331 | return getDescriptor().getValues().get(index); 332 | } 333 | public final com.google.protobuf.Descriptors.EnumDescriptor 334 | getDescriptorForType() { 335 | return getDescriptor(); 336 | } 337 | public static final com.google.protobuf.Descriptors.EnumDescriptor 338 | getDescriptor() { 339 | return events.Log.LogMessage.getDescriptor().getEnumTypes().get(0); 340 | } 341 | 342 | private static final MessageType[] VALUES = values(); 343 | 344 | public static MessageType valueOf( 345 | com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 346 | if (desc.getType() != getDescriptor()) { 347 | throw new IllegalArgumentException( 348 | "EnumValueDescriptor is not for this type."); 349 | } 350 | return VALUES[desc.getIndex()]; 351 | } 352 | 353 | private final int index; 354 | private final int value; 355 | 356 | private MessageType(int index, int value) { 357 | this.index = index; 358 | this.value = value; 359 | } 360 | 361 | // @@protoc_insertion_point(enum_scope:events.LogMessage.MessageType) 362 | } 363 | 364 | private int bitField0_; 365 | public static final int MESSAGE_FIELD_NUMBER = 1; 366 | private com.google.protobuf.ByteString message_; 367 | /** 368 | * required bytes message = 1; 369 | * 370 | *
 371 |      */ Bytes of the log message. (Note that it is not required to be a single line.)
 372 |      * 
373 | */ 374 | public boolean hasMessage() { 375 | return ((bitField0_ & 0x00000001) == 0x00000001); 376 | } 377 | /** 378 | * required bytes message = 1; 379 | * 380 | *
 381 |      */ Bytes of the log message. (Note that it is not required to be a single line.)
 382 |      * 
383 | */ 384 | public com.google.protobuf.ByteString getMessage() { 385 | return message_; 386 | } 387 | 388 | public static final int MESSAGE_TYPE_FIELD_NUMBER = 2; 389 | private events.Log.LogMessage.MessageType messageType_; 390 | /** 391 | * required .events.LogMessage.MessageType message_type = 2; 392 | * 393 | *
 394 |      */ Type of the message (OUT or ERR).
 395 |      * 
396 | */ 397 | public boolean hasMessageType() { 398 | return ((bitField0_ & 0x00000002) == 0x00000002); 399 | } 400 | /** 401 | * required .events.LogMessage.MessageType message_type = 2; 402 | * 403 | *
 404 |      */ Type of the message (OUT or ERR).
 405 |      * 
406 | */ 407 | public events.Log.LogMessage.MessageType getMessageType() { 408 | return messageType_; 409 | } 410 | 411 | public static final int TIMESTAMP_FIELD_NUMBER = 3; 412 | private long timestamp_; 413 | /** 414 | * required int64 timestamp = 3; 415 | * 416 | *
 417 |      */ UNIX timestamp (in nanoseconds) when the log was written.
 418 |      * 
419 | */ 420 | public boolean hasTimestamp() { 421 | return ((bitField0_ & 0x00000004) == 0x00000004); 422 | } 423 | /** 424 | * required int64 timestamp = 3; 425 | * 426 | *
 427 |      */ UNIX timestamp (in nanoseconds) when the log was written.
 428 |      * 
429 | */ 430 | public long getTimestamp() { 431 | return timestamp_; 432 | } 433 | 434 | public static final int APP_ID_FIELD_NUMBER = 4; 435 | private Object appId_; 436 | /** 437 | * optional string app_id = 4; 438 | * 439 | *
 440 |      */ Application that emitted the message (or to which the application is related).
 441 |      * 
442 | */ 443 | public boolean hasAppId() { 444 | return ((bitField0_ & 0x00000008) == 0x00000008); 445 | } 446 | /** 447 | * optional string app_id = 4; 448 | * 449 | *
 450 |      */ Application that emitted the message (or to which the application is related).
 451 |      * 
452 | */ 453 | public String getAppId() { 454 | Object ref = appId_; 455 | if (ref instanceof String) { 456 | return (String) ref; 457 | } else { 458 | com.google.protobuf.ByteString bs = 459 | (com.google.protobuf.ByteString) ref; 460 | String s = bs.toStringUtf8(); 461 | if (bs.isValidUtf8()) { 462 | appId_ = s; 463 | } 464 | return s; 465 | } 466 | } 467 | /** 468 | * optional string app_id = 4; 469 | * 470 | *
 471 |      */ Application that emitted the message (or to which the application is related).
 472 |      * 
473 | */ 474 | public com.google.protobuf.ByteString 475 | getAppIdBytes() { 476 | Object ref = appId_; 477 | if (ref instanceof String) { 478 | com.google.protobuf.ByteString b = 479 | com.google.protobuf.ByteString.copyFromUtf8( 480 | (String) ref); 481 | appId_ = b; 482 | return b; 483 | } else { 484 | return (com.google.protobuf.ByteString) ref; 485 | } 486 | } 487 | 488 | public static final int SOURCE_TYPE_FIELD_NUMBER = 5; 489 | private Object sourceType_; 490 | /** 491 | * optional string source_type = 5; 492 | * 493 | *
 494 |      */ Source of the message. For Cloud Foundry, this can be "APP", "RTR", "DEA", "STG", etc.
 495 |      * 
496 | */ 497 | public boolean hasSourceType() { 498 | return ((bitField0_ & 0x00000010) == 0x00000010); 499 | } 500 | /** 501 | * optional string source_type = 5; 502 | * 503 | *
 504 |      */ Source of the message. For Cloud Foundry, this can be "APP", "RTR", "DEA", "STG", etc.
 505 |      * 
506 | */ 507 | public String getSourceType() { 508 | Object ref = sourceType_; 509 | if (ref instanceof String) { 510 | return (String) ref; 511 | } else { 512 | com.google.protobuf.ByteString bs = 513 | (com.google.protobuf.ByteString) ref; 514 | String s = bs.toStringUtf8(); 515 | if (bs.isValidUtf8()) { 516 | sourceType_ = s; 517 | } 518 | return s; 519 | } 520 | } 521 | /** 522 | * optional string source_type = 5; 523 | * 524 | *
 525 |      */ Source of the message. For Cloud Foundry, this can be "APP", "RTR", "DEA", "STG", etc.
 526 |      * 
527 | */ 528 | public com.google.protobuf.ByteString 529 | getSourceTypeBytes() { 530 | Object ref = sourceType_; 531 | if (ref instanceof String) { 532 | com.google.protobuf.ByteString b = 533 | com.google.protobuf.ByteString.copyFromUtf8( 534 | (String) ref); 535 | sourceType_ = b; 536 | return b; 537 | } else { 538 | return (com.google.protobuf.ByteString) ref; 539 | } 540 | } 541 | 542 | public static final int SOURCE_INSTANCE_FIELD_NUMBER = 6; 543 | private Object sourceInstance_; 544 | /** 545 | * optional string source_instance = 6; 546 | * 547 | *
 548 |      */ Instance that emitted the message.
 549 |      * 
550 | */ 551 | public boolean hasSourceInstance() { 552 | return ((bitField0_ & 0x00000020) == 0x00000020); 553 | } 554 | /** 555 | * optional string source_instance = 6; 556 | * 557 | *
 558 |      */ Instance that emitted the message.
 559 |      * 
560 | */ 561 | public String getSourceInstance() { 562 | Object ref = sourceInstance_; 563 | if (ref instanceof String) { 564 | return (String) ref; 565 | } else { 566 | com.google.protobuf.ByteString bs = 567 | (com.google.protobuf.ByteString) ref; 568 | String s = bs.toStringUtf8(); 569 | if (bs.isValidUtf8()) { 570 | sourceInstance_ = s; 571 | } 572 | return s; 573 | } 574 | } 575 | /** 576 | * optional string source_instance = 6; 577 | * 578 | *
 579 |      */ Instance that emitted the message.
 580 |      * 
581 | */ 582 | public com.google.protobuf.ByteString 583 | getSourceInstanceBytes() { 584 | Object ref = sourceInstance_; 585 | if (ref instanceof String) { 586 | com.google.protobuf.ByteString b = 587 | com.google.protobuf.ByteString.copyFromUtf8( 588 | (String) ref); 589 | sourceInstance_ = b; 590 | return b; 591 | } else { 592 | return (com.google.protobuf.ByteString) ref; 593 | } 594 | } 595 | 596 | private void initFields() { 597 | message_ = com.google.protobuf.ByteString.EMPTY; 598 | messageType_ = events.Log.LogMessage.MessageType.OUT; 599 | timestamp_ = 0L; 600 | appId_ = ""; 601 | sourceType_ = ""; 602 | sourceInstance_ = ""; 603 | } 604 | private byte memoizedIsInitialized = -1; 605 | public final boolean isInitialized() { 606 | byte isInitialized = memoizedIsInitialized; 607 | if (isInitialized == 1) return true; 608 | if (isInitialized == 0) return false; 609 | 610 | if (!hasMessage()) { 611 | memoizedIsInitialized = 0; 612 | return false; 613 | } 614 | if (!hasMessageType()) { 615 | memoizedIsInitialized = 0; 616 | return false; 617 | } 618 | if (!hasTimestamp()) { 619 | memoizedIsInitialized = 0; 620 | return false; 621 | } 622 | memoizedIsInitialized = 1; 623 | return true; 624 | } 625 | 626 | public void writeTo(com.google.protobuf.CodedOutputStream output) 627 | throws java.io.IOException { 628 | getSerializedSize(); 629 | if (((bitField0_ & 0x00000001) == 0x00000001)) { 630 | output.writeBytes(1, message_); 631 | } 632 | if (((bitField0_ & 0x00000002) == 0x00000002)) { 633 | output.writeEnum(2, messageType_.getNumber()); 634 | } 635 | if (((bitField0_ & 0x00000004) == 0x00000004)) { 636 | output.writeInt64(3, timestamp_); 637 | } 638 | if (((bitField0_ & 0x00000008) == 0x00000008)) { 639 | output.writeBytes(4, getAppIdBytes()); 640 | } 641 | if (((bitField0_ & 0x00000010) == 0x00000010)) { 642 | output.writeBytes(5, getSourceTypeBytes()); 643 | } 644 | if (((bitField0_ & 0x00000020) == 0x00000020)) { 645 | output.writeBytes(6, getSourceInstanceBytes()); 646 | } 647 | getUnknownFields().writeTo(output); 648 | } 649 | 650 | private int memoizedSerializedSize = -1; 651 | public int getSerializedSize() { 652 | int size = memoizedSerializedSize; 653 | if (size != -1) return size; 654 | 655 | size = 0; 656 | if (((bitField0_ & 0x00000001) == 0x00000001)) { 657 | size += com.google.protobuf.CodedOutputStream 658 | .computeBytesSize(1, message_); 659 | } 660 | if (((bitField0_ & 0x00000002) == 0x00000002)) { 661 | size += com.google.protobuf.CodedOutputStream 662 | .computeEnumSize(2, messageType_.getNumber()); 663 | } 664 | if (((bitField0_ & 0x00000004) == 0x00000004)) { 665 | size += com.google.protobuf.CodedOutputStream 666 | .computeInt64Size(3, timestamp_); 667 | } 668 | if (((bitField0_ & 0x00000008) == 0x00000008)) { 669 | size += com.google.protobuf.CodedOutputStream 670 | .computeBytesSize(4, getAppIdBytes()); 671 | } 672 | if (((bitField0_ & 0x00000010) == 0x00000010)) { 673 | size += com.google.protobuf.CodedOutputStream 674 | .computeBytesSize(5, getSourceTypeBytes()); 675 | } 676 | if (((bitField0_ & 0x00000020) == 0x00000020)) { 677 | size += com.google.protobuf.CodedOutputStream 678 | .computeBytesSize(6, getSourceInstanceBytes()); 679 | } 680 | size += getUnknownFields().getSerializedSize(); 681 | memoizedSerializedSize = size; 682 | return size; 683 | } 684 | 685 | private static final long serialVersionUID = 0L; 686 | @Override 687 | protected Object writeReplace() 688 | throws java.io.ObjectStreamException { 689 | return super.writeReplace(); 690 | } 691 | 692 | public static events.Log.LogMessage parseFrom( 693 | com.google.protobuf.ByteString data) 694 | throws com.google.protobuf.InvalidProtocolBufferException { 695 | return PARSER.parseFrom(data); 696 | } 697 | public static events.Log.LogMessage parseFrom( 698 | com.google.protobuf.ByteString data, 699 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 700 | throws com.google.protobuf.InvalidProtocolBufferException { 701 | return PARSER.parseFrom(data, extensionRegistry); 702 | } 703 | public static events.Log.LogMessage parseFrom(byte[] data) 704 | throws com.google.protobuf.InvalidProtocolBufferException { 705 | return PARSER.parseFrom(data); 706 | } 707 | public static events.Log.LogMessage parseFrom( 708 | byte[] data, 709 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 710 | throws com.google.protobuf.InvalidProtocolBufferException { 711 | return PARSER.parseFrom(data, extensionRegistry); 712 | } 713 | public static events.Log.LogMessage parseFrom(java.io.InputStream input) 714 | throws java.io.IOException { 715 | return PARSER.parseFrom(input); 716 | } 717 | public static events.Log.LogMessage parseFrom( 718 | java.io.InputStream input, 719 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 720 | throws java.io.IOException { 721 | return PARSER.parseFrom(input, extensionRegistry); 722 | } 723 | public static events.Log.LogMessage parseDelimitedFrom(java.io.InputStream input) 724 | throws java.io.IOException { 725 | return PARSER.parseDelimitedFrom(input); 726 | } 727 | public static events.Log.LogMessage parseDelimitedFrom( 728 | java.io.InputStream input, 729 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 730 | throws java.io.IOException { 731 | return PARSER.parseDelimitedFrom(input, extensionRegistry); 732 | } 733 | public static events.Log.LogMessage parseFrom( 734 | com.google.protobuf.CodedInputStream input) 735 | throws java.io.IOException { 736 | return PARSER.parseFrom(input); 737 | } 738 | public static events.Log.LogMessage parseFrom( 739 | com.google.protobuf.CodedInputStream input, 740 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 741 | throws java.io.IOException { 742 | return PARSER.parseFrom(input, extensionRegistry); 743 | } 744 | 745 | public static Builder newBuilder() { return Builder.create(); } 746 | public Builder newBuilderForType() { return newBuilder(); } 747 | public static Builder newBuilder(events.Log.LogMessage prototype) { 748 | return newBuilder().mergeFrom(prototype); 749 | } 750 | public Builder toBuilder() { return newBuilder(this); } 751 | 752 | @Override 753 | protected Builder newBuilderForType( 754 | BuilderParent parent) { 755 | Builder builder = new Builder(parent); 756 | return builder; 757 | } 758 | /** 759 | * Protobuf type {@code events.LogMessage} 760 | * 761 | *
 762 |      */ A LogMessage contains a "log line" and associated metadata.
 763 |      * 
764 | */ 765 | public static final class Builder extends 766 | com.google.protobuf.GeneratedMessage.Builder implements 767 | // @@protoc_insertion_point(builder_implements:events.LogMessage) 768 | events.Log.LogMessageOrBuilder { 769 | public static final com.google.protobuf.Descriptors.Descriptor 770 | getDescriptor() { 771 | return events.Log.internal_static_events_LogMessage_descriptor; 772 | } 773 | 774 | protected FieldAccessorTable 775 | internalGetFieldAccessorTable() { 776 | return events.Log.internal_static_events_LogMessage_fieldAccessorTable 777 | .ensureFieldAccessorsInitialized( 778 | events.Log.LogMessage.class, events.Log.LogMessage.Builder.class); 779 | } 780 | 781 | // Construct using events.Log.LogMessage.newBuilder() 782 | private Builder() { 783 | maybeForceBuilderInitialization(); 784 | } 785 | 786 | private Builder( 787 | BuilderParent parent) { 788 | super(parent); 789 | maybeForceBuilderInitialization(); 790 | } 791 | private void maybeForceBuilderInitialization() { 792 | if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { 793 | } 794 | } 795 | private static Builder create() { 796 | return new Builder(); 797 | } 798 | 799 | public Builder clear() { 800 | super.clear(); 801 | message_ = com.google.protobuf.ByteString.EMPTY; 802 | bitField0_ = (bitField0_ & ~0x00000001); 803 | messageType_ = events.Log.LogMessage.MessageType.OUT; 804 | bitField0_ = (bitField0_ & ~0x00000002); 805 | timestamp_ = 0L; 806 | bitField0_ = (bitField0_ & ~0x00000004); 807 | appId_ = ""; 808 | bitField0_ = (bitField0_ & ~0x00000008); 809 | sourceType_ = ""; 810 | bitField0_ = (bitField0_ & ~0x00000010); 811 | sourceInstance_ = ""; 812 | bitField0_ = (bitField0_ & ~0x00000020); 813 | return this; 814 | } 815 | 816 | public Builder clone() { 817 | return create().mergeFrom(buildPartial()); 818 | } 819 | 820 | public com.google.protobuf.Descriptors.Descriptor 821 | getDescriptorForType() { 822 | return events.Log.internal_static_events_LogMessage_descriptor; 823 | } 824 | 825 | public events.Log.LogMessage getDefaultInstanceForType() { 826 | return events.Log.LogMessage.getDefaultInstance(); 827 | } 828 | 829 | public events.Log.LogMessage build() { 830 | events.Log.LogMessage result = buildPartial(); 831 | if (!result.isInitialized()) { 832 | throw newUninitializedMessageException(result); 833 | } 834 | return result; 835 | } 836 | 837 | public events.Log.LogMessage buildPartial() { 838 | events.Log.LogMessage result = new events.Log.LogMessage(this); 839 | int from_bitField0_ = bitField0_; 840 | int to_bitField0_ = 0; 841 | if (((from_bitField0_ & 0x00000001) == 0x00000001)) { 842 | to_bitField0_ |= 0x00000001; 843 | } 844 | result.message_ = message_; 845 | if (((from_bitField0_ & 0x00000002) == 0x00000002)) { 846 | to_bitField0_ |= 0x00000002; 847 | } 848 | result.messageType_ = messageType_; 849 | if (((from_bitField0_ & 0x00000004) == 0x00000004)) { 850 | to_bitField0_ |= 0x00000004; 851 | } 852 | result.timestamp_ = timestamp_; 853 | if (((from_bitField0_ & 0x00000008) == 0x00000008)) { 854 | to_bitField0_ |= 0x00000008; 855 | } 856 | result.appId_ = appId_; 857 | if (((from_bitField0_ & 0x00000010) == 0x00000010)) { 858 | to_bitField0_ |= 0x00000010; 859 | } 860 | result.sourceType_ = sourceType_; 861 | if (((from_bitField0_ & 0x00000020) == 0x00000020)) { 862 | to_bitField0_ |= 0x00000020; 863 | } 864 | result.sourceInstance_ = sourceInstance_; 865 | result.bitField0_ = to_bitField0_; 866 | onBuilt(); 867 | return result; 868 | } 869 | 870 | public Builder mergeFrom(com.google.protobuf.Message other) { 871 | if (other instanceof events.Log.LogMessage) { 872 | return mergeFrom((events.Log.LogMessage)other); 873 | } else { 874 | super.mergeFrom(other); 875 | return this; 876 | } 877 | } 878 | 879 | public Builder mergeFrom(events.Log.LogMessage other) { 880 | if (other == events.Log.LogMessage.getDefaultInstance()) return this; 881 | if (other.hasMessage()) { 882 | setMessage(other.getMessage()); 883 | } 884 | if (other.hasMessageType()) { 885 | setMessageType(other.getMessageType()); 886 | } 887 | if (other.hasTimestamp()) { 888 | setTimestamp(other.getTimestamp()); 889 | } 890 | if (other.hasAppId()) { 891 | bitField0_ |= 0x00000008; 892 | appId_ = other.appId_; 893 | onChanged(); 894 | } 895 | if (other.hasSourceType()) { 896 | bitField0_ |= 0x00000010; 897 | sourceType_ = other.sourceType_; 898 | onChanged(); 899 | } 900 | if (other.hasSourceInstance()) { 901 | bitField0_ |= 0x00000020; 902 | sourceInstance_ = other.sourceInstance_; 903 | onChanged(); 904 | } 905 | this.mergeUnknownFields(other.getUnknownFields()); 906 | return this; 907 | } 908 | 909 | public final boolean isInitialized() { 910 | if (!hasMessage()) { 911 | 912 | return false; 913 | } 914 | if (!hasMessageType()) { 915 | 916 | return false; 917 | } 918 | if (!hasTimestamp()) { 919 | 920 | return false; 921 | } 922 | return true; 923 | } 924 | 925 | public Builder mergeFrom( 926 | com.google.protobuf.CodedInputStream input, 927 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 928 | throws java.io.IOException { 929 | events.Log.LogMessage parsedMessage = null; 930 | try { 931 | parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); 932 | } catch (com.google.protobuf.InvalidProtocolBufferException e) { 933 | parsedMessage = (events.Log.LogMessage) e.getUnfinishedMessage(); 934 | throw e; 935 | } finally { 936 | if (parsedMessage != null) { 937 | mergeFrom(parsedMessage); 938 | } 939 | } 940 | return this; 941 | } 942 | private int bitField0_; 943 | 944 | private com.google.protobuf.ByteString message_ = com.google.protobuf.ByteString.EMPTY; 945 | /** 946 | * required bytes message = 1; 947 | * 948 | *
 949 |        */ Bytes of the log message. (Note that it is not required to be a single line.)
 950 |        * 
951 | */ 952 | public boolean hasMessage() { 953 | return ((bitField0_ & 0x00000001) == 0x00000001); 954 | } 955 | /** 956 | * required bytes message = 1; 957 | * 958 | *
 959 |        */ Bytes of the log message. (Note that it is not required to be a single line.)
 960 |        * 
961 | */ 962 | public com.google.protobuf.ByteString getMessage() { 963 | return message_; 964 | } 965 | /** 966 | * required bytes message = 1; 967 | * 968 | *
 969 |        */ Bytes of the log message. (Note that it is not required to be a single line.)
 970 |        * 
971 | */ 972 | public Builder setMessage(com.google.protobuf.ByteString value) { 973 | if (value == null) { 974 | throw new NullPointerException(); 975 | } 976 | bitField0_ |= 0x00000001; 977 | message_ = value; 978 | onChanged(); 979 | return this; 980 | } 981 | /** 982 | * required bytes message = 1; 983 | * 984 | *
 985 |        */ Bytes of the log message. (Note that it is not required to be a single line.)
 986 |        * 
987 | */ 988 | public Builder clearMessage() { 989 | bitField0_ = (bitField0_ & ~0x00000001); 990 | message_ = getDefaultInstance().getMessage(); 991 | onChanged(); 992 | return this; 993 | } 994 | 995 | private events.Log.LogMessage.MessageType messageType_ = events.Log.LogMessage.MessageType.OUT; 996 | /** 997 | * required .events.LogMessage.MessageType message_type = 2; 998 | * 999 | *
1000 |        */ Type of the message (OUT or ERR).
1001 |        * 
1002 | */ 1003 | public boolean hasMessageType() { 1004 | return ((bitField0_ & 0x00000002) == 0x00000002); 1005 | } 1006 | /** 1007 | * required .events.LogMessage.MessageType message_type = 2; 1008 | * 1009 | *
1010 |        */ Type of the message (OUT or ERR).
1011 |        * 
1012 | */ 1013 | public events.Log.LogMessage.MessageType getMessageType() { 1014 | return messageType_; 1015 | } 1016 | /** 1017 | * required .events.LogMessage.MessageType message_type = 2; 1018 | * 1019 | *
1020 |        */ Type of the message (OUT or ERR).
1021 |        * 
1022 | */ 1023 | public Builder setMessageType(events.Log.LogMessage.MessageType value) { 1024 | if (value == null) { 1025 | throw new NullPointerException(); 1026 | } 1027 | bitField0_ |= 0x00000002; 1028 | messageType_ = value; 1029 | onChanged(); 1030 | return this; 1031 | } 1032 | /** 1033 | * required .events.LogMessage.MessageType message_type = 2; 1034 | * 1035 | *
1036 |        */ Type of the message (OUT or ERR).
1037 |        * 
1038 | */ 1039 | public Builder clearMessageType() { 1040 | bitField0_ = (bitField0_ & ~0x00000002); 1041 | messageType_ = events.Log.LogMessage.MessageType.OUT; 1042 | onChanged(); 1043 | return this; 1044 | } 1045 | 1046 | private long timestamp_ ; 1047 | /** 1048 | * required int64 timestamp = 3; 1049 | * 1050 | *
1051 |        */ UNIX timestamp (in nanoseconds) when the log was written.
1052 |        * 
1053 | */ 1054 | public boolean hasTimestamp() { 1055 | return ((bitField0_ & 0x00000004) == 0x00000004); 1056 | } 1057 | /** 1058 | * required int64 timestamp = 3; 1059 | * 1060 | *
1061 |        */ UNIX timestamp (in nanoseconds) when the log was written.
1062 |        * 
1063 | */ 1064 | public long getTimestamp() { 1065 | return timestamp_; 1066 | } 1067 | /** 1068 | * required int64 timestamp = 3; 1069 | * 1070 | *
1071 |        */ UNIX timestamp (in nanoseconds) when the log was written.
1072 |        * 
1073 | */ 1074 | public Builder setTimestamp(long value) { 1075 | bitField0_ |= 0x00000004; 1076 | timestamp_ = value; 1077 | onChanged(); 1078 | return this; 1079 | } 1080 | /** 1081 | * required int64 timestamp = 3; 1082 | * 1083 | *
1084 |        */ UNIX timestamp (in nanoseconds) when the log was written.
1085 |        * 
1086 | */ 1087 | public Builder clearTimestamp() { 1088 | bitField0_ = (bitField0_ & ~0x00000004); 1089 | timestamp_ = 0L; 1090 | onChanged(); 1091 | return this; 1092 | } 1093 | 1094 | private Object appId_ = ""; 1095 | /** 1096 | * optional string app_id = 4; 1097 | * 1098 | *
1099 |        */ Application that emitted the message (or to which the application is related).
1100 |        * 
1101 | */ 1102 | public boolean hasAppId() { 1103 | return ((bitField0_ & 0x00000008) == 0x00000008); 1104 | } 1105 | /** 1106 | * optional string app_id = 4; 1107 | * 1108 | *
1109 |        */ Application that emitted the message (or to which the application is related).
1110 |        * 
1111 | */ 1112 | public String getAppId() { 1113 | Object ref = appId_; 1114 | if (!(ref instanceof String)) { 1115 | com.google.protobuf.ByteString bs = 1116 | (com.google.protobuf.ByteString) ref; 1117 | String s = bs.toStringUtf8(); 1118 | if (bs.isValidUtf8()) { 1119 | appId_ = s; 1120 | } 1121 | return s; 1122 | } else { 1123 | return (String) ref; 1124 | } 1125 | } 1126 | /** 1127 | * optional string app_id = 4; 1128 | * 1129 | *
1130 |        */ Application that emitted the message (or to which the application is related).
1131 |        * 
1132 | */ 1133 | public com.google.protobuf.ByteString 1134 | getAppIdBytes() { 1135 | Object ref = appId_; 1136 | if (ref instanceof String) { 1137 | com.google.protobuf.ByteString b = 1138 | com.google.protobuf.ByteString.copyFromUtf8( 1139 | (String) ref); 1140 | appId_ = b; 1141 | return b; 1142 | } else { 1143 | return (com.google.protobuf.ByteString) ref; 1144 | } 1145 | } 1146 | /** 1147 | * optional string app_id = 4; 1148 | * 1149 | *
1150 |        */ Application that emitted the message (or to which the application is related).
1151 |        * 
1152 | */ 1153 | public Builder setAppId( 1154 | String value) { 1155 | if (value == null) { 1156 | throw new NullPointerException(); 1157 | } 1158 | bitField0_ |= 0x00000008; 1159 | appId_ = value; 1160 | onChanged(); 1161 | return this; 1162 | } 1163 | /** 1164 | * optional string app_id = 4; 1165 | * 1166 | *
1167 |        */ Application that emitted the message (or to which the application is related).
1168 |        * 
1169 | */ 1170 | public Builder clearAppId() { 1171 | bitField0_ = (bitField0_ & ~0x00000008); 1172 | appId_ = getDefaultInstance().getAppId(); 1173 | onChanged(); 1174 | return this; 1175 | } 1176 | /** 1177 | * optional string app_id = 4; 1178 | * 1179 | *
1180 |        */ Application that emitted the message (or to which the application is related).
1181 |        * 
1182 | */ 1183 | public Builder setAppIdBytes( 1184 | com.google.protobuf.ByteString value) { 1185 | if (value == null) { 1186 | throw new NullPointerException(); 1187 | } 1188 | bitField0_ |= 0x00000008; 1189 | appId_ = value; 1190 | onChanged(); 1191 | return this; 1192 | } 1193 | 1194 | private Object sourceType_ = ""; 1195 | /** 1196 | * optional string source_type = 5; 1197 | * 1198 | *
1199 |        */ Source of the message. For Cloud Foundry, this can be "APP", "RTR", "DEA", "STG", etc.
1200 |        * 
1201 | */ 1202 | public boolean hasSourceType() { 1203 | return ((bitField0_ & 0x00000010) == 0x00000010); 1204 | } 1205 | /** 1206 | * optional string source_type = 5; 1207 | * 1208 | *
1209 |        */ Source of the message. For Cloud Foundry, this can be "APP", "RTR", "DEA", "STG", etc.
1210 |        * 
1211 | */ 1212 | public String getSourceType() { 1213 | Object ref = sourceType_; 1214 | if (!(ref instanceof String)) { 1215 | com.google.protobuf.ByteString bs = 1216 | (com.google.protobuf.ByteString) ref; 1217 | String s = bs.toStringUtf8(); 1218 | if (bs.isValidUtf8()) { 1219 | sourceType_ = s; 1220 | } 1221 | return s; 1222 | } else { 1223 | return (String) ref; 1224 | } 1225 | } 1226 | /** 1227 | * optional string source_type = 5; 1228 | * 1229 | *
1230 |        */ Source of the message. For Cloud Foundry, this can be "APP", "RTR", "DEA", "STG", etc.
1231 |        * 
1232 | */ 1233 | public com.google.protobuf.ByteString 1234 | getSourceTypeBytes() { 1235 | Object ref = sourceType_; 1236 | if (ref instanceof String) { 1237 | com.google.protobuf.ByteString b = 1238 | com.google.protobuf.ByteString.copyFromUtf8( 1239 | (String) ref); 1240 | sourceType_ = b; 1241 | return b; 1242 | } else { 1243 | return (com.google.protobuf.ByteString) ref; 1244 | } 1245 | } 1246 | /** 1247 | * optional string source_type = 5; 1248 | * 1249 | *
1250 |        */ Source of the message. For Cloud Foundry, this can be "APP", "RTR", "DEA", "STG", etc.
1251 |        * 
1252 | */ 1253 | public Builder setSourceType( 1254 | String value) { 1255 | if (value == null) { 1256 | throw new NullPointerException(); 1257 | } 1258 | bitField0_ |= 0x00000010; 1259 | sourceType_ = value; 1260 | onChanged(); 1261 | return this; 1262 | } 1263 | /** 1264 | * optional string source_type = 5; 1265 | * 1266 | *
1267 |        */ Source of the message. For Cloud Foundry, this can be "APP", "RTR", "DEA", "STG", etc.
1268 |        * 
1269 | */ 1270 | public Builder clearSourceType() { 1271 | bitField0_ = (bitField0_ & ~0x00000010); 1272 | sourceType_ = getDefaultInstance().getSourceType(); 1273 | onChanged(); 1274 | return this; 1275 | } 1276 | /** 1277 | * optional string source_type = 5; 1278 | * 1279 | *
1280 |        */ Source of the message. For Cloud Foundry, this can be "APP", "RTR", "DEA", "STG", etc.
1281 |        * 
1282 | */ 1283 | public Builder setSourceTypeBytes( 1284 | com.google.protobuf.ByteString value) { 1285 | if (value == null) { 1286 | throw new NullPointerException(); 1287 | } 1288 | bitField0_ |= 0x00000010; 1289 | sourceType_ = value; 1290 | onChanged(); 1291 | return this; 1292 | } 1293 | 1294 | private Object sourceInstance_ = ""; 1295 | /** 1296 | * optional string source_instance = 6; 1297 | * 1298 | *
1299 |        */ Instance that emitted the message.
1300 |        * 
1301 | */ 1302 | public boolean hasSourceInstance() { 1303 | return ((bitField0_ & 0x00000020) == 0x00000020); 1304 | } 1305 | /** 1306 | * optional string source_instance = 6; 1307 | * 1308 | *
1309 |        */ Instance that emitted the message.
1310 |        * 
1311 | */ 1312 | public String getSourceInstance() { 1313 | Object ref = sourceInstance_; 1314 | if (!(ref instanceof String)) { 1315 | com.google.protobuf.ByteString bs = 1316 | (com.google.protobuf.ByteString) ref; 1317 | String s = bs.toStringUtf8(); 1318 | if (bs.isValidUtf8()) { 1319 | sourceInstance_ = s; 1320 | } 1321 | return s; 1322 | } else { 1323 | return (String) ref; 1324 | } 1325 | } 1326 | /** 1327 | * optional string source_instance = 6; 1328 | * 1329 | *
1330 |        */ Instance that emitted the message.
1331 |        * 
1332 | */ 1333 | public com.google.protobuf.ByteString 1334 | getSourceInstanceBytes() { 1335 | Object ref = sourceInstance_; 1336 | if (ref instanceof String) { 1337 | com.google.protobuf.ByteString b = 1338 | com.google.protobuf.ByteString.copyFromUtf8( 1339 | (String) ref); 1340 | sourceInstance_ = b; 1341 | return b; 1342 | } else { 1343 | return (com.google.protobuf.ByteString) ref; 1344 | } 1345 | } 1346 | /** 1347 | * optional string source_instance = 6; 1348 | * 1349 | *
1350 |        */ Instance that emitted the message.
1351 |        * 
1352 | */ 1353 | public Builder setSourceInstance( 1354 | String value) { 1355 | if (value == null) { 1356 | throw new NullPointerException(); 1357 | } 1358 | bitField0_ |= 0x00000020; 1359 | sourceInstance_ = value; 1360 | onChanged(); 1361 | return this; 1362 | } 1363 | /** 1364 | * optional string source_instance = 6; 1365 | * 1366 | *
1367 |        */ Instance that emitted the message.
1368 |        * 
1369 | */ 1370 | public Builder clearSourceInstance() { 1371 | bitField0_ = (bitField0_ & ~0x00000020); 1372 | sourceInstance_ = getDefaultInstance().getSourceInstance(); 1373 | onChanged(); 1374 | return this; 1375 | } 1376 | /** 1377 | * optional string source_instance = 6; 1378 | * 1379 | *
1380 |        */ Instance that emitted the message.
1381 |        * 
1382 | */ 1383 | public Builder setSourceInstanceBytes( 1384 | com.google.protobuf.ByteString value) { 1385 | if (value == null) { 1386 | throw new NullPointerException(); 1387 | } 1388 | bitField0_ |= 0x00000020; 1389 | sourceInstance_ = value; 1390 | onChanged(); 1391 | return this; 1392 | } 1393 | 1394 | // @@protoc_insertion_point(builder_scope:events.LogMessage) 1395 | } 1396 | 1397 | static { 1398 | defaultInstance = new LogMessage(true); 1399 | defaultInstance.initFields(); 1400 | } 1401 | 1402 | // @@protoc_insertion_point(class_scope:events.LogMessage) 1403 | } 1404 | 1405 | private static final com.google.protobuf.Descriptors.Descriptor 1406 | internal_static_events_LogMessage_descriptor; 1407 | private static 1408 | com.google.protobuf.GeneratedMessage.FieldAccessorTable 1409 | internal_static_events_LogMessage_fieldAccessorTable; 1410 | 1411 | public static com.google.protobuf.Descriptors.FileDescriptor 1412 | getDescriptor() { 1413 | return descriptor; 1414 | } 1415 | private static com.google.protobuf.Descriptors.FileDescriptor 1416 | descriptor; 1417 | static { 1418 | String[] descriptorData = { 1419 | "\n\tlog.proto\022\006events\"\305\001\n\nLogMessage\022\017\n\007me" + 1420 | "ssage\030\001 \002(\014\0224\n\014message_type\030\002 \002(\0162\036.even" + 1421 | "ts.LogMessage.MessageType\022\021\n\ttimestamp\030\003" + 1422 | " \002(\003\022\016\n\006app_id\030\004 \001(\t\022\023\n\013source_type\030\005 \001(" + 1423 | "\t\022\027\n\017source_instance\030\006 \001(\t\"\037\n\013MessageTyp" + 1424 | "e\022\007\n\003OUT\020\001\022\007\n\003ERR\020\002" 1425 | }; 1426 | com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = 1427 | new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { 1428 | public com.google.protobuf.ExtensionRegistry assignDescriptors( 1429 | com.google.protobuf.Descriptors.FileDescriptor root) { 1430 | descriptor = root; 1431 | return null; 1432 | } 1433 | }; 1434 | com.google.protobuf.Descriptors.FileDescriptor 1435 | .internalBuildGeneratedFileFrom(descriptorData, 1436 | new com.google.protobuf.Descriptors.FileDescriptor[] { 1437 | }, assigner); 1438 | internal_static_events_LogMessage_descriptor = 1439 | getDescriptor().getMessageTypes().get(0); 1440 | internal_static_events_LogMessage_fieldAccessorTable = new 1441 | com.google.protobuf.GeneratedMessage.FieldAccessorTable( 1442 | internal_static_events_LogMessage_descriptor, 1443 | new String[] { "Message", "MessageType", "Timestamp", "AppId", "SourceType", "SourceInstance", }); 1444 | } 1445 | 1446 | // @@protoc_insertion_point(outer_class_scope) 1447 | } 1448 | -------------------------------------------------------------------------------- /src/main/java/events/Uuid.java: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: uuid.proto 3 | 4 | package events; 5 | 6 | public final class Uuid { 7 | private Uuid() {} 8 | public static void registerAllExtensions( 9 | com.google.protobuf.ExtensionRegistry registry) { 10 | } 11 | public interface UUIDOrBuilder extends 12 | // @@protoc_insertion_point(interface_extends:events.UUID) 13 | com.google.protobuf.MessageOrBuilder { 14 | 15 | /** 16 | * required uint64 low = 1; 17 | */ 18 | boolean hasLow(); 19 | /** 20 | * required uint64 low = 1; 21 | */ 22 | long getLow(); 23 | 24 | /** 25 | * required uint64 high = 2; 26 | */ 27 | boolean hasHigh(); 28 | /** 29 | * required uint64 high = 2; 30 | */ 31 | long getHigh(); 32 | } 33 | /** 34 | * Protobuf type {@code events.UUID} 35 | * 36 | *
 37 |    */ Type representing a 128-bit UUID.
 38 |    * 
39 | */ 40 | public static final class UUID extends 41 | com.google.protobuf.GeneratedMessage implements 42 | // @@protoc_insertion_point(message_implements:events.UUID) 43 | UUIDOrBuilder { 44 | // Use UUID.newBuilder() to construct. 45 | private UUID(com.google.protobuf.GeneratedMessage.Builder builder) { 46 | super(builder); 47 | this.unknownFields = builder.getUnknownFields(); 48 | } 49 | private UUID(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } 50 | 51 | private static final UUID defaultInstance; 52 | public static UUID getDefaultInstance() { 53 | return defaultInstance; 54 | } 55 | 56 | public UUID getDefaultInstanceForType() { 57 | return defaultInstance; 58 | } 59 | 60 | private final com.google.protobuf.UnknownFieldSet unknownFields; 61 | @Override 62 | public final com.google.protobuf.UnknownFieldSet 63 | getUnknownFields() { 64 | return this.unknownFields; 65 | } 66 | private UUID( 67 | com.google.protobuf.CodedInputStream input, 68 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 69 | throws com.google.protobuf.InvalidProtocolBufferException { 70 | initFields(); 71 | int mutable_bitField0_ = 0; 72 | com.google.protobuf.UnknownFieldSet.Builder unknownFields = 73 | com.google.protobuf.UnknownFieldSet.newBuilder(); 74 | try { 75 | boolean done = false; 76 | while (!done) { 77 | int tag = input.readTag(); 78 | switch (tag) { 79 | case 0: 80 | done = true; 81 | break; 82 | default: { 83 | if (!parseUnknownField(input, unknownFields, 84 | extensionRegistry, tag)) { 85 | done = true; 86 | } 87 | break; 88 | } 89 | case 8: { 90 | bitField0_ |= 0x00000001; 91 | low_ = input.readUInt64(); 92 | break; 93 | } 94 | case 16: { 95 | bitField0_ |= 0x00000002; 96 | high_ = input.readUInt64(); 97 | break; 98 | } 99 | } 100 | } 101 | } catch (com.google.protobuf.InvalidProtocolBufferException e) { 102 | throw e.setUnfinishedMessage(this); 103 | } catch (java.io.IOException e) { 104 | throw new com.google.protobuf.InvalidProtocolBufferException( 105 | e.getMessage()).setUnfinishedMessage(this); 106 | } finally { 107 | this.unknownFields = unknownFields.build(); 108 | makeExtensionsImmutable(); 109 | } 110 | } 111 | public static final com.google.protobuf.Descriptors.Descriptor 112 | getDescriptor() { 113 | return events.Uuid.internal_static_events_UUID_descriptor; 114 | } 115 | 116 | protected FieldAccessorTable 117 | internalGetFieldAccessorTable() { 118 | return events.Uuid.internal_static_events_UUID_fieldAccessorTable 119 | .ensureFieldAccessorsInitialized( 120 | events.Uuid.UUID.class, events.Uuid.UUID.Builder.class); 121 | } 122 | 123 | public static com.google.protobuf.Parser PARSER = 124 | new com.google.protobuf.AbstractParser() { 125 | public UUID parsePartialFrom( 126 | com.google.protobuf.CodedInputStream input, 127 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 128 | throws com.google.protobuf.InvalidProtocolBufferException { 129 | return new UUID(input, extensionRegistry); 130 | } 131 | }; 132 | 133 | @Override 134 | public com.google.protobuf.Parser getParserForType() { 135 | return PARSER; 136 | } 137 | 138 | private int bitField0_; 139 | public static final int LOW_FIELD_NUMBER = 1; 140 | private long low_; 141 | /** 142 | * required uint64 low = 1; 143 | */ 144 | public boolean hasLow() { 145 | return ((bitField0_ & 0x00000001) == 0x00000001); 146 | } 147 | /** 148 | * required uint64 low = 1; 149 | */ 150 | public long getLow() { 151 | return low_; 152 | } 153 | 154 | public static final int HIGH_FIELD_NUMBER = 2; 155 | private long high_; 156 | /** 157 | * required uint64 high = 2; 158 | */ 159 | public boolean hasHigh() { 160 | return ((bitField0_ & 0x00000002) == 0x00000002); 161 | } 162 | /** 163 | * required uint64 high = 2; 164 | */ 165 | public long getHigh() { 166 | return high_; 167 | } 168 | 169 | private void initFields() { 170 | low_ = 0L; 171 | high_ = 0L; 172 | } 173 | private byte memoizedIsInitialized = -1; 174 | public final boolean isInitialized() { 175 | byte isInitialized = memoizedIsInitialized; 176 | if (isInitialized == 1) return true; 177 | if (isInitialized == 0) return false; 178 | 179 | if (!hasLow()) { 180 | memoizedIsInitialized = 0; 181 | return false; 182 | } 183 | if (!hasHigh()) { 184 | memoizedIsInitialized = 0; 185 | return false; 186 | } 187 | memoizedIsInitialized = 1; 188 | return true; 189 | } 190 | 191 | public void writeTo(com.google.protobuf.CodedOutputStream output) 192 | throws java.io.IOException { 193 | getSerializedSize(); 194 | if (((bitField0_ & 0x00000001) == 0x00000001)) { 195 | output.writeUInt64(1, low_); 196 | } 197 | if (((bitField0_ & 0x00000002) == 0x00000002)) { 198 | output.writeUInt64(2, high_); 199 | } 200 | getUnknownFields().writeTo(output); 201 | } 202 | 203 | private int memoizedSerializedSize = -1; 204 | public int getSerializedSize() { 205 | int size = memoizedSerializedSize; 206 | if (size != -1) return size; 207 | 208 | size = 0; 209 | if (((bitField0_ & 0x00000001) == 0x00000001)) { 210 | size += com.google.protobuf.CodedOutputStream 211 | .computeUInt64Size(1, low_); 212 | } 213 | if (((bitField0_ & 0x00000002) == 0x00000002)) { 214 | size += com.google.protobuf.CodedOutputStream 215 | .computeUInt64Size(2, high_); 216 | } 217 | size += getUnknownFields().getSerializedSize(); 218 | memoizedSerializedSize = size; 219 | return size; 220 | } 221 | 222 | private static final long serialVersionUID = 0L; 223 | @Override 224 | protected Object writeReplace() 225 | throws java.io.ObjectStreamException { 226 | return super.writeReplace(); 227 | } 228 | 229 | public static events.Uuid.UUID parseFrom( 230 | com.google.protobuf.ByteString data) 231 | throws com.google.protobuf.InvalidProtocolBufferException { 232 | return PARSER.parseFrom(data); 233 | } 234 | public static events.Uuid.UUID parseFrom( 235 | com.google.protobuf.ByteString data, 236 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 237 | throws com.google.protobuf.InvalidProtocolBufferException { 238 | return PARSER.parseFrom(data, extensionRegistry); 239 | } 240 | public static events.Uuid.UUID parseFrom(byte[] data) 241 | throws com.google.protobuf.InvalidProtocolBufferException { 242 | return PARSER.parseFrom(data); 243 | } 244 | public static events.Uuid.UUID parseFrom( 245 | byte[] data, 246 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 247 | throws com.google.protobuf.InvalidProtocolBufferException { 248 | return PARSER.parseFrom(data, extensionRegistry); 249 | } 250 | public static events.Uuid.UUID parseFrom(java.io.InputStream input) 251 | throws java.io.IOException { 252 | return PARSER.parseFrom(input); 253 | } 254 | public static events.Uuid.UUID parseFrom( 255 | java.io.InputStream input, 256 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 257 | throws java.io.IOException { 258 | return PARSER.parseFrom(input, extensionRegistry); 259 | } 260 | public static events.Uuid.UUID parseDelimitedFrom(java.io.InputStream input) 261 | throws java.io.IOException { 262 | return PARSER.parseDelimitedFrom(input); 263 | } 264 | public static events.Uuid.UUID parseDelimitedFrom( 265 | java.io.InputStream input, 266 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 267 | throws java.io.IOException { 268 | return PARSER.parseDelimitedFrom(input, extensionRegistry); 269 | } 270 | public static events.Uuid.UUID parseFrom( 271 | com.google.protobuf.CodedInputStream input) 272 | throws java.io.IOException { 273 | return PARSER.parseFrom(input); 274 | } 275 | public static events.Uuid.UUID parseFrom( 276 | com.google.protobuf.CodedInputStream input, 277 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 278 | throws java.io.IOException { 279 | return PARSER.parseFrom(input, extensionRegistry); 280 | } 281 | 282 | public static Builder newBuilder() { return Builder.create(); } 283 | public Builder newBuilderForType() { return newBuilder(); } 284 | public static Builder newBuilder(events.Uuid.UUID prototype) { 285 | return newBuilder().mergeFrom(prototype); 286 | } 287 | public Builder toBuilder() { return newBuilder(this); } 288 | 289 | @Override 290 | protected Builder newBuilderForType( 291 | BuilderParent parent) { 292 | Builder builder = new Builder(parent); 293 | return builder; 294 | } 295 | /** 296 | * Protobuf type {@code events.UUID} 297 | * 298 | *
299 |      */ Type representing a 128-bit UUID.
300 |      * 
301 | */ 302 | public static final class Builder extends 303 | com.google.protobuf.GeneratedMessage.Builder implements 304 | // @@protoc_insertion_point(builder_implements:events.UUID) 305 | events.Uuid.UUIDOrBuilder { 306 | public static final com.google.protobuf.Descriptors.Descriptor 307 | getDescriptor() { 308 | return events.Uuid.internal_static_events_UUID_descriptor; 309 | } 310 | 311 | protected FieldAccessorTable 312 | internalGetFieldAccessorTable() { 313 | return events.Uuid.internal_static_events_UUID_fieldAccessorTable 314 | .ensureFieldAccessorsInitialized( 315 | events.Uuid.UUID.class, events.Uuid.UUID.Builder.class); 316 | } 317 | 318 | // Construct using events.Uuid.UUID.newBuilder() 319 | private Builder() { 320 | maybeForceBuilderInitialization(); 321 | } 322 | 323 | private Builder( 324 | BuilderParent parent) { 325 | super(parent); 326 | maybeForceBuilderInitialization(); 327 | } 328 | private void maybeForceBuilderInitialization() { 329 | if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { 330 | } 331 | } 332 | private static Builder create() { 333 | return new Builder(); 334 | } 335 | 336 | public Builder clear() { 337 | super.clear(); 338 | low_ = 0L; 339 | bitField0_ = (bitField0_ & ~0x00000001); 340 | high_ = 0L; 341 | bitField0_ = (bitField0_ & ~0x00000002); 342 | return this; 343 | } 344 | 345 | public Builder clone() { 346 | return create().mergeFrom(buildPartial()); 347 | } 348 | 349 | public com.google.protobuf.Descriptors.Descriptor 350 | getDescriptorForType() { 351 | return events.Uuid.internal_static_events_UUID_descriptor; 352 | } 353 | 354 | public events.Uuid.UUID getDefaultInstanceForType() { 355 | return events.Uuid.UUID.getDefaultInstance(); 356 | } 357 | 358 | public events.Uuid.UUID build() { 359 | events.Uuid.UUID result = buildPartial(); 360 | if (!result.isInitialized()) { 361 | throw newUninitializedMessageException(result); 362 | } 363 | return result; 364 | } 365 | 366 | public events.Uuid.UUID buildPartial() { 367 | events.Uuid.UUID result = new events.Uuid.UUID(this); 368 | int from_bitField0_ = bitField0_; 369 | int to_bitField0_ = 0; 370 | if (((from_bitField0_ & 0x00000001) == 0x00000001)) { 371 | to_bitField0_ |= 0x00000001; 372 | } 373 | result.low_ = low_; 374 | if (((from_bitField0_ & 0x00000002) == 0x00000002)) { 375 | to_bitField0_ |= 0x00000002; 376 | } 377 | result.high_ = high_; 378 | result.bitField0_ = to_bitField0_; 379 | onBuilt(); 380 | return result; 381 | } 382 | 383 | public Builder mergeFrom(com.google.protobuf.Message other) { 384 | if (other instanceof events.Uuid.UUID) { 385 | return mergeFrom((events.Uuid.UUID)other); 386 | } else { 387 | super.mergeFrom(other); 388 | return this; 389 | } 390 | } 391 | 392 | public Builder mergeFrom(events.Uuid.UUID other) { 393 | if (other == events.Uuid.UUID.getDefaultInstance()) return this; 394 | if (other.hasLow()) { 395 | setLow(other.getLow()); 396 | } 397 | if (other.hasHigh()) { 398 | setHigh(other.getHigh()); 399 | } 400 | this.mergeUnknownFields(other.getUnknownFields()); 401 | return this; 402 | } 403 | 404 | public final boolean isInitialized() { 405 | if (!hasLow()) { 406 | 407 | return false; 408 | } 409 | if (!hasHigh()) { 410 | 411 | return false; 412 | } 413 | return true; 414 | } 415 | 416 | public Builder mergeFrom( 417 | com.google.protobuf.CodedInputStream input, 418 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) 419 | throws java.io.IOException { 420 | events.Uuid.UUID parsedMessage = null; 421 | try { 422 | parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); 423 | } catch (com.google.protobuf.InvalidProtocolBufferException e) { 424 | parsedMessage = (events.Uuid.UUID) e.getUnfinishedMessage(); 425 | throw e; 426 | } finally { 427 | if (parsedMessage != null) { 428 | mergeFrom(parsedMessage); 429 | } 430 | } 431 | return this; 432 | } 433 | private int bitField0_; 434 | 435 | private long low_ ; 436 | /** 437 | * required uint64 low = 1; 438 | */ 439 | public boolean hasLow() { 440 | return ((bitField0_ & 0x00000001) == 0x00000001); 441 | } 442 | /** 443 | * required uint64 low = 1; 444 | */ 445 | public long getLow() { 446 | return low_; 447 | } 448 | /** 449 | * required uint64 low = 1; 450 | */ 451 | public Builder setLow(long value) { 452 | bitField0_ |= 0x00000001; 453 | low_ = value; 454 | onChanged(); 455 | return this; 456 | } 457 | /** 458 | * required uint64 low = 1; 459 | */ 460 | public Builder clearLow() { 461 | bitField0_ = (bitField0_ & ~0x00000001); 462 | low_ = 0L; 463 | onChanged(); 464 | return this; 465 | } 466 | 467 | private long high_ ; 468 | /** 469 | * required uint64 high = 2; 470 | */ 471 | public boolean hasHigh() { 472 | return ((bitField0_ & 0x00000002) == 0x00000002); 473 | } 474 | /** 475 | * required uint64 high = 2; 476 | */ 477 | public long getHigh() { 478 | return high_; 479 | } 480 | /** 481 | * required uint64 high = 2; 482 | */ 483 | public Builder setHigh(long value) { 484 | bitField0_ |= 0x00000002; 485 | high_ = value; 486 | onChanged(); 487 | return this; 488 | } 489 | /** 490 | * required uint64 high = 2; 491 | */ 492 | public Builder clearHigh() { 493 | bitField0_ = (bitField0_ & ~0x00000002); 494 | high_ = 0L; 495 | onChanged(); 496 | return this; 497 | } 498 | 499 | // @@protoc_insertion_point(builder_scope:events.UUID) 500 | } 501 | 502 | static { 503 | defaultInstance = new UUID(true); 504 | defaultInstance.initFields(); 505 | } 506 | 507 | // @@protoc_insertion_point(class_scope:events.UUID) 508 | } 509 | 510 | private static final com.google.protobuf.Descriptors.Descriptor 511 | internal_static_events_UUID_descriptor; 512 | private static 513 | com.google.protobuf.GeneratedMessage.FieldAccessorTable 514 | internal_static_events_UUID_fieldAccessorTable; 515 | 516 | public static com.google.protobuf.Descriptors.FileDescriptor 517 | getDescriptor() { 518 | return descriptor; 519 | } 520 | private static com.google.protobuf.Descriptors.FileDescriptor 521 | descriptor; 522 | static { 523 | String[] descriptorData = { 524 | "\n\nuuid.proto\022\006events\"!\n\004UUID\022\013\n\003low\030\001 \002(" + 525 | "\004\022\014\n\004high\030\002 \002(\004" 526 | }; 527 | com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = 528 | new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { 529 | public com.google.protobuf.ExtensionRegistry assignDescriptors( 530 | com.google.protobuf.Descriptors.FileDescriptor root) { 531 | descriptor = root; 532 | return null; 533 | } 534 | }; 535 | com.google.protobuf.Descriptors.FileDescriptor 536 | .internalBuildGeneratedFileFrom(descriptorData, 537 | new com.google.protobuf.Descriptors.FileDescriptor[] { 538 | }, assigner); 539 | internal_static_events_UUID_descriptor = 540 | getDescriptor().getMessageTypes().get(0); 541 | internal_static_events_UUID_fieldAccessorTable = new 542 | com.google.protobuf.GeneratedMessage.FieldAccessorTable( 543 | internal_static_events_UUID_descriptor, 544 | new String[] { "Low", "High", }); 545 | } 546 | 547 | // @@protoc_insertion_point(outer_class_scope) 548 | } 549 | -------------------------------------------------------------------------------- /src/main/java/org/springframework/xd/firehose/ByteBufferMessageConverter.java: -------------------------------------------------------------------------------- 1 | package org.springframework.xd.firehose; 2 | 3 | import org.springframework.messaging.Message; 4 | import org.springframework.messaging.MessageHeaders; 5 | import org.springframework.messaging.converter.AbstractMessageConverter; 6 | import org.springframework.util.MimeTypeUtils; 7 | 8 | import java.nio.ByteBuffer; 9 | 10 | /** 11 | * Created by vcarvalho on 3/17/15. 12 | */ 13 | public class ByteBufferMessageConverter extends AbstractMessageConverter { 14 | protected ByteBufferMessageConverter() { 15 | super(MimeTypeUtils.APPLICATION_OCTET_STREAM); 16 | } 17 | 18 | @Override 19 | protected boolean supports(Class clazz) { 20 | return ByteBuffer.class.isAssignableFrom(clazz); 21 | } 22 | 23 | @Override 24 | public Object convertFromInternal(Message message, Class targetClass) { 25 | ByteBuffer buffer = (ByteBuffer) message.getPayload(); 26 | byte[] bytes = new byte[buffer.remaining()]; 27 | buffer.get(bytes,0,bytes.length); 28 | return bytes; 29 | } 30 | 31 | @Override 32 | public Object convertToInternal(Object payload, MessageHeaders headers) { 33 | return payload; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/org/springframework/xd/firehose/EnvelopeTransformer.java: -------------------------------------------------------------------------------- 1 | package org.springframework.xd.firehose; 2 | 3 | import events.EnvelopeOuterClass; 4 | import org.springframework.integration.transformer.AbstractTransformer; 5 | import org.springframework.messaging.Message; 6 | 7 | /** 8 | * Created by vcarvalho on 3/17/15. 9 | */ 10 | public class EnvelopeTransformer extends AbstractTransformer { 11 | 12 | @Override 13 | protected Object doTransform(Message message) throws Exception { 14 | byte[] bytes = (byte[]) message.getPayload(); 15 | 16 | return EnvelopeOuterClass.Envelope.parseFrom(bytes); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/resources/config/firehose.properties: -------------------------------------------------------------------------------- 1 | options.dopplerUrl.description = Doppler WSS url 2 | options.dopplerUrl.default = wss://doppler.10.244.0.34.xip.io 3 | options.dopplerUrl.type = String 4 | 5 | options.cfAccessToken.description = JWT Access Token 6 | options.cfAccessToken.default = "" 7 | options.cfAccessToken.type = String -------------------------------------------------------------------------------- /src/main/resources/config/firehose.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | --------------------------------------------------------------------------------