Tomscop Development Procedure

Last update 2003/10/29

We defined rules to develop Shared Application for TOMSCOP
A Shared Application consists of GUI(JPanel in the current system),
Manager, EventListener and Utilities

Example In the case of developping Shared application called Test.
At first, make Developer should make folder test at tomscop
\application and save created classes

New Shared Application is added on the tabbedpane in TOMSCOP

[How to add]
In TOMSCOP class
TestPanel testpanel = new TestPanel();

[Each classes details]
GUI is defined at The GUI must extend JPanel.

Example: public class TestPanel extends Jpanel

TestListener processes a event at
A peer send messages in this process

if( e.getSource()==shareButton){
Message Transportation will discuss in the next section.

Manager is mainly process a message from
A message from a peer in the same room is processed in this class.
Developer need to define methods to get and process messages.

In the case Shared Application Test uses method1 in
(using sendMsg(source, ApplicationID, ObjectID)), developer should define
a method in like below.

public void setTestMessage( String source, int applicationID, int objectID )

If Test uses method2
Public void setTestMessage( String source, int applicationID, int objectID, int x, int y)

Developer classifies attribute of a message element using objectID.
If there are two methods using method2 in Shared Application Test,
one's objectID is defined as 1 and another is 2. In case of Share
Application Joint Drawing Pad, it sends coordinates(x,y) using method2.
When a peer get the message, a peer compares the objectID and
understand that the coordinates is mouse moving or mouse dragging.

public class TestManager {
  public void setTestMessage( String source, int applicationID, int objectID ) {
    switch( objectID ){
      case 1:
      case 2:

TOMSCOP developer regists setTestMessage in RoomMsgReceiver.

public class RoomMsgReceiver{
  switch( codingID ){
    switch( applicationID ){
      case 1:
      setTestMessage( source, applicationID, objectID, string );

This class is created to save variables for shared application.
These variables are refered by and

[Message transportation]
shared applications exchange messages using I/O pipes(Propagate-
Type) for group. Therefore a peer can not exchange message with
peers in another room using shared application. On the contrary,
developer need to design shared applications that can be used by
all peer in the same room.

[How to message Transportation]
Shared Application can exchange messages using sendRoomMsg
methods in RoomMsgSender. There are four version at sendRoomMsg

1.sendRoomMsg(source, ApplicationID, ObjectID )
2.sendRoomMsg(source, ApplicationID, ObjectID, String)
3.sendRoomMsg(source, ApplicationID, ObjectID, String, String)
4.sendRoomMsg(source, ApplicationID, ObjectID, String, String, File)

source is my peer name(String). ApplicationID is to classify some
Shared Application and is registered at class
ObjectID classifies message attributes in same Shared Application
mentioned at previous chapter and is registered

Developer can define ObjectID in the freely.
ApplicationID is defined by TOMSCOP developer in
Developer must apply for permission to add created Shared Application.

It becomes easy by making based on such specifications to add application to TOMSCOP.

Copyright(c) 2003 Tomomi Kawashima All Rights Reserved.