Sie sind auf Seite 1von 42

FUTURE SUPPORT ASSISTANT

Submitted in Partial fulfillment of the requirements for the award of the degree
B.Tech in computer science and engineering at Maulana Abul Kalam Azad
University of Technology for the year 2013-17

Submitted by

Ananya Roy University Roll No. 14800113030


Sumit Sagar University Roll No. 14800113114
Anirudha Patra University Roll No. 14800113066
Arindam Biswas University Roll No. 14800113080

Under the guidance of


Prof. Abhijit Saha

Department of Computer Science and Engineering


Future institute of Engineering and Management
Kolkata, West Bengal

1 | Page
FUTURE SUPPORT ASSISTANT

Submitted in Partial fulfillment of the requirements for the award of the degree
B.Tech in computer science and engineering at Maulana Abul Kalam Azad
University of Technology for the year 2013-17

Submitted by

Ananya Roy University Roll No. 14800113030


Sumit Sagar University Roll No. 14800113114
Anirudha Patra University Roll No. 14800113066
Arindam Biswas University Roll No. 14800113080

Under the guidance of


Prof. Abhijit Saha

Department of Computer Science and Engineering


Future institute of Engineering and Management
Kolkata, West Bengal

2 | Page
Project Associates:-
Serial Name of the Class WBUT Telephone E-mail Address Signature
No Student Roll Roll No no

1 Ananya Roy 104 94

2 Sumit Sagar 76 9471061070


14800113114 Sumit.cse.fiem@gmail.com
3

Guide:-

Name Telephone No E-mail Address Signature


AbijitSaha 9681150530 abhijit_saha55@rediffmail.co
m

3 | Page
CERTIFICATE OF APPROVAL

This is to certify that this report of B.Tech 7 th semester project, entitled Future
Support Assistant based on Java is a record of bona-fide work, carried out by
Sumit Sagar, Ananya Roy, Anirudha Patra, Arindam Biswas under my
supervision and guidance.
In my opinion, report in its present form is in partial fulfillment of all the
requirements, as specified by Future Institute of Engineering and Management,
Kolkata and as per regulation of Maulana Abul Kalam Azad University of
Technology .In fact, it has attained the standard, necessary for submission. To the
best of my knowledge the results embodied in this report are original in nature and
worthy of incorporation in the present version of the report for B.Tech program in
Computer Science and Engineering in the year 2016-2017.

Guide/Supervisor
____________________________
Mr./Ms/Dr.LMN
Department of Computer Science and Engineering
Future Institute of Engineering & Management

_
____________________ _____________________________
Examiner(s) Head of the Department
Computer Science and Engineering
Future Institute of Engineering and Management

4 | Page
ACKNOWLEDGEMENT

We take this opportunity to express our profound gratitude and deep regards to our
mentor Prof. Abhijit Saha for his exemplary guidance, monitoring and constant
encouragement throughout the course of this project. The blessing, help and
guidance given by him, time to time, shall carry us a long way in the journey of life
on which we are about to embark. We also acknowledge the constant support and
enthusiasm and guidance given by our Principal Dr.Aloke Kumar Ghosh and our
head of department Prof. Tapas Roy.

Ananya Roy ________________________


Roll No. 14800113030, Registration No-131480110030

Sumit Sagar ________________________


Roll No-14800113114, Registration No-131480113114

Anirudha Patra ________________________


Roll No. 14800113030, Registration No-131480110030

Arindam Biswas ________________________


Roll No-14800113114, Registration No-131480113114

5 | Page
PROJECT ABSTRACT

6 | Page
CONTENTS

CHAPTER 1 INTRODUCTION
Objective
Summary of Present work
Scope of the system

CHAPTER 2 SOFTWARE REQUIREMENT SPECIFICATION


CHAPTER 3 SOFTWARE DEVELOPMENT MODEL
CHAPTER 4 OVERVIEW
System Overview

CHAPTER 5 CLIENT AND SERVER TECHNOLOGIES


Class hierarchy of server and client

CHAPTER 6 DESIGN
ER Diagram
Use-case diagram
Client-server functional diagram

CHAPTER 7 TESTING
Testing Process
Test case 1

CHAPTER 8 PROJECT SCREENSHOTS


CHAPTER 9 CONCLUSION AND FUTURE SCOPE
CHAPTER 10 REFERENCES

7 | Page
Objective of Future support
Assistant

Future support assistant is a one-stop solution for connected,


contextual support for the PCs. And its ready to go after turning
on the PCs by installing a java application in a network. Since Java
is used in development so this application is platform
independent. The main objective behind the development of
Future support assistant which have two modules that is, java
messenger and remote desktop monitor is to build a common
messaging platform for connected contextual support of PCs as
well as to build a server application that allows to view or even
control the desktop session on another machine that is running a
compatible client application, with the efficiency to provide the
real time information about the remote machine.

Future support assistant will help the networks used in institutes


and home to connect and contextual support for PCs via a single
java application which has chatting as well as remote desktop
access as an added feature.
8 | Page
Scope of the system

The development plan of Future support assistant is analyzed


and described below:
Development of Java Messenger
Chat frame implemented using Java Swing Container.
History frame implemented using Java swing Container.
Development of server frame using Java swing
container.
Purpose: Development of Java messenger by
Implementation of socket in Java, through the
connection of socket to the server (by getting the code
attached with the socket with the creation of
socket.java). A timeout of zero is interpreted as an
infinite timeout, the connection will then block until
established or an error occurs. Two sockets are created,
at the client side and server side. The client connects to
the server through its IP address and port number. They
must share the same port number for them to
communicate.

Server working description of Chat Support of


FutureSupportAssistant

Through the operations are divided into three sections

1. Server Listener: This step on the part of the server, which


makes him the ability to send and receive data to clients
through a joint Port.

9 | Page
2. Client connection: This step on the part of clients,
participants in the send and receive from the server.

3. Services: which operations are allowed to do during the


exchange of data between clients through the server.

Run the jar file FutureSupportAssistant.jar and


Server_FutureSupportAssistant.jar and following things are
done:

On Server select, "data.xml" as database file. This file


contains usernames and passwords.
On FutureSupportAssistant.jar select, "History.xml" as
history file. This file is used to save chat history.
In many cases, if FutureSupportAssistant cannot find
the server then adjust firewall to give it network access.

Message structure

Each message in FutureSupportAssistant has four fields:

type: This can be set to message, login, newuser, etc.


sender: The username of sender
content: Actual content of the message
Recipient: Username of recipient of the message

There are two main classes


in Server_FutureSupportAssistant for handling
connections and messages. On startup the SocketServer
runs in a separate thread. The job of SocketServer is to
wait for connections and for each connection start a new
thread ServerThread. Once the connection is
established, ServerThread will listen for any messages and
hand it over to SocketServer to process. Also it will forward
messages from other users to the connected user.

10 | P a g e
//In ServerThread read the incoming message and
hand it to SocketServer
Message msg = (Message) streamIn.readObject();
server.handle(ID, msg);
.......
// In SocketServer process the messages based on
their type

public synchronized void handle(int ID, Message msg){


if(msg.type.equals("login")){
....
}
else id(msg.type.equals("message")){
if(msg.recipient.equals("All")){
Announce("message", msg.sender,
msg.content);
}
else{
// Find the thread of recipient and forward it
to him
}
}

FutureSupportAssistant first connects to


Server_FutureSupportAssistant, specified by its IP-address
and port number. Arriving messages are then displayed on
message board along with their senders.

When a user wants to send a file, first his request is sent via
a message of type upload_req. The recipient then does the
following:

The recipient side sends its reply in a message of


type upload_res
If request is accepted then the recipient opens a new
port
For positive reply, recipient's IP address and port
number is sent back

11 | P a g e
The sender, on receiving positive reply connects to this
socket and starts file upload

An advantage of this approach is that the clients can chat


and transfer files at the same time. Unlike messages, files do
not go through Server.

// On recipient side, start a new thread for download

Download dwn = new Download(....);

Thread t = new Thread(dwn);

t.start();

send(new Message("upload_res", ui.username, dwn.port,


msg.sender));

// Reply to sender with IP address and port number

// On sender side, start a new thread for file upload

// Connect to the port specified in reply

Upload upl = new Upload(addr, port, ui.file, ui);

Thread t = new Thread(upl);

t.start();

Creation of socket at specific port by implementing Socket


constructor of Socket class. And also get Socket details using
getLocalPort() getLocalAddress , getInetAddress() & getPort()
methods.

Classes Implemented

12 | P a g e
ChatFrame

Java extension file named as ChatFrame, resides in package


com.ui, file size is 27741 bytes with runtime classpath:
C:\Users\Administrator\Desktop\Final_project\Final_Year_sumit\Fut
ureSupportAssistant\build\classes

ChatFrame gives a plateform to connect the host with the Host ID


and port number. If server is started client can log-in or sign up
with desired username and password, can also view chat history,
send files and public or private messages within the same
network or in the localhost. Chat Frame also have a jbutton for
remote desktop administration which will be implemented in
future.

HistoryFrame

Java extension file named as HistoryFrame, resides in package


com.ui, file size is 7175 bytes with runtime classpath:

C:\Users\Administrator\Desktop\Final_project\Final_Year_sumit\Fut
ureSupportAssistant\build\classes

HistoryFrame is implemented to view the chat history with time,


day, year including the messages and history file is mentioned in
history.

Download

Java extension file named as Download, resides in package


com.socket, file size 1673 bytes with runtime classpath:

C:\Users\Administrator\Desktop\Final_project\Final_Year_sumit\Fut
ureSupportAssistant\build\classes

Download is implemented to download the file send in public or


private message to user. After the successful download of file,
ChatFrame prompts a message [Assistant > Me] : Download
complete, after the server accepts the socket from client and

13 | P a g e
download the file implementing getRemoteSocketAddress()
method. If download is unsuccessful the exceptions are shown
directly to the user, so that user can identify the basic problems
and initiate the troubleshooting steps.

ServerFrame

Java extension file named as ServerFrame, resides in package


com.socket, file size 7657 bytes with runtime classpath:

C:\Users\Administrator\Desktop\Final_project\Final_Year_sumit\Ser
ver_FutureSupportAssistant\build\classes

ServerFrame is implemented to start the server manually by


uploading the database file directly, filePath is created in
D:/Data.xml.

Classes Message, History, SocketServer, SocketClient is


explained above.

SOFTWARE REQUIREMENTS
SPECIFICATION

Software Required
OPERATING SYSTEM : WINDOWS XP/VISTA/
SOFTWARE USED: NetbeansIDE
FRONT END :Java (I.E. Swing, Sockets, Xml)
JAVA SUPPORT: JDK6.0+
14 | P a g e
CONNECTION : TCP / IP
PROTOCOL: HTTP, SMTP, POP3.

Hardware Required

PROCESSOR : PENTIUM IV
CLOCK SPEED : 2 GHZ
SYSTEM BUS : 32 BIT
RAM : 128 MB
HDD : 40GB
MONITOR : SVGA COLOR

SOFTWARE DEVELOPMENT
PROCESS MODEL
Royce's original waterfall model is adopted in Future
Support Assistant as software development process
model, the following phases are followed in order:

1.System and software requirements captured in


a product requirements document.
2.Analysis of Future support assistant
3.Designed : resulting in the software architecture

15 | P a g e
4.Coding: the development, proving, and integration of
software
5.Testing: the systematic discover
and debugging of defects
6.Operations: the installation, migration, support,
and maintenance of Future support Assistant.

Water fall model adopted in Future Support


assistant

OVERVIEW

System Overview

16 | P a g e
The FSA uses two-tier client server architecture as shown in figure
below. The application handling is completed separately for
database queries and updates and for business logic processing
and user interface presentation.

Client (tier-1)
Application
Network
Drivers

Network
Interface

Network Interface

Databas
Server (tier-2)
e

Generally, the networks bind the back-end of an application


to the front-end, though all tiers can be present on the same
hardware. The architecture of any client/server situation is
by classification at least a two-tier system, the client is the
first tier and the server is the second. The two-tier design
generally encompasses client demanding services
undeviatingly from server i.e. client communicates alongside
the server without the help of another server or server
process.

SERVER AND CLIENT TECHNOLOGIES

17 | P a g e
This client program is straight forward and simple because
the server implements a simple protocol. The client sends
text and file to the server, and the server echoes it back. The
basics are much the same as they are in this program:

1. Open a socket.
2. Open an input stream and output stream to the socket.
3. Read from and write to the stream according to the
server's protocol.4
4. Close the streams.
5. Close the socket.

The server in the client/server pair serves up Knock Knock


jokes. Knock Knock jokes are favored by children and are
usually vehicles for bad puns. They go like this:

Server: "Knock knock!"


Client: "Who's there?"
Server: "Dexter."
Client: "Dexter who?"
Server: "Dexter halls with boughs of holly."
Client: "Groan."

Running the Programs

We must start the server program first. To do this, run the server
program using the Java interpreter, just as any other Java
application. Specify as a command-line argument the port number
on which the server program listens.

Next, running the client program. Note that we can run the client
on any computer on your network; it does not have to run on the
same computer as the server. Specify as command-line
arguments the host name and the port number of the computer
running the KnockKnockServer program.

We might start the client before the server has a chance to


initialize itself and begin listening on the port. If this happens, we
get a stack trace from the client. If this happens, just restart the
client.

18 | P a g e
If we start a second client while the first client is connected to the
server, the second client does not hangs. Future support Assistant
supports multiple clients, talks about supporting multiple clients.

Supporting Multiple Clients

Future support Assistant is designed to listen for and handle


multiple connection requests. Therefore multiple client requests
can come into the same port and, consequently, into the
same ServerSocket. Client connection requests are queued at the
port, so the server must accept the connections sequentially.
However, the server can service them simultaneously through the
use of threadsone thread per each client connection.

The basic flow of logic in such a server is this:

while (true){
accept a connection;
create a thread to deal with the client;
}

The thread reads from and writes to the client connection as


necessary.

CLASS HIERARCHY OF CLIENT


AND SERVER
19 | P a g e
Client program is developed in java, class hierarchy of client
program is shown below:

Class Hierarchy

o java.lang.Object

o java.awt.Component (implements
java.awt.image.ImageObserver,
java.awt.MenuContainer, java.io.Serializable)

o java.awt.Container

o java.awt.Window (implements
javax.accessibility.Accessible)

o java.awt.Frame (implements
java.awt.MenuContainer)

o javax.swing.JFrame (implements
javax.accessibility.Accessible,
javax.swing.RootPaneContainer,
javax.swing.WindowConstants)

o com.ui.ChatFrame
o com.ui.HistoryFrame
o com.ui.MainFrame
o com.socket.Download (implements
java.lang.Runnable)
o com.socket.History
o com.socket.Message (implements java.io.Serializable)
o com.socket.SocketClient (implements
java.lang.Runnable)
o com.socket.Upload (implements java.lang.Runnable)

20 | P a g e
Hierarchy For All Packages
Package Hierarchies:
com.socket
com.ui

class hierarchy of Server Program Server_FutureSupportAssistant

Class Hierarchy

o java.lang.Object

o java.awt.Component (implements
java.awt.image.ImageObserver,
java.awt.MenuContainer, java.io.Serializable)

o java.awt.Container

o java.awt.Window (implements
javax.accessibility.Accessible)

o java.awt.Frame (implements
java.awt.MenuContainer)

o javax.swing.JFrame (implements
javax.accessibility.Accessible,
javax.swing.RootPaneContainer,
javax.swing.WindowConstants)

o com.socket.ServerFrame
o com.socket.Database
o com.socket.Message (implements java.io.Serializable)
o com.socket.SocketServer (implements
java.lang.Runnable)

Class Database

21 | P a g e
java.lang.Object
com.socket.Database

public class Database


extends java.lang.Object

Method inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll,


toString, wait, wait, wait

Class Message
java.lang.Object
com.socket.Message
All Implemented Interfaces:
java.io.Serializable

Class ServerFrame
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
com.socket.ServerFrame

22 | P a g e
DESIGN

23 | P a g e
Server client connection

24 | P a g e
Use-Case diagram of present work of
FutureSupportAssistant

25 | P a g e
Client-server functional
diagram

26 | P a g e
Testing Process

b. Design
System Test

a.Organize c.Design/ e.Design/Build f.Signof


Project Build Test Proc.

d.Organize
Project

The objective our test plan is to find and report as many bugs as
possible to improve the integrity of our program. Although
exhaustive testing is not possible, we will exercise a broad range
of tests to achieve our goal.

Test case is shown is next page

27 | P a g e
TEST CASE-1

Tested By:

Test Type

Test Case Number

Test Case Name

Test Case
Description
.

Item(s) to be tested

Specifications

28 | P a g e
PROJECT SCREENSHOTS

MainFrame.java (SourcePackage-> com.ui)

29 | P a g e
ChatFrame.java ( Source Package -> com.ui )

30 | P a g e
History Frame.java (Source Package-> com.ui)

31 | P a g e
ServerFrame.java ( Source Package-> com.socket)

32 | P a g e
Server upload History in HistoryFrame

33 | P a g e
Chat support ( After Login successful)

34 | P a g e
Messanging through Future Chat support

35 | P a g e
Server Thread running waiting for the client to connect with host id and port number

36 | P a g e
BENEFITS, POTENTIAL &
ADVANTAGES

The objective of Future support Assistant is to develop


a common platform for connected and contextual support
of PCs with messenger and remote desktop in single
application. This feature enables the new functionality to
user for support assistant within the same or diferent
networks and the computer with the global IP address or
PCs connected with the Local area networks (LAN) or
Digital subscriber line (DSL) at home or at offices. This
application includes the following features:

i. Handles multiple users at the same time


ii. Support for both public and private
messages
iii. User signup and login available
iv. Support for file transfer
v. View remote desktop on client and server
side
vi. Mouse movement control on client and
server side
vii. Mouse buttons control on client and server
side
viii. Keyboard control on client and server side

37 | P a g e
PROGRESS TILL DATE

Designed use-case diagram, Project planning,


methodology, data flow diagram and time-line of
the project.

Designed front end, ChatFrame, HistoryFrame,


MainFrame, for client ServerFrame for server, for
chat support of Future Support Assistant.

SocketClient and SocketServer is implemented in


com.ui and com.socket package for client and
server respectively.

Package Javax.xml.parsers is implemented in


database.java (com.socket package)

Full documentation, presentation and progress


report is verified by mentor.

38 | P a g e
FACILITIES REQUIRED FOR FUTURE
PROJECT

Two sockets are created at the client side and the server side. The
client connects to the server through its IP address and port
number. They must share the same port number for them to
communicate. The client and the server both communicate
through a stream of bytes written to the socket. The client and
the server must agree on a protocol (TCP, UDP or RAW) and agree
on the language of the information transferred back and forth
through the socket.

This study used socket concept to collect message. Basically, the


message sent by one staf into a socket and passes it to another
staf on the receiving side. If it is group chatting, a central socket
will be used to collect the message and then it will be broadcast
to all staf that are active.

SERVER
Request for desktop status

Transfer Remote
detail
REMOTE DESKTOP
REMOTECONNECTIONS
DESKTOP CONTROLLER
Request for

desktop detail

Sends
desktop CLIENT
details

39 | P a g e
Figure: DFD (Level 0) for Remote desktop
connections

[NB: Remote Desktop Administration is prior work ]

Use case diagram of Remote desktop


administration

Remote desktop Administration

Remote desktop scenario is broken up into two distinct use cases:

a) Remote Administration

Browse the network and machine to connect to.


40 | P a g e
Browse the specific user and connect to that specific
user.
Open a connection to user desktop, asking the user
permission before actual connection.
View and interact desktop remotely.

b) Terminal Services
Shut down Remote desktop.
Log of Remote desktop.

CONCLUSION
Java chat messenger and remote desktop module within the
single application is potentially huge growth area and several
companies are currently developing software that enables users
to chat as well as to access remote systems from the office or
other remote locations by using even embedded system. By using
platform independent language like java, for development, gives
freedom to use some application in heterogeneous systems.

REFERENCES

https://docs.oracle.com/javase/tutori
al/networking/sockets/

http://netbeans.org/kb/

http://www.tutorialspoint.com/swing/

41 | P a g e
https://www.tutorialspoint.com/data_
communication_computer_network/

42 | P a g e

Das könnte Ihnen auch gefallen