Skip to content

Commit

Permalink
fixed codeblocks
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamZsofi committed Mar 15, 2018
1 parent e76d7b0 commit a81d63e
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions docs/technical_documentation/dds/dds_java_lib.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ For a simple implementation look at the project in the `standalone_project` fold

* Run `release.com` from inside your OpenSplice installation folder

``` bash
``` bash
. ./path/to/release.com
```
```

* Add to classpath: `$OSPL_HOME/jar/dcpssaj5.jar`, `lib/hu.bme.mit.gamma.ddslib.jar`

Expand All @@ -42,15 +42,15 @@ For a simple implementation look at the project in the `standalone_project` fold

* Initialize the Service Environment:

``` java
``` java
DDSLib.init();
```
```

* Create a Topic<sup>1</sup>:

``` java
``` java
Topics exampleTopic = new Topics("exPart", "exTopic");
```
```

* Only Subscription

Expand All @@ -65,26 +65,26 @@ For a simple implementation look at the project in the `standalone_project` fold
//Thing to do when a message arrives
}
}
```
```

* Instantiate the above mentioned Listener class:

``` java
``` java
MyListener myListener = new MyListener();
```
```

* Register the Listener instance:

``` java
``` java
exampleTopic.addSubscriptionListener(myListener);
```
```
* Don't forget to unregister & close

``` java
``` java
exampleTopic.removeSubscriptionListener(myListener);
exampleTopic.closeTopic();
```
```

* Only publishing

Expand All @@ -98,13 +98,13 @@ For a simple implementation look at the project in the `standalone_project` fold
{
e.printStackTrace();
}
```
```

* close topic

``` java
``` java
exampleTopic.closeTopic();
```
```

Important: you need to create a `Topics` instance for both the receiving and the transmitting parties!

Expand Down

0 comments on commit a81d63e

Please sign in to comment.