@Test public void newFactory_withDestination_shouldSupportProtobuf() { TransportRuntime runtime = new TransportRuntime( fixedClock(EVENT_MILLIS), fixedClock(UPTIME_MILLIS), new ImmediateScheduler(Runnable::run, mockRegistry), new Uploader(null, null, null, null, null, null, () -> 2), mockInitializer); TransportFactory transportFactory = runtime.newFactory(new TestDestination()); Transport<String> transport = transportFactory.getTransport( "hello", String.class, Encoding.of("proto"), String::getBytes); assertThat(transport).isNotNull(); assertThrows( IllegalArgumentException.class, () -> transportFactory.getTransport( "hello", String.class, Encoding.of("json"), String::getBytes)); }
@Deprecated public TransportFactory newFactory(String backendName) { return new TransportFactoryImpl( getSupportedEncodings(null), TransportContext.builder().setBackendName(backendName).build(), this); }
TransportRuntime implements TransportInternal { @Deprecated public TransportFactory newFactory(String backendName) { return new TransportFactoryImpl( getSupportedEncodings(null), TransportContext.builder().setBackendName(backendName).build(), this); } }
TransportRuntime implements TransportInternal { @Deprecated public TransportFactory newFactory(String backendName) { return new TransportFactoryImpl( getSupportedEncodings(null), TransportContext.builder().setBackendName(backendName).build(), this); } @Inject  TransportRuntime(
      @WallTime Clock eventClock,
      @Monotonic Clock uptimeClock,
      Scheduler scheduler,
      Uploader uploader,
      WorkInitializer initializer); }
TransportRuntime implements TransportInternal { @Deprecated public TransportFactory newFactory(String backendName) { return new TransportFactoryImpl( getSupportedEncodings(null), TransportContext.builder().setBackendName(backendName).build(), this); } @Inject  TransportRuntime(
      @WallTime Clock eventClock,
      @Monotonic Clock uptimeClock,
      Scheduler scheduler,
      Uploader uploader,
      WorkInitializer initializer); static void initialize(Context applicationContext); static TransportRuntime getInstance(); @Deprecated TransportFactory newFactory(String backendName); TransportFactory newFactory(Destination destination); @RestrictTo(RestrictTo.Scope.LIBRARY) Uploader getUploader(); @Override void send(SendRequest request, TransportScheduleCallback callback); }
TransportRuntime implements TransportInternal { @Deprecated public TransportFactory newFactory(String backendName) { return new TransportFactoryImpl( getSupportedEncodings(null), TransportContext.builder().setBackendName(backendName).build(), this); } @Inject  TransportRuntime(
      @WallTime Clock eventClock,
      @Monotonic Clock uptimeClock,
      Scheduler scheduler,
      Uploader uploader,
      WorkInitializer initializer); static void initialize(Context applicationContext); static TransportRuntime getInstance(); @Deprecated TransportFactory newFactory(String backendName); TransportFactory newFactory(Destination destination); @RestrictTo(RestrictTo.Scope.LIBRARY) Uploader getUploader(); @Override void send(SendRequest request, TransportScheduleCallback callback);  }