Java Code Examples for com.google.ipc.invalidation.util.Bytes#fromByteArray()
The following examples show how to use
com.google.ipc.invalidation.util.Bytes#fromByteArray() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JavaClient.java From 365browser with Apache License 2.0 | 6 votes |
static InvalidationClientState fromMessageNano(com.google.protos.ipc.invalidation.NanoJavaClient.InvalidationClientState message) { if (message == null) { return null; } return new InvalidationClientState(com.google.ipc.invalidation.ticl.proto.Client.RunStateP.fromMessageNano(message.runState), Bytes.fromByteArray(message.clientToken), Bytes.fromByteArray(message.nonce), message.shouldSendRegistrations, message.lastMessageSendTimeMs, message.isOnline, com.google.ipc.invalidation.ticl.proto.JavaClient.ProtocolHandlerState.fromMessageNano(message.protocolHandlerState), com.google.ipc.invalidation.ticl.proto.JavaClient.RegistrationManagerStateP.fromMessageNano(message.registrationManagerState), com.google.ipc.invalidation.ticl.proto.JavaClient.RecurringTaskState.fromMessageNano(message.acquireTokenTaskState), com.google.ipc.invalidation.ticl.proto.JavaClient.RecurringTaskState.fromMessageNano(message.regSyncHeartbeatTaskState), com.google.ipc.invalidation.ticl.proto.JavaClient.RecurringTaskState.fromMessageNano(message.persistentWriteTaskState), com.google.ipc.invalidation.ticl.proto.JavaClient.RecurringTaskState.fromMessageNano(message.heartbeatTaskState), com.google.ipc.invalidation.ticl.proto.JavaClient.RecurringTaskState.fromMessageNano(message.batchingTaskState), com.google.ipc.invalidation.ticl.proto.Client.PersistentTiclState.fromMessageNano(message.lastWrittenState), com.google.ipc.invalidation.ticl.proto.JavaClient.StatisticsState.fromMessageNano(message.statisticsState)); }
Example 2
Source File: AndroidListenerProtocol.java From 365browser with Apache License 2.0 | 6 votes |
static AndroidListenerState fromMessageNano(com.google.protos.ipc.invalidation.NanoAndroidListenerProtocol.AndroidListenerState message) { if (message == null) { return null; } List<com.google.ipc.invalidation.ticl.proto.ClientProtocol.ObjectIdP> registration = new ArrayList<com.google.ipc.invalidation.ticl.proto.ClientProtocol.ObjectIdP>(message.registration.length); for (int i = 0; i < message.registration.length; i++) { registration.add(com.google.ipc.invalidation.ticl.proto.ClientProtocol.ObjectIdP.fromMessageNano(message.registration[i])); } List<com.google.ipc.invalidation.ticl.proto.AndroidListenerProtocol.AndroidListenerState.RetryRegistrationState> retryRegistrationState = new ArrayList<com.google.ipc.invalidation.ticl.proto.AndroidListenerProtocol.AndroidListenerState.RetryRegistrationState>(message.retryRegistrationState.length); for (int i = 0; i < message.retryRegistrationState.length; i++) { retryRegistrationState.add(com.google.ipc.invalidation.ticl.proto.AndroidListenerProtocol.AndroidListenerState.RetryRegistrationState.fromMessageNano(message.retryRegistrationState[i])); } List<com.google.ipc.invalidation.ticl.proto.AndroidListenerProtocol.AndroidListenerState.ScheduledRegistrationRetry> registrationRetry = new ArrayList<com.google.ipc.invalidation.ticl.proto.AndroidListenerProtocol.AndroidListenerState.ScheduledRegistrationRetry>(message.registrationRetry.length); for (int i = 0; i < message.registrationRetry.length; i++) { registrationRetry.add(com.google.ipc.invalidation.ticl.proto.AndroidListenerProtocol.AndroidListenerState.ScheduledRegistrationRetry.fromMessageNano(message.registrationRetry[i])); } return new AndroidListenerState(registration, retryRegistrationState, Bytes.fromByteArray(message.clientId), message.requestCodeSeqNum, registrationRetry); }
Example 3
Source File: AndroidService.java From 365browser with Apache License 2.0 | 5 votes |
static CreateClient fromMessageNano(com.google.protos.ipc.invalidation.NanoAndroidService.InternalDowncall.CreateClient message) { if (message == null) { return null; } return new CreateClient(message.clientType, Bytes.fromByteArray(message.clientName), com.google.ipc.invalidation.ticl.proto.ClientProtocol.ClientConfigP.fromMessageNano(message.clientConfig), message.skipStartForTest); }
Example 4
Source File: AndroidService.java From 365browser with Apache License 2.0 | 5 votes |
static Metadata fromMessageNano(com.google.protos.ipc.invalidation.NanoAndroidService.AndroidTiclState.Metadata message) { if (message == null) { return null; } return new Metadata(message.clientType, Bytes.fromByteArray(message.clientName), message.ticlId, com.google.ipc.invalidation.ticl.proto.ClientProtocol.ClientConfigP.fromMessageNano(message.clientConfig)); }
Example 5
Source File: AndroidListenerProtocol.java From 365browser with Apache License 2.0 | 5 votes |
static RegistrationCommand fromMessageNano(com.google.protos.ipc.invalidation.NanoAndroidListenerProtocol.RegistrationCommand message) { if (message == null) { return null; } List<com.google.ipc.invalidation.ticl.proto.ClientProtocol.ObjectIdP> objectId = new ArrayList<com.google.ipc.invalidation.ticl.proto.ClientProtocol.ObjectIdP>(message.objectId.length); for (int i = 0; i < message.objectId.length; i++) { objectId.add(com.google.ipc.invalidation.ticl.proto.ClientProtocol.ObjectIdP.fromMessageNano(message.objectId[i])); } return new RegistrationCommand(message.isRegister, objectId, Bytes.fromByteArray(message.clientId), message.isDelayed); }
Example 6
Source File: AndroidService.java From 365browser with Apache License 2.0 | 5 votes |
static InvalidateUpcall fromMessageNano(com.google.protos.ipc.invalidation.NanoAndroidService.ListenerUpcall.InvalidateUpcall message) { if (message == null) { return null; } return new InvalidateUpcall(Bytes.fromByteArray(message.ackHandle), com.google.ipc.invalidation.ticl.proto.ClientProtocol.InvalidationP.fromMessageNano(message.invalidation), com.google.ipc.invalidation.ticl.proto.ClientProtocol.ObjectIdP.fromMessageNano(message.invalidateUnknown), message.invalidateAll); }
Example 7
Source File: ClientProtocol.java From 365browser with Apache License 2.0 | 5 votes |
static ServerHeader fromMessageNano(com.google.protos.ipc.invalidation.nano.NanoClientProtocol.ServerHeader message) { if (message == null) { return null; } return new ServerHeader(com.google.ipc.invalidation.ticl.proto.ClientProtocol.ProtocolVersion.fromMessageNano(message.protocolVersion), Bytes.fromByteArray(message.clientToken), com.google.ipc.invalidation.ticl.proto.ClientProtocol.RegistrationSummary.fromMessageNano(message.registrationSummary), message.serverTimeMs, message.messageId); }
Example 8
Source File: ClientProtocol.java From 365browser with Apache License 2.0 | 5 votes |
static InitializeMessage fromMessageNano(com.google.protos.ipc.invalidation.nano.NanoClientProtocol.InitializeMessage message) { if (message == null) { return null; } return new InitializeMessage(message.clientType, Bytes.fromByteArray(message.nonce), com.google.ipc.invalidation.ticl.proto.ClientProtocol.ApplicationClientIdP.fromMessageNano(message.applicationClientId), message.digestSerializationType); }
Example 9
Source File: ClientProtocol.java From 365browser with Apache License 2.0 | 5 votes |
static ClientHeader fromMessageNano(com.google.protos.ipc.invalidation.nano.NanoClientProtocol.ClientHeader message) { if (message == null) { return null; } return new ClientHeader(com.google.ipc.invalidation.ticl.proto.ClientProtocol.ProtocolVersion.fromMessageNano(message.protocolVersion), Bytes.fromByteArray(message.clientToken), com.google.ipc.invalidation.ticl.proto.ClientProtocol.RegistrationSummary.fromMessageNano(message.registrationSummary), message.clientTimeMs, message.maxKnownServerTimeMs, message.messageId, message.clientType); }
Example 10
Source File: ClientProtocol.java From 365browser with Apache License 2.0 | 5 votes |
static InvalidationP fromMessageNano(com.google.protos.ipc.invalidation.nano.NanoClientProtocol.InvalidationP message) { if (message == null) { return null; } return new InvalidationP(com.google.ipc.invalidation.ticl.proto.ClientProtocol.ObjectIdP.fromMessageNano(message.objectId), message.isKnownVersion, message.version, Bytes.fromByteArray(message.payload), message.isTrickleRestart); }
Example 11
Source File: ClientProtocol.java From 365browser with Apache License 2.0 | 4 votes |
static TokenControlMessage fromMessageNano(com.google.protos.ipc.invalidation.nano.NanoClientProtocol.TokenControlMessage message) { if (message == null) { return null; } return new TokenControlMessage(Bytes.fromByteArray(message.newToken)); }
Example 12
Source File: AndroidService.java From 365browser with Apache License 2.0 | 4 votes |
static AckDowncall fromMessageNano(com.google.protos.ipc.invalidation.NanoAndroidService.ClientDowncall.AckDowncall message) { if (message == null) { return null; } return new AckDowncall(Bytes.fromByteArray(message.ackHandle)); }
Example 13
Source File: AndroidService.java From 365browser with Apache License 2.0 | 4 votes |
static ServerMessage fromMessageNano(com.google.protos.ipc.invalidation.NanoAndroidService.InternalDowncall.ServerMessage message) { if (message == null) { return null; } return new ServerMessage(Bytes.fromByteArray(message.data)); }
Example 14
Source File: AndroidListenerProtocol.java From 365browser with Apache License 2.0 | 4 votes |
static StartCommand fromMessageNano(com.google.protos.ipc.invalidation.NanoAndroidListenerProtocol.StartCommand message) { if (message == null) { return null; } return new StartCommand(message.clientType, Bytes.fromByteArray(message.clientName), message.allowSuppression); }
Example 15
Source File: AndroidService.java From 365browser with Apache License 2.0 | 4 votes |
static AndroidNetworkSendRequest fromMessageNano(com.google.protos.ipc.invalidation.NanoAndroidService.AndroidNetworkSendRequest message) { if (message == null) { return null; } return new AndroidNetworkSendRequest(com.google.ipc.invalidation.ticl.proto.ClientProtocol.Version.fromMessageNano(message.version), Bytes.fromByteArray(message.message)); }
Example 16
Source File: ClientProtocol.java From 365browser with Apache License 2.0 | 4 votes |
static RegistrationSummary fromMessageNano(com.google.protos.ipc.invalidation.nano.NanoClientProtocol.RegistrationSummary message) { if (message == null) { return null; } return new RegistrationSummary(message.numRegistrations, Bytes.fromByteArray(message.registrationDigest)); }
Example 17
Source File: Client.java From 365browser with Apache License 2.0 | 4 votes |
static PersistentTiclState fromMessageNano(com.google.protos.ipc.invalidation.nano.NanoClient.PersistentTiclState message) { if (message == null) { return null; } return new PersistentTiclState(Bytes.fromByteArray(message.clientToken), message.lastMessageSendTimeMs); }
Example 18
Source File: Client.java From 365browser with Apache License 2.0 | 4 votes |
static PersistentStateBlob fromMessageNano(com.google.protos.ipc.invalidation.nano.NanoClient.PersistentStateBlob message) { if (message == null) { return null; } return new PersistentStateBlob(com.google.ipc.invalidation.ticl.proto.Client.PersistentTiclState.fromMessageNano(message.ticlState), Bytes.fromByteArray(message.authenticationCode)); }
Example 19
Source File: ChannelCommon.java From 365browser with Apache License 2.0 | 4 votes |
static NetworkEndpointId fromMessageNano(com.google.protos.ipc.invalidation.nano.NanoChannelCommon.NetworkEndpointId message) { if (message == null) { return null; } return new NetworkEndpointId(message.networkAddress, Bytes.fromByteArray(message.clientAddress), message.isOffline); }
Example 20
Source File: AndroidChannel.java From 365browser with Apache License 2.0 | 4 votes |
static AddressedAndroidMessage fromMessageNano(com.google.protos.ipc.invalidation.NanoAndroidChannel.AddressedAndroidMessage message) { if (message == null) { return null; } return new AddressedAndroidMessage(message.clientKey, Bytes.fromByteArray(message.message)); }