source: branches/objectmq_old/test/multiThreadTest/MobileImpl.java

Last change on this file was 37, checked in by stoda, 11 years ago

Stop broker working and unbind too.

File size: 547 bytes
Line 
1package multiThreadTest;
2
3import java.util.ArrayList;
4import java.util.List;
5
6import omq.server.RemoteObject;
7
8public class MobileImpl extends RemoteObject implements Mobile {
9        /**
10         *
11         */
12        private static final long serialVersionUID = 1L;
13        private List<String> messages = new ArrayList<String>();
14
15        @Override
16        public synchronized void sendMessage(String message) {
17                System.out.println("Message received " + this.getRef() + " -> " + message);
18                messages.add(message);
19        }
20
21        @Override
22        public List<String> getMessages() {
23                return messages;
24        }
25
26}
Note: See TracBrowser for help on using the repository browser.