public ArraySet<ElectricityTicket> getTickets() { try { ArraySet<ElectricityTicket> output = lookupHLCServer().getTickets(userId); for (ElectricityTicket t : output) { handler.setTicket(t); } return handler.getTkts(); } catch (RemoteException e) { } return null; }
public Twople<String, String> registerUser( Double worth, Double generation, Double economic, String pubKey, int port) { try { return lookupHLCServer() .registerUser( handler.getSalt(), handler.getHash(), userId, userName, pubKey, worth, generation, economic, port); } catch (RemoteException e) { return null; } }
public Boolean setRequirement(ElectricityRequirement req) { try { if (lookupHLCServer().setRequirement(req)) { return handler.setRequirement(req); } } catch (RemoteException e) { } return false; }
public LCClient( String eDCHostName, int eDCPortNum, String hLCHostName, int hLCPortNum, String name, String password) { eDCHost = eDCHostName; eDCPort = eDCPortNum; hLCHost = hLCHostName; hLCPort = hLCPortNum; userName = name; handler = new LCHandler(name, password, 0., 0., 0.); // TODO: make not naughty. userId = handler.getId(); if (System.getSecurityManager() == null) { System.setSecurityManager(new RMISecurityManager()); } }
public ArraySet<ElectricityTicket> findCompetingTickets(ElectricityRequirement req) { return handler.findCompetingTickets(req); }
public Boolean queryUnsatisfiedReqs() { return handler.queryUnsatisfiedReqs(); }
public ArrayList<ElectricityTicket> getUnhappyTickets() { return handler.getUnhappyTickets(); }
public boolean queryUnhappyTickets() { return handler.queryUnhappyTickets(); }