You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by "Paulex Yang (JIRA)" <ji...@apache.org> on 2006/01/12 11:24:27 UTC

[jira] Created: (HARMONY-27) The network related channels in java.nio.channels are not implemented

The network related channels in java.nio.channels are not implemented 
----------------------------------------------------------------------

         Key: HARMONY-27
         URL: http://issues.apache.org/jira/browse/HARMONY-27
     Project: Harmony
        Type: Bug
  Components: Classlib  
    Reporter: Paulex Yang
 Assigned to: Geir Magnusson Jr 


The following classes defined by Java Spec 5.0 in java.nio.channels are not included in the class library code
	public abstarct class java.nio.channels.DatagramChannel
	public abstract class java.nio.channels.ServerSocketChannel
	public abstract class java.nio.channels.SocketChannel

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (HARMONY-27) The network related channels in java.nio.channels are not implemented

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-27?page=comments#action_12364890 ] 

Tim Ellison commented on HARMONY-27:
------------------------------------

Thanks for doing this work Richard.

I've had a look at your code.  The definition of the INetworkSystem is good, and fits in with the file system and memory system we already have.

Just a couple of questions:
 - why do you need to #include <stdlib.h> in OSNetworkSystem.c ?  I removed it and everything compiled ok.
 - there needs to be a patch to the hynio.def file to export the OSNetworkSystem functions.
 - as you point out, there needs to be Linux equivalents for these.

I won't commit these changes until the above issues are addressed.


> The network related channels in java.nio.channels are not implemented
> ---------------------------------------------------------------------
>
>          Key: HARMONY-27
>          URL: http://issues.apache.org/jira/browse/HARMONY-27
>      Project: Harmony
>         Type: Bug
>   Components: Classlib
>     Reporter: Paulex Yang
>     Assignee: Tim Ellison
>  Attachments: FileDescriptorHandler.java, INetworkSystem.java, NetworkSystem.zip, Nio-net Refactoring.jpg, OSNetworkSystem.c, OSNetworkSystem.h, OSNetworkSystem.java, OSNetworkSystemWin32.c, java.net.JPG
>
> The following classes defined by Java Spec 5.0 in java.nio.channels are not included in the class library code
> 	public abstarct class java.nio.channels.DatagramChannel
> 	public abstract class java.nio.channels.ServerSocketChannel
> 	public abstract class java.nio.channels.SocketChannel

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (HARMONY-27) The network related channels in java.nio.channels are not implemented

Posted by "Richard Liang (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-27?page=all ]

Richard Liang updated HARMONY-27:
---------------------------------

    Attachment: NetworkSystem.zip

Hello Tim,

Here is the implementation of network system. Would you please help to verify it? Thanks a lot.

Implementation Details:
1. Three classes are added in com.ibm.platform:
	com.ibm.platform.FileDescriptorHandler
	com.ibm.platform.INetworkSystem
	com.ibm.platform.OSNetworkSystem
2. Two classes are modified a bit:
	com.ibm.platform.OSComponentFactory
	com.ibm.platform.Platform
3. New added Native code in win.IA32/nio:
	helpers.h, helpers.c, nethelp.h, nethelp.c, 
	OSNetworkSystem.h, OSNetworkSystem.c, OSNetworkSystemWin32.c
	socket.h, socket.c
	makefile is modified accordingly.

The native source is only for win.IA32. I will post linux version soon.

> The network related channels in java.nio.channels are not implemented
> ---------------------------------------------------------------------
>
>          Key: HARMONY-27
>          URL: http://issues.apache.org/jira/browse/HARMONY-27
>      Project: Harmony
>         Type: Bug
>   Components: Classlib
>     Reporter: Paulex Yang
>     Assignee: Tim Ellison
>  Attachments: FileDescriptorHandler.java, INetworkSystem.java, NetworkSystem.zip, Nio-net Refactoring.jpg, OSNetworkSystem.c, OSNetworkSystem.h, OSNetworkSystem.java, OSNetworkSystemWin32.c, java.net.JPG
>
> The following classes defined by Java Spec 5.0 in java.nio.channels are not included in the class library code
> 	public abstarct class java.nio.channels.DatagramChannel
> 	public abstract class java.nio.channels.ServerSocketChannel
> 	public abstract class java.nio.channels.SocketChannel

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Re: [jira] Commented: (HARMONY-27) The network related channels in java.nio.channels are not implemented

Posted by Geir Magnusson Jr <ge...@pobox.com>.
ah!  Nice diagrams!  Sorry I didn't look just at the JIRA...


Yang Paulex wrote:
> Sorry for the confusion I caused, I DID write it in txt, about the "red", I
> didn't mean the color of text, but the color of classes in the class diagram
> I attached:). I thought I should add the attachment link to this JIRA
> comments. Sorry for that.
> 
> 2006/1/19, Geir Magnusson Jr <ge...@pobox.com>:
>>
>>
>> Paulex Yang (JIRA) wrote:
>>>     [
>> http://issues.apache.org/jira/browse/HARMONY-27?page=comments#action_12363230]
>>> Paulex Yang commented on HARMONY-27:
>>> ------------------------------------
>>>
>>> my proposed solution:
>>>
>>> 1. Refactor the java.net
>>>
>>> Currently, the Harmony's socket structur is as below(red means API
>> classes, others are package private). I will attach the diagram to Jira.
>> "red"?  I assume that you did this in HTML?
>>
>> Please, no HTML - it's hard for people to read who don't use
>> HTML-enabled mail readers....  I for example, can't see it...
>>
>> geir
>>
>>> I proposed to refactor to three packages like this:
>>>
>>> java.net: for sure includes All API classes, and includes them only
>>> public class Socket
>>> public class ServerSocket
>>> public abstract class SocketImpl
>>> public class DatagramSocket
>>> public class MulticastSocket extends DatagramSocket
>>> public abstract class DatagramSocketImpl
>>>
>>> org.apache.harmony.net: all implementation classes with a factory
>>> public class SocketImplProvider
>>> class PlainSocketImpl extends SocketImpl
>>> class PlainSocketImpl2 extends PlainSocketImpl
>>> class PlainServerSocketImpl extends PlainSocketImpl
>>> class PlainDatagramSocketImpl extends DatagramSocketImpl
>>> class PlainMulticastSocketImpl extends PlainDatagramSocketImpl
>>> some relevant small classes(Socks4Message, GenericIPMreq)
>>>
>>> org.apache.platform: currently, this package includes native file system
>> and memory management interface, so it is a good place to include the native
>> network interface, the INetworkSystem will encapsulate all JNI interfaces.
>>> public interface INetworkSystem
>>> public class OSNetworkSystem implements INetworkSystem
>>>
>>> 2. Implement java.nio
>>> Now it is ready to implement NIO network channels based on it:
>>> java.nio:
>>> public abstract class SocketChannel
>>> public abstract class ServerSocketChannel
>>> public abstract class DatagramSocketChannel
>>> class SocketChannelImpl
>>> class ServerSocketImpl
>>> class DatagramSocketChannelImpl
>>> class SocketAdapter
>>> class ServerSocketAdapter
>>> class DatagramSocketAdapter
>>>
>>> I will attach the result diagram into JIRA, too
>>>
>>> 3. Modulize them
>>> According to the current Harmony modulization, propose to modify the
>> modulization as follows:
>>> luni exports: java.net, org.apache.harmony.net,
>> org.apache.harmony.platform(move from nio to luni, and export it)
>>> nio exports: java.nio
>>>
>>>
>>>
>>>
>>>> The network related channels in java.nio.channels are not implemented
>>>> ---------------------------------------------------------------------
>>>>
>>>>          Key: HARMONY-27
>>>>          URL: http://issues.apache.org/jira/browse/HARMONY-27
>>>>      Project: Harmony
>>>>         Type: Bug
>>>>   Components: Classlib
>>>>     Reporter: Paulex Yang
>>>>     Assignee: Geir Magnusson Jr
>>>> The following classes defined by Java Spec 5.0 in java.nio.channels are
>> not included in the class library code
>>>>      public abstarct class java.nio.channels.DatagramChannel
>>>>      public abstract class java.nio.channels.ServerSocketChannel
>>>>      public abstract class java.nio.channels.SocketChannel
> 
> 
> 
> --
> Paulex Yang
> China Software Development Labotary
> IBM
> 

Re: [jira] Commented: (HARMONY-27) The network related channels in java.nio.channels are not implemented

Posted by Yang Paulex <pa...@gmail.com>.
Sorry for the confusion I caused, I DID write it in txt, about the "red", I
didn't mean the color of text, but the color of classes in the class diagram
I attached:). I thought I should add the attachment link to this JIRA
comments. Sorry for that.

2006/1/19, Geir Magnusson Jr <ge...@pobox.com>:
>
>
>
> Paulex Yang (JIRA) wrote:
> >     [
> http://issues.apache.org/jira/browse/HARMONY-27?page=comments#action_12363230]
> >
> > Paulex Yang commented on HARMONY-27:
> > ------------------------------------
> >
> > my proposed solution:
> >
> > 1. Refactor the java.net
> >
> > Currently, the Harmony's socket structur is as below(red means API
> classes, others are package private). I will attach the diagram to Jira.
> >
>
> "red"?  I assume that you did this in HTML?
>
> Please, no HTML - it's hard for people to read who don't use
> HTML-enabled mail readers....  I for example, can't see it...
>
> geir
>
> > I proposed to refactor to three packages like this:
> >
> > java.net: for sure includes All API classes, and includes them only
> > public class Socket
> > public class ServerSocket
> > public abstract class SocketImpl
> > public class DatagramSocket
> > public class MulticastSocket extends DatagramSocket
> > public abstract class DatagramSocketImpl
> >
> > org.apache.harmony.net: all implementation classes with a factory
> > public class SocketImplProvider
> > class PlainSocketImpl extends SocketImpl
> > class PlainSocketImpl2 extends PlainSocketImpl
> > class PlainServerSocketImpl extends PlainSocketImpl
> > class PlainDatagramSocketImpl extends DatagramSocketImpl
> > class PlainMulticastSocketImpl extends PlainDatagramSocketImpl
> > some relevant small classes(Socks4Message, GenericIPMreq)
> >
> > org.apache.platform: currently, this package includes native file system
> and memory management interface, so it is a good place to include the native
> network interface, the INetworkSystem will encapsulate all JNI interfaces.
> > public interface INetworkSystem
> > public class OSNetworkSystem implements INetworkSystem
> >
> > 2. Implement java.nio
> > Now it is ready to implement NIO network channels based on it:
> > java.nio:
> > public abstract class SocketChannel
> > public abstract class ServerSocketChannel
> > public abstract class DatagramSocketChannel
> > class SocketChannelImpl
> > class ServerSocketImpl
> > class DatagramSocketChannelImpl
> > class SocketAdapter
> > class ServerSocketAdapter
> > class DatagramSocketAdapter
> >
> > I will attach the result diagram into JIRA, too
> >
> > 3. Modulize them
> > According to the current Harmony modulization, propose to modify the
> modulization as follows:
> > luni exports: java.net, org.apache.harmony.net,
> org.apache.harmony.platform(move from nio to luni, and export it)
> > nio exports: java.nio
> >
> >
> >
> >
> >> The network related channels in java.nio.channels are not implemented
> >> ---------------------------------------------------------------------
> >>
> >>          Key: HARMONY-27
> >>          URL: http://issues.apache.org/jira/browse/HARMONY-27
> >>      Project: Harmony
> >>         Type: Bug
> >>   Components: Classlib
> >>     Reporter: Paulex Yang
> >>     Assignee: Geir Magnusson Jr
> >
> >> The following classes defined by Java Spec 5.0 in java.nio.channels are
> not included in the class library code
> >>      public abstarct class java.nio.channels.DatagramChannel
> >>      public abstract class java.nio.channels.ServerSocketChannel
> >>      public abstract class java.nio.channels.SocketChannel
> >
>



--
Paulex Yang
China Software Development Labotary
IBM

Re: [jira] Commented: (HARMONY-27) The network related channels in java.nio.channels are not implemented

Posted by Geir Magnusson Jr <ge...@pobox.com>.

Paulex Yang (JIRA) wrote:
>     [ http://issues.apache.org/jira/browse/HARMONY-27?page=comments#action_12363230 ] 
> 
> Paulex Yang commented on HARMONY-27:
> ------------------------------------
> 
> my proposed solution:
> 
> 1. Refactor the java.net
> 
> Currently, the Harmony's socket structur is as below(red means API classes, others are package private). I will attach the diagram to Jira.
> 

"red"?  I assume that you did this in HTML?

Please, no HTML - it's hard for people to read who don't use 
HTML-enabled mail readers....  I for example, can't see it...

geir

> I proposed to refactor to three packages like this:
> 
> java.net: for sure includes All API classes, and includes them only
> public class Socket
> public class ServerSocket
> public abstract class SocketImpl
> public class DatagramSocket
> public class MulticastSocket extends DatagramSocket
> public abstract class DatagramSocketImpl
> 
> org.apache.harmony.net: all implementation classes with a factory
> public class SocketImplProvider
> class PlainSocketImpl extends SocketImpl
> class PlainSocketImpl2 extends PlainSocketImpl
> class PlainServerSocketImpl extends PlainSocketImpl
> class PlainDatagramSocketImpl extends DatagramSocketImpl
> class PlainMulticastSocketImpl extends PlainDatagramSocketImpl
> some relevant small classes(Socks4Message, GenericIPMreq)
> 
> org.apache.platform: currently, this package includes native file system and memory management interface, so it is a good place to include the native network interface, the INetworkSystem will encapsulate all JNI interfaces.
> public interface INetworkSystem
> public class OSNetworkSystem implements INetworkSystem
> 
> 2. Implement java.nio
> Now it is ready to implement NIO network channels based on it:
> java.nio:
> public abstract class SocketChannel
> public abstract class ServerSocketChannel
> public abstract class DatagramSocketChannel
> class SocketChannelImpl
> class ServerSocketImpl
> class DatagramSocketChannelImpl
> class SocketAdapter
> class ServerSocketAdapter
> class DatagramSocketAdapter
> 
> I will attach the result diagram into JIRA, too
> 
> 3. Modulize them
> According to the current Harmony modulization, propose to modify the modulization as follows:
> luni exports: java.net, org.apache.harmony.net, org.apache.harmony.platform(move from nio to luni, and export it)
> nio exports: java.nio
> 
> 
> 
> 
>> The network related channels in java.nio.channels are not implemented
>> ---------------------------------------------------------------------
>>
>>          Key: HARMONY-27
>>          URL: http://issues.apache.org/jira/browse/HARMONY-27
>>      Project: Harmony
>>         Type: Bug
>>   Components: Classlib
>>     Reporter: Paulex Yang
>>     Assignee: Geir Magnusson Jr
> 
>> The following classes defined by Java Spec 5.0 in java.nio.channels are not included in the class library code
>> 	public abstarct class java.nio.channels.DatagramChannel
>> 	public abstract class java.nio.channels.ServerSocketChannel
>> 	public abstract class java.nio.channels.SocketChannel
> 

[jira] Commented: (HARMONY-27) The network related channels in java.nio.channels are not implemented

Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-27?page=comments#action_12363230 ] 

Paulex Yang commented on HARMONY-27:
------------------------------------

my proposed solution:

1. Refactor the java.net

Currently, the Harmony's socket structur is as below(red means API classes, others are package private). I will attach the diagram to Jira.

I proposed to refactor to three packages like this:

java.net: for sure includes All API classes, and includes them only
public class Socket
public class ServerSocket
public abstract class SocketImpl
public class DatagramSocket
public class MulticastSocket extends DatagramSocket
public abstract class DatagramSocketImpl

org.apache.harmony.net: all implementation classes with a factory
public class SocketImplProvider
class PlainSocketImpl extends SocketImpl
class PlainSocketImpl2 extends PlainSocketImpl
class PlainServerSocketImpl extends PlainSocketImpl
class PlainDatagramSocketImpl extends DatagramSocketImpl
class PlainMulticastSocketImpl extends PlainDatagramSocketImpl
some relevant small classes(Socks4Message, GenericIPMreq)

org.apache.platform: currently, this package includes native file system and memory management interface, so it is a good place to include the native network interface, the INetworkSystem will encapsulate all JNI interfaces.
public interface INetworkSystem
public class OSNetworkSystem implements INetworkSystem

2. Implement java.nio
Now it is ready to implement NIO network channels based on it:
java.nio:
public abstract class SocketChannel
public abstract class ServerSocketChannel
public abstract class DatagramSocketChannel
class SocketChannelImpl
class ServerSocketImpl
class DatagramSocketChannelImpl
class SocketAdapter
class ServerSocketAdapter
class DatagramSocketAdapter

I will attach the result diagram into JIRA, too

3. Modulize them
According to the current Harmony modulization, propose to modify the modulization as follows:
luni exports: java.net, org.apache.harmony.net, org.apache.harmony.platform(move from nio to luni, and export it)
nio exports: java.nio




> The network related channels in java.nio.channels are not implemented
> ---------------------------------------------------------------------
>
>          Key: HARMONY-27
>          URL: http://issues.apache.org/jira/browse/HARMONY-27
>      Project: Harmony
>         Type: Bug
>   Components: Classlib
>     Reporter: Paulex Yang
>     Assignee: Geir Magnusson Jr

>
> The following classes defined by Java Spec 5.0 in java.nio.channels are not included in the class library code
> 	public abstarct class java.nio.channels.DatagramChannel
> 	public abstract class java.nio.channels.ServerSocketChannel
> 	public abstract class java.nio.channels.SocketChannel

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (HARMONY-27) The network related channels in java.nio.channels are not implemented

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-27?page=comments#action_12363415 ] 

Tim Ellison commented on HARMONY-27:
------------------------------------

Thanks Paulex -- this makes sense.  It fits in with the design of FileChannels that are under development already.

Can you attach the native code that goes with this?  Then I can create the SocketChannels and refactor the regular IO to use the o.a.h.net package.


> The network related channels in java.nio.channels are not implemented
> ---------------------------------------------------------------------
>
>          Key: HARMONY-27
>          URL: http://issues.apache.org/jira/browse/HARMONY-27
>      Project: Harmony
>         Type: Bug
>   Components: Classlib
>     Reporter: Paulex Yang
>     Assignee: Tim Ellison
>  Attachments: FileDescriptorHandler.java, INetworkSystem.java, Nio-net Refactoring.jpg, OSNetworkSystem.java, java.net.JPG
>
> The following classes defined by Java Spec 5.0 in java.nio.channels are not included in the class library code
> 	public abstarct class java.nio.channels.DatagramChannel
> 	public abstract class java.nio.channels.ServerSocketChannel
> 	public abstract class java.nio.channels.SocketChannel

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (HARMONY-27) The network related channels in java.nio.channels are not implemented

Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-27?page=all ]

Paulex Yang updated HARMONY-27:
-------------------------------

    Attachment: java.net.JPG

the current java.net class diagram

> The network related channels in java.nio.channels are not implemented
> ---------------------------------------------------------------------
>
>          Key: HARMONY-27
>          URL: http://issues.apache.org/jira/browse/HARMONY-27
>      Project: Harmony
>         Type: Bug
>   Components: Classlib
>     Reporter: Paulex Yang
>     Assignee: Geir Magnusson Jr
>  Attachments: Nio-net Refactoring.jpg, java.net.JPG
>
> The following classes defined by Java Spec 5.0 in java.nio.channels are not included in the class library code
> 	public abstarct class java.nio.channels.DatagramChannel
> 	public abstract class java.nio.channels.ServerSocketChannel
> 	public abstract class java.nio.channels.SocketChannel

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (HARMONY-27) The network related channels in java.nio.channels are not implemented

Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-27?page=all ]

Paulex Yang updated HARMONY-27:
-------------------------------

    Attachment: INetworkSystem.java
                OSNetworkSystem.java
                FileDescriptorHandler.java

This files demonstrate what I mean on the JNI interface, which encapsulate network relevant functions for both NIO and LUNI component. Significant part of the method declarations are refactored from current Harmony java.net JNI methods, others are added to support NIO extension.

> The network related channels in java.nio.channels are not implemented
> ---------------------------------------------------------------------
>
>          Key: HARMONY-27
>          URL: http://issues.apache.org/jira/browse/HARMONY-27
>      Project: Harmony
>         Type: Bug
>   Components: Classlib
>     Reporter: Paulex Yang
>     Assignee: Geir Magnusson Jr
>  Attachments: FileDescriptorHandler.java, INetworkSystem.java, Nio-net Refactoring.jpg, OSNetworkSystem.java, java.net.JPG
>
> The following classes defined by Java Spec 5.0 in java.nio.channels are not included in the class library code
> 	public abstarct class java.nio.channels.DatagramChannel
> 	public abstract class java.nio.channels.ServerSocketChannel
> 	public abstract class java.nio.channels.SocketChannel

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (HARMONY-27) The network related channels in java.nio.channels are not implemented

Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-27?page=all ]

Paulex Yang updated HARMONY-27:
-------------------------------

    Attachment: OSNetworkSystem.h
                OSNetworkSystem.c
                OSNetworkSystemWin32.c

Following the JNI interfaces I attached before, here goes the native implementations. The OSNetworkSystem.h is the JNI header file generated by javah, and OSNetworkSystem.c is portable implementation, OSNetworkSystemWin32.c is the complement of OSNetworkSystem.c, which are win32 platform dependent.

Most (I guess 90%) of these methods are refactored from the original socket native codes located in luni component,  including simpl.c, psimpl2.c, pssimpl.c, pmsimpl.c and pdsimpl.c (and for sure, these files can be replaced if relevant Java files are done), the modification to these methods only limited to change name to Java_java_net_***Socket_*** to Java_com_ibm_platform_OSNetworkSytem_***, etc. Others are added to meet channels' needs. 

Those methods in OSNetworkSystem.c depend heavily on the port library, so that they should be compiled on different platform easiy without change, I've tested on RedHat 9 and Win32. Further more, the two methods in OSNetworkSystemWin32.c are platform specific just because there are some pitfalls in port library:), hope we can get around it later.  

There are still some TODOs left to use these files
1. Java codes 
2. Some minor changes to other native files, i.e., the method declarations within original sockect.c  should be moved to socket.h
3. The JCL_CACHE_GET/SET macros using is not refactor yet, and temporarily I work around it by using reflection directly, and the nethelp.c needs some straightforward modification to add these reflection helper methods. I will attach a patch later to refactor the caching mechanism and avoid performance regression. 


> The network related channels in java.nio.channels are not implemented
> ---------------------------------------------------------------------
>
>          Key: HARMONY-27
>          URL: http://issues.apache.org/jira/browse/HARMONY-27
>      Project: Harmony
>         Type: Bug
>   Components: Classlib
>     Reporter: Paulex Yang
>     Assignee: Tim Ellison
>  Attachments: FileDescriptorHandler.java, INetworkSystem.java, Nio-net Refactoring.jpg, OSNetworkSystem.c, OSNetworkSystem.h, OSNetworkSystem.java, OSNetworkSystemWin32.c, java.net.JPG
>
> The following classes defined by Java Spec 5.0 in java.nio.channels are not included in the class library code
> 	public abstarct class java.nio.channels.DatagramChannel
> 	public abstract class java.nio.channels.ServerSocketChannel
> 	public abstract class java.nio.channels.SocketChannel

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (HARMONY-27) The network related channels in java.nio.channels are not implemented

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-27?page=all ]

Tim Ellison reassigned HARMONY-27:
----------------------------------

    Assign To: Tim Ellison  (was: Geir Magnusson Jr)

> The network related channels in java.nio.channels are not implemented
> ---------------------------------------------------------------------
>
>          Key: HARMONY-27
>          URL: http://issues.apache.org/jira/browse/HARMONY-27
>      Project: Harmony
>         Type: Bug
>   Components: Classlib
>     Reporter: Paulex Yang
>     Assignee: Tim Ellison
>  Attachments: FileDescriptorHandler.java, INetworkSystem.java, Nio-net Refactoring.jpg, OSNetworkSystem.java, java.net.JPG
>
> The following classes defined by Java Spec 5.0 in java.nio.channels are not included in the class library code
> 	public abstarct class java.nio.channels.DatagramChannel
> 	public abstract class java.nio.channels.ServerSocketChannel
> 	public abstract class java.nio.channels.SocketChannel

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (HARMONY-27) The network related channels in java.nio.channels are not implemented

Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-27?page=all ]

Paulex Yang updated HARMONY-27:
-------------------------------

    Attachment: Nio-net Refactoring.jpg

the proposed net/nio refactory result diagram

> The network related channels in java.nio.channels are not implemented
> ---------------------------------------------------------------------
>
>          Key: HARMONY-27
>          URL: http://issues.apache.org/jira/browse/HARMONY-27
>      Project: Harmony
>         Type: Bug
>   Components: Classlib
>     Reporter: Paulex Yang
>     Assignee: Geir Magnusson Jr
>  Attachments: Nio-net Refactoring.jpg, java.net.JPG
>
> The following classes defined by Java Spec 5.0 in java.nio.channels are not included in the class library code
> 	public abstarct class java.nio.channels.DatagramChannel
> 	public abstract class java.nio.channels.ServerSocketChannel
> 	public abstract class java.nio.channels.SocketChannel

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (HARMONY-27) The network related channels in java.nio.channels are not implemented

Posted by "Richard Liang (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-27?page=all ]

Richard Liang updated HARMONY-27:
---------------------------------

    Attachment: hynio_patch.txt
                NetworkSystem-linux.zip

Hello Tim, 

Thanks a lot for your kind comments. :-)

- why do you need to #include <stdlib.h> in OSNetworkSystem.c ? I removed it and everything compiled ok.
==> yes. we do not need the 'include' statement. Sorry :-)
 - there needs to be a patch to the hynio.def file to export the OSNetworkSystem functions.
==> I have attached the patch for hynio.def called hynio_patch.txt
 - as you point out, there needs to be Linux equivalents for these.
==>>They are attached called NetworkSystem-linux.zip

> The network related channels in java.nio.channels are not implemented
> ---------------------------------------------------------------------
>
>          Key: HARMONY-27
>          URL: http://issues.apache.org/jira/browse/HARMONY-27
>      Project: Harmony
>         Type: Bug
>   Components: Classlib
>     Reporter: Paulex Yang
>     Assignee: Tim Ellison
>  Attachments: FileDescriptorHandler.java, INetworkSystem.java, NetworkSystem-linux.zip, NetworkSystem.zip, Nio-net Refactoring.jpg, OSNetworkSystem.c, OSNetworkSystem.h, OSNetworkSystem.java, OSNetworkSystemWin32.c, hynio_patch.txt, java.net.JPG
>
> The following classes defined by Java Spec 5.0 in java.nio.channels are not included in the class library code
> 	public abstarct class java.nio.channels.DatagramChannel
> 	public abstract class java.nio.channels.ServerSocketChannel
> 	public abstract class java.nio.channels.SocketChannel

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (HARMONY-27) The network related channels in java.nio.channels are not implemented

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-27?page=all ]
     
Tim Ellison resolved HARMONY-27:
--------------------------------

    Resolution: Fixed

Richard,

Thanks, I've checked and applied the enhancements you provided.  Please ensure that they have been applied as you expected.  

I realize that there is more refactoring required based on Paulex's comments, please can you put those into a new JIRA issue (linked to this if you want) to ensure we can track the completion of coherent, individual steps.  Of course, if there is a problem with this patch-set feel free to reopen this issue.

Regards,
Tim

> The network related channels in java.nio.channels are not implemented
> ---------------------------------------------------------------------
>
>          Key: HARMONY-27
>          URL: http://issues.apache.org/jira/browse/HARMONY-27
>      Project: Harmony
>         Type: Bug
>   Components: Classlib
>     Reporter: Paulex Yang
>     Assignee: Tim Ellison
>  Attachments: FileDescriptorHandler.java, INetworkSystem.java, NetworkSystem-linux.zip, NetworkSystem.zip, Nio-net Refactoring.jpg, OSNetworkSystem.c, OSNetworkSystem.h, OSNetworkSystem.java, OSNetworkSystemWin32.c, hynio_patch.txt, java.net.JPG
>
> The following classes defined by Java Spec 5.0 in java.nio.channels are not included in the class library code
> 	public abstarct class java.nio.channels.DatagramChannel
> 	public abstract class java.nio.channels.ServerSocketChannel
> 	public abstract class java.nio.channels.SocketChannel

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira