@ Override public byte [ ] encode ( final RemoteEvent < T > obj ) { if ( obj . getEvent ( ) == null ) { throw new RemoteRuntimeException ( "Event is null" ) ; } final WakeMessagePBuf . Builder builder = WakeMessagePBuf . newBuilder ( ) ; builder . setSeq ( obj . getSeq ( ) ) ; builder . setData ( ByteString . copyFrom ( encoder . encode ( obj . getEvent ( ) ) ) ) ; return builder . build ( ) . toByteArray ( ) ; }
Encodes the remote event object to bytes .