Package voxo.server.actions

Source Code of voxo.server.actions.ClientSearchRequestAction

package voxo.server.actions;

import java.io.IOException;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.sql.SQLException;
import java.util.ArrayList;

import voxo.common.entities.Packet;
import voxo.common.entities.User;
import voxo.common.enums.EnumPacket;
import voxo.server.managers.UserManager;
import voxo.server.services.NetworkService;

public class ClientSearchRequestAction {
  public ClientSearchRequestAction(InetAddress ip, String o) throws UnknownHostException, IOException, SQLException {
    // Get the search results
    ArrayList<User> alu = UserManager.searchByUsername(o);
   
    // Send results
    NetworkService.sendPacket(ip, new Packet(EnumPacket.SERVER_SearchResults, alu));
  }

}
TOP

Related Classes of voxo.server.actions.ClientSearchRequestAction

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.