Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package models;
- import java.net.MalformedURLException;
- import java.rmi.Naming;
- import java.rmi.NotBoundException;
- import java.rmi.RemoteException;
- import rmiserver.RMI;
- public class RegistFaceBean {
- private String username;
- private String password;
- private String facebook_id;
- private RMI server;
- public RegistFaceBean()
- {
- try {
- //System.getProperties().put("java.security.policy", "policy.all");
- server = (RMI) Naming.lookup("rmi://127.0.0.1:6001/rmiserver");
- }
- catch(NotBoundException|MalformedURLException|RemoteException e) {
- e.printStackTrace();
- }
- }
- public boolean registNewUser() throws RemoteException
- {
- return server.registFacebook(this.facebook_id, this.username);
- }
- public String getUsername()
- {
- return username;
- }
- public void setUsername(String username)
- {
- this.username = username;
- }
- public String getPassword()
- {
- return password;
- }
- public void setPassword(String password)
- {
- this.password = password;
- }
- public void setFacebookId( String a )
- {
- this.facebook_id = a;
- }
- }
Add Comment
Please, Sign In to add comment