Test Task
Communicating Applets in different ClassLoaders using String intern and Java synchronization primitives
In Java there is a documented security problem that two applets could communicate with each other even if they are on different pages and even in different classloaders.
It is believed that this could be done using String pool (String.intern()) and Java synchronization primitives.
So task is to create classes similar to java.net Socket and ServerSocket classes that are able to listen for specific string prefix, create connection and transfer data.
The specifiable parameters for server string socket are:
> String prefix of listening socket
> Width of the channel
It is required to create two applets that allow entering prefix and channel width for server applet and name of server socket for client applet. After establishing connections these applets should be able to exchange text messages to each other.
my solution
If tou want to get source code, tou should ask me.
In Java there is a documented security problem that two applets could communicate with each other even if they are on different pages and even in different classloaders.
It is believed that this could be done using String pool (String.intern()) and Java synchronization primitives.
So task is to create classes similar to java.net Socket and ServerSocket classes that are able to listen for specific string prefix, create connection and transfer data.
The specifiable parameters for server string socket are:
> String prefix of listening socket
> Width of the channel
It is required to create two applets that allow entering prefix and channel width for server applet and name of server socket for client applet. After establishing connections these applets should be able to exchange text messages to each other.
my solution
If tou want to get source code, tou should ask me.

0 Comments:
Post a Comment
<< Home