@Test public void requestSubscribe() { final Connector connector = createConnector(); newConnection( connector ); connector.pauseMessageScheduler(); final ChannelAddress address = new ChannelAddress( 1, 0 ); assertFalse( connector.isAreaOfInterestRequestPending( AreaOfInterestRequest.Type.ADD, address, null ) ); final TestSpyEventHandler handler = registerTestSpyEventHandler(); connector.requestSubscribe( address, null ); assertTrue( connector.isAreaOfInterestRequestPending( AreaOfInterestRequest.Type.ADD, address, null ) ); handler.assertEventCount( 1 ); handler.assertNextEvent( SubscribeRequestQueuedEvent.class, e -> assertEquals( e.getAddress(), address ) ); }
void requestSubscribe( @Nonnull final ChannelAddress address, @Nullable final Object filter ) { if ( Replicant.areSpiesEnabled() && getReplicantContext().getSpy().willPropagateSpyEvents() ) { getReplicantContext().getSpy().reportSpyEvent( new SubscribeRequestQueuedEvent( address, filter ) ); } ensureConnection().requestSubscribe( address, filter ); triggerMessageScheduler(); }
Connector extends ReplicantService { void requestSubscribe( @Nonnull final ChannelAddress address, @Nullable final Object filter ) { if ( Replicant.areSpiesEnabled() && getReplicantContext().getSpy().willPropagateSpyEvents() ) { getReplicantContext().getSpy().reportSpyEvent( new SubscribeRequestQueuedEvent( address, filter ) ); } ensureConnection().requestSubscribe( address, filter ); triggerMessageScheduler(); } }
Connector extends ReplicantService { void requestSubscribe( @Nonnull final ChannelAddress address, @Nullable final Object filter ) { if ( Replicant.areSpiesEnabled() && getReplicantContext().getSpy().willPropagateSpyEvents() ) { getReplicantContext().getSpy().reportSpyEvent( new SubscribeRequestQueuedEvent( address, filter ) ); } ensureConnection().requestSubscribe( address, filter ); triggerMessageScheduler(); } Connector( @Nullable final ReplicantContext context,
             @Nonnull final SystemSchema schema,
             @Nonnull final Transport transport ); }
Connector extends ReplicantService { void requestSubscribe( @Nonnull final ChannelAddress address, @Nullable final Object filter ) { if ( Replicant.areSpiesEnabled() && getReplicantContext().getSpy().willPropagateSpyEvents() ) { getReplicantContext().getSpy().reportSpyEvent( new SubscribeRequestQueuedEvent( address, filter ) ); } ensureConnection().requestSubscribe( address, filter ); triggerMessageScheduler(); } Connector( @Nullable final ReplicantContext context,
             @Nonnull final SystemSchema schema,
             @Nonnull final Transport transport ); @Override String toString(); }
Connector extends ReplicantService { void requestSubscribe( @Nonnull final ChannelAddress address, @Nullable final Object filter ) { if ( Replicant.areSpiesEnabled() && getReplicantContext().getSpy().willPropagateSpyEvents() ) { getReplicantContext().getSpy().reportSpyEvent( new SubscribeRequestQueuedEvent( address, filter ) ); } ensureConnection().requestSubscribe( address, filter ); triggerMessageScheduler(); } Connector( @Nullable final ReplicantContext context,
             @Nonnull final SystemSchema schema,
             @Nonnull final Transport transport ); @Override String toString();  }