Class ERequestMonitorFeed.Builder

  • Enclosing class:
    ERequestMonitorFeed

    public static final class ERequestMonitorFeed.Builder
    extends EFeed.Builder<F,​T,​B>
    ERequestMonitorFeed.Builder is used to create an ERequestMonitorFeed instance. A Builder instance is acquired from ERequestMonitorFeed.builder(). The following example shows how to create a ERequestMonitorFeed instance using a Builder. The example also shows how ERequestMonitor interface methods may be replaced with lambda expressions.
    @Override public void startup() {
        final EMessageKey = new EMessageKey(com.acme.CatalogOrder.class, subject);
        final ERequestMonitorFeed feed (ERequestMonitorFeed.builder()).target(this)
                                                                      .messageKey(key)
                                                                      .requestCallback(this::onRequest)
                                                                      .replyCallback(this::onReply)
                                                                      .cancelCallback(this::onCancel)
                                                                      .build();
        ...
    }
    
    private void onRequest(final ERequestMessage request, final String replier) {
        ...
    }
    
    private void onReply(final EReplyMessage reply, final String replier) {
        ...
    }
    
    private void onCancel(final ERequestMessage request, final String replier) {
        ...
    }
    See Also:
    ERequestMonitorFeed.builder()