class MasterInfoService implements AdvertisableService {

    @GET
    @Path( IS_SLAVE_PATH )
    public Response isSlave()
    {
        if ( haDb == null )
        {
            return status( FORBIDDEN ).build();
        }

        String role = haDb.role().toLowerCase();
        if ( role.equals( "slave" ) )
        {
            return positiveResponse();
        }

        if ( role.equals( "master" ) )
        {
            return negativeResponse();
        }

        return unknownResponse();
    }

    public  MasterInfoService( @Context OutputFormat output, @Context GraphDatabaseService db );

}