Changeset 83


Ignore:
Timestamp:
07/08/13 13:29:24 (11 years ago)
Author:
stoda
Message:

J

Location:
trunk
Files:
338 added
64 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/main/java/omq/client/annotation/MultiMethod.java

    r82 r83  
    66import java.lang.annotation.Target;
    77
     8/**
     9 * Annotation which indicates a method as Multi.
     10 *
     11 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     12 *
     13 */
    814@Retention(RetentionPolicy.RUNTIME)
    915@Target(ElementType.METHOD)
  • trunk/src/main/java/omq/client/proxy/MultiProxymq.java

    r78 r83  
    1515
    1616/**
    17  * TODO Aquesta classe s'eliminarà tant bon punt es faci un proxymq més
    18  * intel·ligent
     17 * MultiProxy class. Every proxy created with this class will invoke
     18 * multi-asynchronous methods.
    1919 *
    20  * @author sergi
     20 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
    2121 *
    2222 */
  • trunk/src/main/java/omq/client/proxy/Proxymq.java

    r82 r83  
    278278        }
    279279
     280        /**
     281         * This method returns an array with length @MultiMethod.waitNum() with all
     282         * the responses received.
     283         *
     284         * @param corrId
     285         *            - Correlation Id of the request
     286         * @param wait
     287         *            - Array length
     288         * @param timeout
     289         *            - Timeout read in @SyncMethod.timeout(). If the timeout is set
     290         *            in 2 seconds, the system will wait 2 seconds for the arriving
     291         *            of all the responses.
     292         * @param type
     293         *            - Must be an Array type
     294         * @return resultArray
     295         * @throws Exception
     296         */
    280297        private Object getResults(String corrId, int wait, long timeout, Class<?> type) throws Exception {
    281298                Response resp = null;
     299                // Get the component type of an array
    282300                Class<?> actualType = type.getComponentType();
    283301
  • trunk/src/main/java/omq/common/broker/Broker.java

    r74 r83  
    1616import omq.common.util.ParameterQueue;
    1717import omq.common.util.Serializer;
     18import omq.exception.AlreadyBoundException;
    1819import omq.exception.InitBrokerException;
    1920import omq.exception.RemoteException;
     
    3031import com.rabbitmq.client.ShutdownSignalException;
    3132
     33/**
     34 * A "broker" allows a new connection to a RabbitMQ server. Under this
     35 * connection it can have binded object and proxies.
     36 *
     37 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     38 *
     39 */
    3240public class Broker {
    3341
     
    6573        }
    6674
     75        /**
     76         * This method stops the broker's connection and all the threads created
     77         *
     78         * @throws Exception
     79         */
    6780        public void stopBroker() throws Exception {
    6881                logger.warn("Stopping broker");
     
    8497                environment = null;
    8598                remoteObjs = null;
    86                 // Serializer.removeSerializers();
    8799        }
    88100
     
    95107        }
    96108
     109        /**
     110         * This method close the broker's connection
     111         *
     112         * @throws IOException
     113         */
    97114        public void closeConnection() throws IOException {
    98115                logger.warn("Clossing connection");
     
    103120
    104121        /**
     122         * Return the broker's channel
    105123         *
    106124         * @return Broker's channel
     
    121139        }
    122140
     141        /**
     142         * Returns the remote object for specified reference.
     143         *
     144         * @param reference
     145         *            - Binding name
     146         * @param contract
     147         *            - Remote Interface
     148         * @return newProxy
     149         * @throws RemoteException
     150         */
    123151        @SuppressWarnings("unchecked")
    124152        public synchronized <T extends Remote> T lookup(String reference, Class<T> contract) throws RemoteException {
     
    126154
    127155                        if (!clientStarted) {
    128                                 initClient(environment);
    129                                 clientStarted = true;
     156                                initClient();
    130157                        }
    131158
     
    144171        }
    145172
     173        /**
     174         * Returns the remote object for specified reference. This function returns
     175         * an special type of proxy, every method invoked will be multi and
     176         * asynchronous.
     177         *
     178         * @param reference
     179         *            - Binding name
     180         * @param contract
     181         *            - Remote Interface
     182         * @return newProxy
     183         * @throws RemoteException
     184         */
    146185        @SuppressWarnings("unchecked")
    147186        public synchronized <T extends Remote> T lookupMulti(String reference, Class<T> contract) throws RemoteException {
     
    161200        }
    162201
    163         public void bind(String reference, RemoteObject remote) throws RemoteException {
     202        /**
     203         * Binds the reference to the specified remote object. This function uses
     204         * the broker's environment
     205         *
     206         * @param reference
     207         *            - Binding name
     208         * @param remote
     209         *            - RemoteObject to bind
     210         * @throws RemoteException
     211         *             If the remote operation failed
     212         * @throws AlreadyBoundException
     213         *             If name is already bound.
     214         */
     215        public void bind(String reference, RemoteObject remote) throws RemoteException, AlreadyBoundException {
    164216                bind(reference, remote, environment);
    165217        }
    166218
    167         public void bind(String reference, RemoteObject remote, Properties env) throws RemoteException {
     219        /**
     220         * Binds the reference to the specified remote object. This function uses
     221         * the broker's environment
     222         *
     223         * @param reference
     224         *            - Binding name
     225         * @param remote
     226         *            - RemoteObject to bind
     227         * @param env
     228         *            - RemoteObject environment. You can set how many threads will
     229         *            be listen to the reference, the multiqueue name and the
     230         *            properties of the object queue and multiqueue
     231         * @throws RemoteException
     232         *             If the remote operation failed
     233         * @throws AlreadyBoundException
     234         *             If name is already bound.
     235         */
     236        public void bind(String reference, RemoteObject remote, Properties env) throws RemoteException, AlreadyBoundException {
     237                if (remoteObjs.containsKey(reference)) {
     238                        throw new AlreadyBoundException(reference);
     239                }
     240                // Try to start the remtoeObject listeners
    168241                try {
    169242                        remote.startRemoteObject(reference, this, env);
     
    174247        }
    175248
     249        /**
     250         * Unbinds a remoteObject from its reference and kills all the threads
     251         * created.
     252         *
     253         * @param reference
     254         *            - Binding name
     255         * @throws RemoteException
     256         *             If the remote operation failed
     257         * @throws IOException
     258         *             If there are problems while killing the threads
     259         */
    176260        public void unbind(String reference) throws RemoteException, IOException {
    177261                if (remoteObjs.containsKey(reference)) {
     
    184268        }
    185269
    186         public void rebind(String name, Remote obj) throws RemoteException {
    187 
    188         }
    189 
    190         /**
    191          * This method ensures the client will have only one ResponseListener and
    192          * only one EventDispatcher. Both with the same environment.
    193          *
    194          * @param environment
    195          * @throws Exception
    196          */
    197         private synchronized void initClient(Properties environment) throws Exception {
     270        /**
     271         * This method ensures the client will have only one ResponseListener.
     272         *
     273         * @throws Exception
     274         */
     275        private synchronized void initClient() throws Exception {
    198276                if (responseListener == null) {
    199277                        responseListener = new ResponseListener(this);
    200278                        responseListener.start();
     279                        clientStarted = true;
    201280                }
    202281        }
  • trunk/src/main/java/omq/common/message/Request.java

    r75 r83  
    33import java.io.Serializable;
    44
     5/**
     6 * Serializable request information. This class is used to send the information
     7 * to the server. It has information about which method is wanted to invoke, its
     8 * parameters, its correlation id and if a response is needed -asynchronous
     9 * method-.
     10 *
     11 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     12 *
     13 */
    514public class Request implements Serializable {
    615
     
    2029        private transient int retries;
    2130
     31        // This constructor is used by kryo
    2232        public Request() {
    2333        }
     
    3848        }
    3949
     50        /**
     51         * This method creates a new synchronous request
     52         *
     53         * @param id
     54         *            - correlation id of this invocation
     55         * @param method
     56         *            - method name wanted to call
     57         * @param params
     58         *            - parameters of this method
     59         * @return - new SyncRequest
     60         */
    4061        public static Request newSyncRequest(String id, String method, Object[] params) {
    4162                return new Request(id, method, false, params);
    4263        }
    4364
     65        /**
     66         * This method creates a new synchronous request
     67         *
     68         * @param id
     69         *            - correlation id of this invocation
     70         * @param method
     71         *            - method name wanted to call
     72         * @param params
     73         *            - parameters of this method
     74         * @param retries
     75         *            - How many retries will be done
     76         * @param timeout
     77         *            - Timeout for every retry
     78         * @param multi
     79         *            - If the method is multi
     80         * @param wait
     81         *            - If the method is multi how many responses will be listened
     82         * @return - new SyncRequest
     83         */
    4484        public static Request newSyncRequest(String id, String method, Object[] params, int retries, long timeout, boolean multi, int wait) {
    4585                Request req = new Request(id, method, false, params, multi);
     
    5090        }
    5191
     92        /**
     93         * This method creates a new asynchronous request
     94         *
     95         * @param id
     96         *            - correlation id of this invocation
     97         * @param method
     98         *            - method name wanted to call
     99         * @param params
     100         *            - parameters of this method
     101         * @param multi
     102         *            - If the method is multi
     103         * @return new AsyncRequest
     104         */
    52105        public static Request newAsyncRequest(String id, String method, Object[] params, boolean multi) {
    53106                return new Request(id, method, true, params, multi);
  • trunk/src/main/java/omq/common/message/Response.java

    r44 r83  
    55import omq.exception.OmqException;
    66
     7/**
     8 * Serializable response information. This class is used to send the information
     9 * to the client proxy. It has information about which remoteObject has invoked
     10 * the method and its correlation id. This class also has the result of the
     11 * invoke if everything has gone fine in the server or an error otherwise.
     12 *
     13 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     14 *
     15 */
    716public class Response implements Serializable {
    817
     
    1726        private String idOmq;
    1827
     28        // Used by kryo
    1929        public Response() {
    2030        }
    2131
     32        /**
     33         * Creates a new Response object to be serialized
     34         *
     35         * @param id
     36         *            - correlation id of the invoke
     37         * @param idOmq
     38         *            - objectmq's identifier -bind reference-
     39         * @param result
     40         *            - result of the invocation
     41         * @param error
     42         *            - error thrown by the invocation
     43         */
    2244        public Response(String id, String idOmq, Object result, OmqException error) {
    2345                this.id = id;
  • trunk/src/main/java/omq/common/util/OmqConnectionFactory.java

    r77 r83  
    1313
    1414/**
     15 * This class creates RabbitMQ connections
    1516 *
    1617 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     
    2324        private static int connectionTimeout = 2 * 1000;
    2425
     26        /**
     27         * If this class is wanted to use as a singleton class this is the init
     28         * function
     29         *
     30         * @param env
     31         *            - environment that sets the properties needed by RabbitMQ
     32         * @throws KeyManagementException
     33         * @throws NoSuchAlgorithmException
     34         * @throws IOException
     35         */
    2536        public static void init(Properties env) throws KeyManagementException, NoSuchAlgorithmException, IOException {
    2637                if (connection == null) {
     
    2940        }
    3041
     42        /**
     43         * This function returns a working connection.
     44         *
     45         * @param env
     46         *            - used if it's necessary to create a new connection
     47         * @return workingConnection
     48         * @throws Exception
     49         */
    3150        public static Connection getNewWorkingConnection(Properties env) throws Exception {
    3251                Connection connection = null;
     
    5069        }
    5170
     71        /**
     72         * This function creates a new rabbitmq connection using the properties set
     73         * in env
     74         *
     75         * @param env
     76         *            - Properties needed to create a new connection: username,
     77         *            password, rabbit_host, rabbit_port, enable_ssl (optional)
     78         * @return new Connection
     79         * @throws IOException
     80         * @throws KeyManagementException
     81         * @throws NoSuchAlgorithmException
     82         */
    5283        public static Connection getNewConnection(Properties env) throws IOException, KeyManagementException, NoSuchAlgorithmException {
    5384                // Get login info of rabbitmq
     
    5990                int port = Integer.parseInt(env.getProperty(ParameterQueue.RABBIT_PORT));
    6091
    61                 boolean ssl = Boolean.parseBoolean(env.getProperty(ParameterQueue.ENABLE_SSL));
     92                boolean ssl = Boolean.parseBoolean(env.getProperty(ParameterQueue.ENABLE_SSL, "false"));
    6293
    6394                // Start a new connection and channel
     
    78109        }
    79110
     111        /**
     112         * This method creates a new channel if the singleton pattern is used
     113         *
     114         * @return new Channel
     115         * @throws IOException
     116         */
    80117        public static Channel getNewChannel() throws IOException {
    81118                Channel channel = connection.createChannel();
  • trunk/src/main/java/omq/common/util/ParameterQueue.java

    r77 r83  
    22
    33/**
     4 * This class is used to create new environments.
    45 *
    56 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     
    78 */
    89public class ParameterQueue {
    9 
    10         /*
    11          * Properties environment
    12          */
    1310
    1411        /**
     
    6966        public static String MESSAGE_TTL_IN_QUEUES = "omq.message_ttl_queue";
    7067
    71         // TODO persistent messages? the messages will be saved in the disk if this
    72         // flag is set true
    73 
    7468        /**
    7569         * Set if the system will use ssl
     
    111105
    112106        /**
    113          * Time in milis
     107         * Time in milis by default is set in a minute
    114108         */
    115109        public static long DEFAULT_TIMEOUT = 1 * 1000 * 60;
  • trunk/src/main/java/omq/common/util/Serializer.java

    r77 r83  
    1515/**
    1616 *
     17 * Serializer enables to serialize the requests and the responses of the
     18 * remoteObjects. This class is used to have the same serializer object a not to
     19 * create new instances every time they are needed.
     20 *
    1721 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
    1822 *
    1923 */
    2024public class Serializer {
    21         // private static final Logger logger =
    22         // Logger.getLogger(Serializer.class.getName());
    2325        public static final String KRYO = "kryo";
    2426        public static final String JAVA = "java";
  • trunk/src/main/java/omq/common/util/Serializers/GsonImp.java

    r75 r83  
    1515import com.google.gson.JsonParser;
    1616
     17/**
     18 * Json serialize implementation. It uses the Gson libraries.
     19 *
     20 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     21 *
     22 */
    1723public class GsonImp implements ISerializer {
    1824        private final Gson gson = new Gson();
  • trunk/src/main/java/omq/common/util/Serializers/ISerializer.java

    r72 r83  
    77
    88/**
     9 * An ISerializer object can serialize any kind of objects and deserialize
     10 * Requests and Responses.
    911 *
    1012 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     
    1214 */
    1315public interface ISerializer {
     16        /**
     17         * Serialize
     18         *
     19         * @param obj
     20         *            - object to serialize
     21         * @return objectSerialized
     22         * @throws SerializerException
     23         *             - If the serialization failed
     24         */
    1425        public byte[] serialize(Object obj) throws SerializerException;
    1526
     27        /**
     28         * Deserialize a Request
     29         *
     30         * @param bytes
     31         *            - serialized request
     32         * @param obj
     33         *            - remoteObject which is receiving requests
     34         * @return request
     35         * @throws SerializerException
     36         *             - If the serialization failed
     37         */
    1638        public Request deserializeRequest(byte[] bytes, RemoteObject obj) throws SerializerException;
    1739
     40        /**
     41         * Deserialize a Response
     42         *
     43         * @param bytes
     44         *            serialized response
     45         * @param type
     46         *            - return type expected
     47         * @return response
     48         * @throws SerializerException
     49         *             - If the serialization failed
     50         */
    1851        public Response deserializeResponse(byte[] bytes, Class<?> type) throws SerializerException;
    1952}
  • trunk/src/main/java/omq/common/util/Serializers/JavaImp.java

    r72 r83  
    1212
    1313/**
     14 * Java serialize implementation. It uses the default java serialization.
    1415 *
    1516 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
  • trunk/src/main/java/omq/common/util/Serializers/KryoImp.java

    r72 r83  
    1313
    1414/**
     15 * Kryo serializerimplementation. It uses the Kryo libraries.
    1516 *
    1617 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
  • trunk/src/main/java/omq/common/util/Zipper.java

    r44 r83  
    77import java.util.zip.GZIPOutputStream;
    88
     9/**
     10 * This class enables the compression of the information sent through the
     11 * rabbitmq server.
     12 *
     13 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     14 *
     15 */
    916public class Zipper {
    1017
     
    1623                        zos = new GZIPOutputStream(baos);
    1724                        zos.write(b);
    18                 } finally{
    19                         if(zos != null){
     25                } finally {
     26                        if (zos != null) {
    2027                                zos.close();
    2128                        }
    22                        
     29
    2330                        baos.close();
    2431                }
    25                
     32
    2633                return baos.toByteArray();
    2734        }
     
    3441                try {
    3542                        zis = new GZIPInputStream(bais);
    36                        
     43
    3744                        byte[] tmpBuffer = new byte[256];
    3845                        int n;
     
    4047                                baos.write(tmpBuffer, 0, n);
    4148                        }
    42                 } finally {             
    43                         if(zis != null){
     49                } finally {
     50                        if (zis != null) {
    4451                                zis.close();
    4552                        }
    46                        
     53
    4754                        bais.close();
    4855                        baos.close();
    49                 }               
    50                
     56                }
     57
    5158                return baos.toByteArray();
    52         }       
     59        }
    5360}
  • trunk/src/main/java/omq/server/InvocationThread.java

    r63 r83  
    1616
    1717/**
     18 * An invocationThread waits for requests an invokes them.
    1819 *
    1920 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
  • trunk/src/main/java/omq/server/RemoteObject.java

    r77 r83  
    2323
    2424/**
     25 * A RemoteObject when it's started will be waiting for requests and will invoke
     26 * them. When a RemoteObject is started it listens two queues, the first one has
     27 * the same name as its reference and the second one is its multiqueue -this
     28 * name can be set using a property, be aware to use a name not used by another
     29 * object!!!-.
    2530 *
    2631 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     
    5863        }
    5964
     65        /**
     66         * This method starts a remoteObject.
     67         *
     68         * @param reference
     69         *            - broker's binding referece
     70         * @param broker
     71         *            - broker that binds this remoteObject
     72         * @param env
     73         *            - properties of this remoteObject
     74         * @throws Exception
     75         */
    6076        public void startRemoteObject(String reference, Broker broker, Properties env) throws Exception {
    6177                this.broker = broker;
     
    8197                // Start this listener
    8298                this.start();
    83         }
    84 
    85         public void startTriggerEvent(String reference, Broker broker) throws Exception {
    86                 this.broker = broker;
    87                 UID = reference;
    88                 if (channel == null || !channel.isOpen()) {
    89                         channel = broker.getChannel();
    90                 }
    9199        }
    92100
     
    133141        }
    134142
     143        /**
     144         * This method kills all the threads waiting for requests
     145         *
     146         * @throws IOException
     147         *             - If an operation failed.
     148         */
    135149        public void kill() throws IOException {
    136150                logger.warn("Killing objectmq: " + this.getRef());
     
    141155        }
    142156
     157        /**
     158         * This method invokes the method specified by methodName and arguments
     159         *
     160         * @param methodName
     161         * @param arguments
     162         * @return result
     163         * @throws Exception
     164         */
    143165        public Object invokeMethod(String methodName, Object[] arguments) throws Exception {
    144166
     
    149171        }
    150172
     173        /**
     174         * This method loads the method specified by methodName and args
     175         *
     176         * @param methodName
     177         * @param args
     178         * @return method
     179         * @throws NoSuchMethodException
     180         *             - If the method cannot be found
     181         */
    151182        private Method loadMethod(String methodName, Object[] args) throws NoSuchMethodException {
    152183                Method m = null;
     
    171202        }
    172203
     204        /**
     205         * This method loads a method which uses primitives as arguments
     206         *
     207         * @param methodName
     208         *            - name of the method wanted to invoke
     209         * @param argArray
     210         *            - arguments
     211         * @return method
     212         * @throws NoSuchMethodException
     213         *             - If the method cannot be found
     214         */
    173215        private Method loadMethodWithPrimitives(String methodName, Class<?>[] argArray) throws NoSuchMethodException {
    174216                if (argArray != null) {
     
    213255        }
    214256
     257        /**
     258         * This method starts the queues using the information got in the
     259         * environment.
     260         *
     261         * @throws Exception
     262         */
    215263        private void startQueues() throws Exception {
    216264                // Get info about which exchange and queue will use
  • trunk/src/main/java/omq/server/RemoteWrapper.java

    r53 r83  
    1313
    1414/**
     15 * This class is used to encapsulate the invocationThreads under the
     16 * RemoteObject.
    1517 *
    1618 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     
    4042        }
    4143
     44        /**
     45         * This method notifies a delivery to an invocationThread using a
     46         * blockingQueue.
     47         *
     48         * @param delivery
     49         *            - delivery which contains a Request to be invoked
     50         * @throws Exception
     51         */
    4252        public void notifyDelivery(Delivery delivery) throws Exception {
    4353                this.deliveryQueue.put(delivery);
    4454        }
    4555
     56        /**
     57         * This method interrups all the invocationThreads under this remoteWrapper
     58         */
    4659        public void stopRemoteWrapper() {
    4760                logger.warn("Stopping Invocation threads vinculed to " + obj.getRef());
  • trunk/src/test/java/omq/test/calculator/Calculator.java

    r72 r83  
    55import omq.client.annotation.RemoteInterface;
    66import omq.client.annotation.SyncMethod;
     7
     8/**
     9 *
     10 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     11 *
     12 */
    713
    814@RemoteInterface
  • trunk/src/test/java/omq/test/calculator/CalculatorImpl.java

    r72 r83  
    33import omq.server.RemoteObject;
    44
     5/**
     6 *
     7 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     8 *
     9 */
    510public class CalculatorImpl extends RemoteObject implements Calculator {
    611        private int mult = 0;
  • trunk/src/test/java/omq/test/calculator/CalculatorTest.java

    r77 r83  
    1818import org.junit.runners.Parameterized.Parameters;
    1919
     20/**
     21 *
     22 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     23 *
     24 */
    2025@RunWith(value = Parameterized.class)
    2126public class CalculatorTest {
  • trunk/src/test/java/omq/test/calculator/Message.java

    r46 r83  
    33import java.io.Serializable;
    44
     5/**
     6 *
     7 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     8 *
     9 */
    510public class Message implements Serializable {
    6        
    7        
    8        
     11
    912        /**
    1013         *
     
    1316        private int code;
    1417        private String message;
    15        
     18
    1619        public Message() {
    1720        }
  • trunk/src/test/java/omq/test/event/Message.java

    r70 r83  
    33import omq.Remote;
    44
     5/**
     6 *
     7 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     8 *
     9 */
    510public interface Message extends Remote {
    611        public void setMessage(String message);
  • trunk/src/test/java/omq/test/event/MessageImpl.java

    r70 r83  
    33import omq.server.RemoteObject;
    44
     5/**
     6 *
     7 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     8 *
     9 */
    510public class MessageImpl extends RemoteObject implements Message {
    611
  • trunk/src/test/java/omq/test/event/MessageTest.java

    r78 r83  
    1818import org.junit.runners.Parameterized.Parameters;
    1919
     20/**
     21 *
     22 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     23 *
     24 */
    2025@RunWith(value = Parameterized.class)
    2126public class MessageTest {
  • trunk/src/test/java/omq/test/exception/ClientInterface.java

    r46 r83  
    66import omq.client.annotation.SyncMethod;
    77
     8/**
     9 *
     10 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     11 *
     12 */
    813@RemoteInterface
    914public interface ClientInterface extends Remote {
  • trunk/src/test/java/omq/test/exception/ExceptionTest.java

    r77 r83  
    1919import org.junit.runners.Parameterized.Parameters;
    2020
     21/**
     22 *
     23 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     24 *
     25 */
    2126@RunWith(value = Parameterized.class)
    2227public class ExceptionTest {
  • trunk/src/test/java/omq/test/exception/OmqServerImpl.java

    r46 r83  
    33import omq.server.RemoteObject;
    44
     5/**
     6 *
     7 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     8 *
     9 */
    510public class OmqServerImpl extends RemoteObject implements ServerInterface {
    611        /**
  • trunk/src/test/java/omq/test/exception/ServerInterface.java

    r46 r83  
    33import omq.Remote;
    44
     5/**
     6 *
     7 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     8 *
     9 */
    510public interface ServerInterface extends Remote {
    611        public void addWheels(int numWheels);
  • trunk/src/test/java/omq/test/exception/Trailer.java

    r46 r83  
    33import java.io.Serializable;
    44
     5/**
     6 *
     7 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     8 *
     9 */
    510public class Trailer implements Serializable {
    611
  • trunk/src/test/java/omq/test/faultTolerance/FaultToleranceTest.java

    r77 r83  
    2020import org.junit.runners.Parameterized.Parameters;
    2121
     22/**
     23 *
     24 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     25 *
     26 */
    2227@RunWith(value = Parameterized.class)
    2328public class FaultToleranceTest {
  • trunk/src/test/java/omq/test/multiProcess/MultiProcessTest.java

    r77 r83  
    1818import org.junit.runners.Parameterized.Parameters;
    1919
     20/**
     21 *
     22 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     23 *
     24 */
    2025@RunWith(value = Parameterized.class)
    2126public class MultiProcessTest {
  • trunk/src/test/java/omq/test/multiProcess/Number.java

    r58 r83  
    33import omq.Remote;
    44
     5/**
     6 *
     7 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     8 *
     9 */
    510public interface Number extends Remote {
    611        public void setNumber(int x);
  • trunk/src/test/java/omq/test/multiProcess/NumberClient.java

    r58 r83  
    77import omq.client.annotation.SyncMethod;
    88
     9/**
     10 *
     11 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     12 *
     13 */
    914@RemoteInterface
    1015public interface NumberClient extends Remote {
  • trunk/src/test/java/omq/test/multiProcess/NumberImpl.java

    r58 r83  
    33import omq.server.RemoteObject;
    44
     5/**
     6 *
     7 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     8 *
     9 */
    510public class NumberImpl extends RemoteObject implements Number {
    611        /**
  • trunk/src/test/java/omq/test/observer/ObserverTest.java

    r77 r83  
    1818import org.junit.runners.Parameterized.Parameters;
    1919
     20/**
     21 *
     22 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     23 *
     24 */
    2025@RunWith(value = Parameterized.class)
    2126public class ObserverTest {
  • trunk/src/test/java/omq/test/observer/RemoteObserver.java

    r71 r83  
    55import omq.client.annotation.SyncMethod;
    66
     7/**
     8 *
     9 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     10 *
     11 */
    712@RemoteInterface
    813public interface RemoteObserver extends Remote {
  • trunk/src/test/java/omq/test/observer/RemoteObserverImpl.java

    r71 r83  
    33import omq.server.RemoteObject;
    44
     5/**
     6 *
     7 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     8 *
     9 */
    510public class RemoteObserverImpl extends RemoteObject implements RemoteObserver {
    611
  • trunk/src/test/java/omq/test/observer/RemoteSubject.java

    r72 r83  
    66import omq.exception.RemoteException;
    77
     8/**
     9 *
     10 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     11 *
     12 */
    813@RemoteInterface
    914public interface RemoteSubject extends Remote {
  • trunk/src/test/java/omq/test/observer/RemoteSubjectImpl.java

    r72 r83  
    88import omq.server.RemoteObject;
    99
     10/**
     11 *
     12 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     13 *
     14 */
    1015public class RemoteSubjectImpl extends RemoteObject implements RemoteSubject {
    1116
  • trunk/src/test/java/omq/test/persistence/Message.java

    r78 r83  
    33import omq.Remote;
    44import omq.client.annotation.AsyncMethod;
     5import omq.client.annotation.RemoteInterface;
    56import omq.client.annotation.SyncMethod;
    67
     8/**
     9 *
     10 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     11 *
     12 */
     13
     14@RemoteInterface
    715public interface Message extends Remote {
    816        @AsyncMethod
  • trunk/src/test/java/omq/test/persistence/MessageImpl.java

    r78 r83  
    33import omq.server.RemoteObject;
    44
     5/**
     6 *
     7 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     8 *
     9 */
    510public class MessageImpl extends RemoteObject implements Message {
    611        /**
  • trunk/src/test/java/omq/test/persistence/PersistentTest.java

    r82 r83  
    1616import org.junit.runners.Parameterized.Parameters;
    1717
     18/**
     19 *
     20 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     21 *
     22 */
    1823@RunWith(value = Parameterized.class)
    1924public class PersistentTest {
  • trunk/src/test/java/omq/test/python/Address.java

    r81 r83  
    33import java.io.Serializable;
    44
     5/**
     6 *
     7 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     8 *
     9 */
    510public class Address implements Serializable {
    611
  • trunk/src/test/java/omq/test/python/Calculator.java

    r81 r83  
    33import omq.Remote;
    44
     5/**
     6 *
     7 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     8 *
     9 */
    510public interface Calculator extends Remote {
    611        public void fibonacci(int x);
    712
    813        public int add(int x, int y);
    9        
     14
    1015        public double getPi();
    1116
  • trunk/src/test/java/omq/test/python/CalculatorImpl.java

    r81 r83  
    33import omq.server.RemoteObject;
    44
     5/**
     6 *
     7 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     8 *
     9 */
    510public class CalculatorImpl extends RemoteObject implements Calculator {
    611
     
    3439                return 3.1415;
    3540        }
    36        
    37        
    3841
    3942}
  • trunk/src/test/java/omq/test/python/Client.py

    r81 r83  
    22Created on 03/07/2013
    33
    4 @author: sergi
     4@author: Sergi Toda <sergi.toda@estudiants.urv.cat>
    55'''
    66import pika
  • trunk/src/test/java/omq/test/python/ClientTest.py

    r81 r83  
    22Created on 04/07/2013
    33
    4 @author: sergi
     4@author: Sergi Toda <sergi.toda@estudiants.urv.cat>
    55'''
    66import unittest
  • trunk/src/test/java/omq/test/python/Contact.java

    r81 r83  
    33import java.io.Serializable;
    44
     5/**
     6 *
     7 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     8 *
     9 */
    510public class Contact implements Serializable {
    611
  • trunk/src/test/java/omq/test/python/ContactList.java

    r81 r83  
    55import omq.Remote;
    66
     7/**
     8 *
     9 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     10 *
     11 */
    712public interface ContactList extends Remote {
    813        public void setContact(Contact c);
  • trunk/src/test/java/omq/test/python/ContactListImpl.java

    r81 r83  
    66import omq.server.RemoteObject;
    77
     8/**
     9 *
     10 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     11 *
     12 */
    813public class ContactListImpl extends RemoteObject implements ContactList {
    914        /**
  • trunk/src/test/java/omq/test/python/Server.java

    r81 r83  
    88import omq.common.util.ParameterQueue;
    99
     10/**
     11 *
     12 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     13 *
     14 */
    1015public class Server {
    1116
     
    3540
    3641                broker.bind("list", new ContactListImpl());
    37                
     42
    3843                Thread.sleep(60 * 1000);
    3944        }
  • trunk/src/test/java/omq/test/serializer/CalculatorTest.java

    r77 r83  
    1313import org.junit.Test;
    1414
     15/**
     16 *
     17 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     18 *
     19 */
    1520public class CalculatorTest {
    1621
  • trunk/src/test/java/omq/test/stopBroker/BrokerKiller.java

    r46 r83  
    55import omq.client.annotation.RemoteInterface;
    66
     7/**
     8 *
     9 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     10 *
     11 */
    712@RemoteInterface
    813public interface BrokerKiller extends Remote {
  • trunk/src/test/java/omq/test/stopBroker/BrokerKillerImpl.java

    r54 r83  
    55import omq.server.RemoteObject;
    66
     7/**
     8 *
     9 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     10 *
     11 */
    712public class BrokerKillerImpl extends RemoteObject implements BrokerKiller {
    813
  • trunk/src/test/java/omq/test/stopBroker/StopBrokerTest.java

    r77 r83  
    1616import org.junit.runners.Parameterized.Parameters;
    1717
     18/**
     19 *
     20 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     21 *
     22 */
    1823@RunWith(value = Parameterized.class)
    1924public class StopBrokerTest {
  • trunk/src/test/java/omq/test/stopBroker/UnbindTest.java

    r77 r83  
    99import org.junit.Test;
    1010
     11/**
     12 *
     13 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     14 *
     15 */
    1116public class UnbindTest {
    1217
  • trunk/src/test/java/omq/test/temporal/ProvaTest.java

    r77 r83  
    2020import org.junit.runners.Parameterized.Parameters;
    2121
     22/**
     23 *
     24 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     25 *
     26 */
    2227@RunWith(value = Parameterized.class)
    2328public class ProvaTest {
  • trunk/src/test/java/omq/test/workspace/Info.java

    r74 r83  
    33import java.io.Serializable;
    44
     5/**
     6 *
     7 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     8 *
     9 */
    510public class Info implements Serializable {
    611        /**
  • trunk/src/test/java/omq/test/workspace/RemoteWorkspace.java

    r74 r83  
    66import omq.client.annotation.RemoteInterface;
    77
     8/**
     9 *
     10 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     11 *
     12 */
    813@RemoteInterface
    914public interface RemoteWorkspace extends Remote {
  • trunk/src/test/java/omq/test/workspace/RemoteWorkspaceImpl.java

    r74 r83  
    33import omq.server.RemoteObject;
    44
     5/**
     6 *
     7 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     8 *
     9 */
    510public class RemoteWorkspaceImpl extends RemoteObject implements RemoteWorkspace {
    611
  • trunk/src/test/java/omq/test/workspace/WorkspaceTest.java

    r77 r83  
    1818import org.junit.runners.Parameterized.Parameters;
    1919
     20/**
     21 *
     22 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
     23 *
     24 */
    2025@RunWith(value = Parameterized.class)
    2126public class WorkspaceTest {
  • trunk/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst

    r76 r83  
    11omq/test/multiProcess/Number.class
     2omq/test/python/Address.class
    23omq/test/faultTolerance/FaultToleranceTest.class
    34omq/test/workspace/RemoteWorkspaceImpl.class
    45omq/test/serializer/CalculatorTest.class
     6omq/test/python/ContactList.class
    57omq/test/calculator/Message.class
    68omq/test/stopBroker/BrokerKiller.class
     
    911omq/test/event/MessageTest.class
    1012omq/test/multiProcess/NumberClient.class
    11 omq/test/exception/ServerTest.class
     13omq/test/python/Server.class
    1214omq/test/stopBroker/StopBrokerTest.class
    1315omq/test/multiProcess/MultiProcessTest.class
    1416omq/test/observer/RemoteObserver.class
     17omq/test/persistence/PersistentTest.class
     18omq/test/python/Contact.class
    1519omq/test/event/MessageImpl.class
    1620omq/test/event/Message.class
     
    2327omq/test/calculator/CalculatorTest.class
    2428omq/test/temporal/ProvaTest.class
     29omq/test/python/ContactListImpl.class
    2530omq/test/exception/ClientInterface.class
    2631omq/test/observer/ObserverTest.class
     32omq/test/persistence/Message.class
    2733omq/test/exception/ExceptionTest.class
    2834omq/test/workspace/RemoteWorkspace.class
    2935omq/test/multiProcess/NumberImpl.class
    3036omq/test/observer/RemoteObserverImpl.class
     37omq/test/python/CalculatorImpl.class
     38omq/test/persistence/MessageImpl.class
     39omq/test/python/Calculator.class
    3140omq/test/stopBroker/BrokerKillerImpl.class
    3241omq/test/calculator/Calculator.class
Note: See TracChangeset for help on using the changeset viewer.