formatting of eclipse import tutorial authored by Björn Butzin's avatar Björn Butzin
...@@ -104,26 +104,26 @@ You can find the required files in our repository at [https://gitlab.amd.e-techn ...@@ -104,26 +104,26 @@ You can find the required files in our repository at [https://gitlab.amd.e-techn
#### 2. Instantiate a new ResourceServer (Server.java, FIXME 1): #### 2. Instantiate a new ResourceServer (Server.java, FIXME 1):
* Need a CoapResourceServer to maintain resources * Need a CoapResourceServer to maintain resources
```java ```java
CoapResourceServer resourceServer = new CoapResourceServer(); CoapResourceServer resourceServer = new CoapResourceServer();
``` ```
#### 3. Instantiate a new TemperatureResource (Server.java, FIXME 2): #### 3. Instantiate a new TemperatureResource (Server.java, FIXME 2):
* Resources are created like normal objects and added to the server * Resources are created like normal objects and added to the server
```java ```java
CoapResource resource = new CoapResource(); CoapResource resource = new CoapResource();
``` ```
#### 4. Add the TemperatureResource to the ResourceServer (Server.java, FIXME 3): #### 4. Add the TemperatureResource to the ResourceServer (Server.java, FIXME 3):
* Resources are created like normal objects and added to the server * Resources are created like normal objects and added to the server
```java ```java
resourceServer.createResource(resource); resourceServer.createResource(resource);
``` ```
#### 5. Run the ResourceServer (Server.java FIXME 4): #### 5. Run the ResourceServer (Server.java FIXME 4):
```java ```java
resourceServer.start(port); resourceServer.start(port);
resourceServer.start(); // equals port = CoapConstants.COAP_DEFAULT_PORT resourceServer.start(); // equals port = CoapConstants.COAP_DEFAULT_PORT
``` ```
* Run Server: Click on *[Run » Run]* in the Menu bar * Run Server: Click on *[Run » Run]* in the Menu bar
... ...
......