Ignore:
Timestamp:
06/14/13 15:11:13 (11 years ago)
Author:
stoda
Message:

Exception test revised.
Broker.lookup does not need the casting
GsonImp? arguments problem solved
MultiProcessTest? added

Location:
trunk/objectmq/src/omq/common
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/objectmq/src/omq/common/broker/Broker.java

    r38 r39  
    108108        }
    109109
    110         public static Remote lookup(String reference, Class<?> contract) throws RemoteException {
     110        @SuppressWarnings("unchecked")
     111        public static <T extends Remote> T lookup(String reference, Class<T> contract) throws RemoteException {
    111112                try {
    112113                        Properties environment = Environment.getEnvironment();
     
    120121                                Proxymq proxy = new Proxymq(reference, contract, environment);
    121122                                Class<?>[] array = { contract };
    122                                 return (Remote) Proxymq.newProxyInstance(contract.getClassLoader(), array, proxy);
    123                         }
    124                         return (Remote) Proxymq.getInstance(reference);
     123                                return (T) Proxymq.newProxyInstance(contract.getClassLoader(), array, proxy);
     124                        }
     125                        return (T) Proxymq.getInstance(reference);
    125126
    126127                } catch (Exception e) {
  • trunk/objectmq/src/omq/common/util/Serializers/GsonImp.java

    r38 r39  
    3939
    4040                try {
    41                         JsonArray jsonArgs = (JsonArray) jsonObj.get("arguments");
     41                        JsonArray jsonArgs = (JsonArray) jsonObj.get("params");
    4242
    4343                        // TODO: if (jsonArgs.size() == types.size())
Note: See TracChangeset for help on using the changeset viewer.