0

I am working to try and incorporate Amber into Wink for Oauth and running into an error on the custom Handler. I have created a HandlerFactory, RequestHandler, and added the wink-properities.properties configuration as well as modified the web.xml with the properties file location.

The error is related to my HandlerFactory class to load the RequestHandler:

    public List<? extends org.apache.wink.server.handlers.RequestHandler>
getRequestHandlers() {

    return Arrays.asList(se.influen.wink.handler.OauthRequestHandler);

    }

Here is the error:

wink/handler/OauthHandlersFactory.java:[15,44] cannot find symbol

[ERROR] symbol  : class handler

Is there something I am missing to get this custom handler to work? Or is there a better way to incorporate Amber into a Wink application? At the current time I am doing nothing more than attempting to get the handler to generate a response.

The goal is to add Oauth2 security into the Wink application.

Tarlog
  • 10,024
  • 2
  • 43
  • 67
ccomstock
  • 3
  • 2
  • I don't quite understand: is it a compilation error or runtime? If it's compilation, check the classpath. If runtime post the actual exception. – Tarlog Mar 05 '12 at 16:04
  • It is compilation error and the error message is above (I will edit with the full error). I guess the core of the question is how to add to the generic class list return Arrays.asList(se.influen.wink.handler.OauthRequestHandler); where List extends RequestHandler>. It doesn't recognize the class I am specifying yet the files are in the same package. – ccomstock Mar 05 '12 at 17:41

1 Answers1

0

What is se.influen.wink.handler.OauthRequestHandler?
According to the method signature you should return instance of class, so new may help:

public List<? extends org.apache.wink.server.handlers.RequestHandler> getRequestHandlers() {

return Arrays.asList(new se.influen.wink.handler.OauthRequestHandler());

}
Tarlog
  • 10,024
  • 2
  • 43
  • 67