Skip to content

Package: Application$Builder

Application$Builder

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2017, 2020 Red Hat Inc and others.
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License v1.0
6: * which accompanies this distribution, and is available at
7: * http://www.eclipse.org/legal/epl-v10.html
8: *
9: * Contributors:
10: * Red Hat Inc - initial API and implementation
11: *******************************************************************************/
12: package org.eclipse.kapua.client.gateway;
13:
14: /**
15: * An application is a sub-unit of a client, focused on handling data
16: * <p>
17: * The {@link Client} instance is more technical unit, where the {@link Application}
18: * is more a data oriented unit.
19: * </p>
20: */
21: public interface Application extends AutoCloseable {
22:
23: public interface Builder {
24:
25: public Application build();
26: }
27:
28: /**
29: * Lookup a data controller to an application topic
30: *
31: * @param topic
32: * the topic the controller is bound to, must never be {@code null}
33: * @return the data controller
34: */
35: public Data data(Topic topic);
36:
37: /**
38: * Lookup a transport controller
39: * <p>
40: * A transport controller for the client's underlying transport mechanism.
41: * </p>
42: * <p>
43: * <b>Note:</b> Each application has its own instance and thus can set
44: * events handler independent of the root client or other applications.
45: * </p>
46: *
47: * @return the transport controller
48: */
49: public Transport transport();
50: }