Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package WebServer.model;
- import java.rmi.*;
- import java.util.ArrayList;
- import java.util.Calendar;
- import java.util.concurrent.CopyOnWriteArrayList;
- import java.net.MalformedURLException;
- import rmiserver.RMIInterface;
- public class RmiModel {
- private RMIInterface server;
- public RmiModel() {
- try {
- server = (RMIInterface) Naming.lookup("server");
- }
- catch(NotBoundException|MalformedURLException|RemoteException e) {
- e.printStackTrace(); // what happens *after* we reach this line?
- }
- }
- public String login(String user,String pwd) throws RemoteException{
- return server.login(user, pwd);
- }
- /*public boolean verificar(String numeroCC,String titulo) throws RemoteException{
- return server.verificar(numeroCC, titulo);
- }*/
- public boolean adicionarMesas(String titulo, String dep, int mesasNum) throws RemoteException{
- return server.adicionarMesas(titulo, dep, mesasNum);
- }
- public CopyOnWriteArrayList<String> apresentarListas(String titulo,String est) throws RemoteException{
- return server.apresentarListas(titulo, est);
- }
- public String getTipo(String titulo) throws RemoteException{
- return server.getTipo(titulo);
- }
- public Calendar getFimEleicao(String titulo) throws RemoteException{
- return server.getFimEleicao(titulo);
- }
- public Calendar getInicioEleicao(String titulo) throws RemoteException{
- return server.getInicioEleicao(titulo);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement