Skip to main content

Re: SIP Servlets and Java SE 8.

  • From: Eric Cheung < >
  • To:
  • Subject: Re: SIP Servlets and Java SE 8.
  • Date: Wed, 13 Nov 2013 10:45:02 -0500

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