Skip to main content

Re: SIP Servlets and Java SE 8.

  • From: binod pg < >
  • To:
  • Subject: Re: SIP Servlets and Java SE 8.
  • Date: Wed, 13 Nov 2013 21:41:35 +0530
  • Organization: Oracle Corporation

Hi Eric,

There is little value in retrofitting listeners that are specified using @SipListener, since they
are declarative and using a functional interface as a declarative listener may not add much
value anyway.

Programmatically specified listeners are actually callbacks. They can be retrofitted.

thanks,
Binod.

On 11/13/2013 9:15 PM, Eric Cheung wrote:
Hi Binod
The proposal seems fine and should help with developers using SE 8. My question is whether we are going to retrofit functional interface to existing listeners, or only to new listeners introduced in 359.
Thanks
Eric

On 11/8/13 2:18 AM, binod pg wrote:
Just to follow up on the discussion we had in the EG meeting.

Here are some links, if anyone want to quickly refer to SE 8 features.

1.
http://docs.oracle.com/javase/tutorial/java/javaOO/lambdaexpressions.html
2.
http://docs.oracle.com/javase/tutorial/collections/streams/parallelism.html

To recap some of the potential API changes. There may be more.

A) Enhance listeners like AutomaticProcessingListener and
AttributeStoreBindingListener to a functional interface (interface with
just one method).
For example, instead of AttributeStoreBindingListener, we could use a
AttributeCallback as follows. [Note: This is not a proposal at the moment.
This is just to explain the point to the EG]

public interface AttributeCallback<T extends AttributeStore> {
enum TYPE {
BOUND,
UNBOUND
}

void invoke(TYPE t, AttributeStoreBindingEvent<T> event);
}

B) Our current API depends heavily on Iterator and ListIterator. However
the SE 8 API is designed to obtain a java.util.Stream from Collection.
So, we will need to add APIs to return a collection (eg:
SipServletMessage.getHeaderNameSet()) instead of Iterator/ListIterator.

Let me know what do you think.

thanks,
Binod.




SIP Servlets and Java SE 8.

binod pg 11/08/2013

Re: SIP Servlets and Java SE 8.

Eric Cheung 11/13/2013

Re: SIP Servlets and Java SE 8.

binod pg 11/13/2013
 
 
Close
loading
Please Confirm
Close