@GET
    @Path("/receive/{macAdr}")
    @Produces({"application/xml", "application/json"})
    public List<History> receive(@PathParam("macAdr") String macAdr) {
        query = em.createNamedQuery("UserMaster.findByMacAdr").setParameter("macAdr", macAdr);
        if(!query.getResultList().isEmpty()){
            um = (UserMaster)query.getSingleResult();
            query = em.createNamedQuery("Contact.findByUserID").setParameter("receiveUID", um.getUserID());
            if(!query.getResultList().isEmpty()){
                contact=query.getResultList();
                for(Contact cont : contact){
                    query=em.createNamedQuery("UserMaster.findByUserID").setParameter("userID", cont.getUserID());
                    if(!query.getResultList().isEmpty()){
                        um=(UserMaster)query.getSingleResult();
                        history.setContactType(cont.getContactTypeID());
                        history.setImagePath(um.getImagePath());
                        history.setMessage(cont.getMessage());
                        history.setNickName(um.getNickName());
                        history.setOtherMacAdr(um.getMacAdr());
                        history.setTwitterID(um.getTwitterID());
                        historyList.add(history);
                    }
                }
                if(!historyList.isEmpty()){
                    return historyList;
                }
            }
        }
        return null;
    }