class ComponentEventRestService {

    @GET
    @Path( value = "/host/HMS" )
    @Produces( "application/json" )
    public List<Event> getComponentEvents()
        throws HmsException
    {

        ServerNode node = ServerNodeConnector.getInstance().getApplicationNode();
        try
        {
            executeHealthMonitorTask( node, ServerComponent.HMS );
            List<Event> eventList = EventMonitoringSubscriptionHolder.getEventList( node, ServerComponent.HMS );
            return eventList;
        }
        catch ( HmsException e )
        {
            throw new HMSRestException( Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Server Error", e.getMessage() );
        }
        catch ( Exception e )
        {
            throw new HMSRestException( Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Server Error", e.getMessage() );
        }
    }

}