class RestAuthenticationEntryPoint implements AuthenticationEntryPoint, InitializingBean, Ordered {
	
	private String realmName = "rest-realm";

	@Override
	public void commence(HttpServletRequest request, HttpServletResponse response,
			AuthenticationException authException) throws IOException, ServletException {
		
		
		response.sendError( HttpServletResponse.SC_UNAUTHORIZED, "Unauthorized" );

	}

	@Override
	public int getOrder() {
		return 1;
	}

	@Override
	public void afterPropertiesSet() throws Exception {<FILL_FUNCTION_BODY>}

}

		if ((realmName == null) || "".equals(realmName)) {
			throw new IllegalArgumentException("realmName must be specified");
		}
	
<no_super_class>