Hi,

I am trying to mimic this in Clojure:

myClient.registerNotificationHandler(correlationID, this);

where "this" has the signature:

public class MyClass implements IA, IC, INotificationHandler

and the register method signature is:

public IClientNotificationHandler registerNotificationHandler(String 
correlationID, INotificationHandler handler)

So my first stab in Clojure was:

(def notifcationHandler (.registerNotificationHandler myClient "12345" 
MyClass))

but I get:

ClassCastException Cannot cast class java.lang.Class to interface 
INotificationHandler  java.lang.Class.cast (Class.java:1840)

I suppose it is encouraging that INotificationHandler appears in the error 
- it shows that MyClass is being analysed.

What is the answer? My experiments with proxy have not helped so far.

Any pointers welcomed!

Keith

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to