Package remote.service.moteaccess.client

Source Code of remote.service.moteaccess.client.ClientMoteAccess

package remote.service.moteaccess.client;

import java.rmi.RemoteException;

import diku.distlab.remote.moteaccess.MoteAccess;
import diku.distlab.remote.moteaccess.MoteAccessServiceLocator;

public class ClientMoteAccess implements MoteAccess{

  MoteAccessServiceLocator masLocator;

  public ClientMoteAccess(String server)
  {
    masLocator = new MoteAccessServiceLocator();
    String url ="http://"+server+":8080/axis/services/moteaccess";
    masLocator.setmoteaccessEndpointAddress(url);

  }

  public boolean[] getMoteControlPrivileges(long[] mote_ids, String session_id) throws RemoteException {
    boolean[] results = null;
    try{
      results = masLocator.getmoteaccess().getMoteControlPrivileges(mote_ids,session_id);
    } catch (javax.xml.rpc.ServiceException e)
    {
      e.printStackTrace();
    }
    return results;
  }

}
TOP

Related Classes of remote.service.moteaccess.client.ClientMoteAccess

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.