Good afternoon staff ..

I have a question ... is there any way I can create an interceptor and 
starting him pass a parameter to the service end??

Basic example: ...


//Interceptor that has parameter entidadeConveniada want to go to the 
service in any way without retrieving the request ..

@Component
@Provider
@ServerInterceptor
@SecurityPrecedence
public class AutenticacaoEntidadeConveniadaInterceptor implements 
PreProcessInterceptor {

      @Override
     public ServerResponse preProcess(HttpRequest request, 
ResourceMethod method) throws WebApplicationException {
         EntidadeConveniada entidadeConveniada = processaRequestServico();
         request.setAttribute("ENTIDADE", entidadeConveniada);
          return null;
     }
}

//Class of service .. I want to recover some form parameter 
entidadeConveniada previously instantiated more without accessing the 
request, via the parameter own or via some annotation...

@RequerAutenticacao
@Component
@Path("/mockRequestComAutenticacao")
public class MockRequestAutenticacaoTokens {

     @POST
     @Path("/postComRetornoEAutenticacao")
     @Produces("text/plain")
     public String 
postComParametroERetornoEAutenticacao(EntidadeConveniada 
entidadeConveniada, @FormParam("parametro001") String parametro001) {
         return "Sucess";
     }
}


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users

Reply via email to