+ All Categories
Home > Documents > Jxta Chat Application Program

Jxta Chat Application Program

Date post: 06-Apr-2018
Category:
Upload: jeevan-eranti
View: 245 times
Download: 0 times
Share this document with a friend

of 5

Transcript
  • 8/3/2019 Jxta Chat Application Program

    1/5

    Joum al of Appl ied Sk:;]ences 9 ' (2'~; 39 ' 12 -39 ' 16 ,~2009I S S :N : [, 8: [, 2- 5 65 4 2 .0 09 ' A s ia n N e tw o rk :for Sc ien ti fl e I n fo rma t io n

    A - S - - ) C ' ; - - - h tA ' - - I ' " t - '~ - B ' d rx T A - "1< . , . [ ' . . ' , ' . . ( ' ' ." ' , " ( , , : ., -am ,'p ,e '_ 18 .' ,pp . l c a _ m O l 1 r u n ~ . - on":,,, ".R 'M "-l~,l. .....: d R ' 'F - " ' .. , _ e l' i . J J : l l la n . . : , . , e z zi . ' ) ,D e pa nm e nt o :fComputer Sc ience USTO '~ ,81'., 1505 Bl-Mnaouer Oran , Algeria

    A ] i) st:ra ,e t. : m n thi s s t J l ,m d y . . the appl kal]o]1 aims use Peer-to-Peer t e c h n o l o g y to perform bidirectionalcommuni cation" As the 'web continues to . grow in both content and the number of . connected devicest Peer-to-Peer computing is becoming increasingly prevalent, JX T A is ,a t set of' open, generalized Pees-to-Peer ( lP2P)protocols that allow , a n , y networked device (sensors, cell phones, PD',As,~laptops, workstations ~servers andsupercomputers) to communicate and collaborate mutually as peers, 'fb~ IXI' A protocols are programming]a[l ' IJ,guag e i nd ep enden t an d m ld '~] :p", I ,emp lemen ta tions, also know n a's bindings, exist fo r d i ffe rent e nvironmentsTheir com mon use o,f the lX l',A protocols m. . an s that they ar e all fully interoperable. Therefore, in . this. studywe, infroduce th e P ee r- to-Peer a rc hite cnm e th at dlistribllrte the resources respon sibility am ong all the connectingpee.rs~ the ~X'J,Aconcepts, protocols ~ l J [ l j J mstructure, so : f i n a U y 'we can. be ahle to implement a chat with , ' s J n , ~ u i n g :files applicatio n in j 1 T X ' f A ,. U nlike other pro jects that ex ist in th e literature , w e use bidirectional 'pipe ttl,a t offer( I) , re l iable and bidirectional com mon ication b etw een peersK,ey words: Peer to Peer, network, ~'X'fA,;protoco:t, ~nessaging~ sharing files

    P e er -t o- P ee r ( Amor et fi e t a l. , 2 (08 ) has, com e to solvesome of the client/server architecture problems,

    It already exist in the market so many Peer-to-Peertechnologies 'like J ~NT that promi se '~Ointerconnect ~ililytype of d ev ic e O 'V 'e 11 'ny typ e o f n etwo rk bl[] tif's l imited 011ihe Java language; Gnutelle t ha t p rov id e a communieationbetween peers, but ]:~capable o .f traversing only a singleba rr ie r f ir ewa l l,

    Obvious]y ~we needed ,~tmore powerful technology ~JXT A bas brought the solution. JX'J.A ]'S an open nesworkcomputing p'letform des]g~ lled for Peer-to-Peer (P2P)OQ:[iLlp' l IJuti ,ng by w,ay of p'HJvimi:og the basic building blocksand services, required to' enable aooything 8J[llYW hereappl ]cal]o~llcon uectivity.

    The JXT,A, is short hand for juxtapose, It i s, ,arecognition '~hat ,P2P i s j ux ta po se d, to client-server orWeb-baJsed computing, 'which, is today! ' s traditionaldistrtbutcd computing model,

    The JXTA provides a common se t Q ' F ' o pe n p ro to co lsbacked, wi th . open source reference implementations ford ev elo ping P eer- to -Peer appllcations. '[b~e JX'j[ 'Aprotocols standardize the : m a J i L l j J lI lJ e ~ -n w hich pe-ers:.' D iscover each othert i l , S eDf- crg an iz e in to p ee r ,groups' A dvertise and discover netw ork r,eSOUl'Cesi ! ! I ' Communicate ' \ ~ v i ' U ] _ each otherr i l l , Monitor each other

    l'he JX'JA protocols ar e designed to 'bei~ lld le pe nd en t o f p ro grammin g 'Ia ~lg lll, ag ,e $ a ~ld tra ns po rtprotocols alike, TIle protocols can be hnplemented in theJava programming language, CIC++., , , ,N~lE t' !,Ru by andnumerous other languages, :Purr~he:rm,on~,!, fuey can. 'b eimp lenilented On top of 'JCP/IP ~HTTP, B ]' lLuetootn, ando th er n etw o rk tra ns po rts a n the while m aim ain i u g ,g '~ ba lin te ro pe re bility .

    Many proji~cts,were created 'b y the JXl' A community(.Mlcrosystem~\~2001}. l l l .t M : l P a management framework,for the JXT A , platform, built over the manager/agentmodel, JX$e-n1Ll]~ provides th e standard familiar RMWirrr~ erfa ,'e on top of JX T A j ' u ' ~ m akes use, of JXTA pipes toallow r u v n connections between authenticated peers,Jxtaeast, broadcast files through propagation pipes,Jxse-cms, a single content management system for lXS'E( N s r u a : i , ] et ol., 2(08). Myjxta, P ee r- tn -P ee s :i:i]StC 1JiL l'I Jtmessenger through unidirectional pipes, it also use thejiXSe,..Cl1iJS to ' allow file sharing, etc,

    In this, 'sm ~d y~ 'we created a chat and a sharing filesapplication too, bur unlike M yj xta we used bidirectlonalpipe that offer a reliable and bidirectional COn:'1IllL']1"I!ll~l'Dc'~t]onbetween peers,T-he Peer-te-Peer: I U is all] architecture that enables ~ I D J yIiII ~t~H" i; rk 0!I".~:~.::i;:if de..r " . . , , 1 l ' i " ' i ; p r o ' "r 'd ' flI, ;:o,iT'~:r' .... ,0;;:0 i'.... o Q , r r n . . . . .rherU...:;;l ;;" :;,],", ,=,il'I.'rtltU!I! ~ I U L . y ]!(.~ . ...:.., '. . .. 'If R ',~ i3~] ",~";"6i3 l,V' 1t~.~,!Lu l t " : : - J l .network-aware device (Wi~,so:n,2(02). .

    The Peer- to-Peer it 'i S ( l ) g 1 l , over ' I~ .y network, 'u n theP ee r- to . .P ee r n etw or k:

    C . '. , ..... d' ,.6, I , 1 -1 1 .. . . . , . '. ' R ' ~ " " ; 1 1 M ' I~'nj'"'" 'n -, ~--I~ .. if C C . . - - . "~..:>. C'., ,," . . 11 ' '1'C'm" . 'QP ' 1 5 '.no,;' ' ~ ' I '1\ . iI I ' . 'l', ' 0 ' . . . I A ' '] . _ . ._o.ll"~,piirUt UlI,g,,nililllJJllUIl",. ,:a.C1!Llua, .e...Ifi;..I,~!ILI'ep~r.[me'~,l 0:, .' o.mpulL'E'~, 4 iCJenoe IU'.:;JI". ~,ll!'" ,,- .UJ ,I::" :-,~,"":JL[ljaOl])e,[' _',mll~, t g e ~ . ' 1 1 : m39'12

  • 8/3/2019 Jxta Chat Application Program

    2/5

    J')j, l- d e ., Ii 'J '2 " 1) 3 9 : ~ "l I jtli 1 6 " lI E ii " '9- ~PP. .t l; f . . Jc.~-; ::i l .i.~!"J..-._."? "; L(lV.' A peer i s . a processor, an application; 'it ' C W J l 'b e W J 1 Y

    connected devicet i l , A peer has a sensitizadon for the other peen The comm an icatiou between the peers 'is by the yep

    and. th e .H'r-Tf protocols1'1lle.most popular Peer-to-Peer appljcarions are:

    collaboration, g a m e s , file s h 8 J \ I i ' i L 1 , g ~ .o n t e n t distribntion,.grid computing and chat applications in which the peersdirecfly interact with. each other we , widl talk about i morelately,IXT A - ~ m ' l . .. .. '-1-; .- .. - -, -. I-~" . '~" .-. 1." . . ~-. ' .; . - I - I t ,c . . , '1" .. t 'l ! .. ". . . . ~ . 1 I i i s , .: ][ [1 1 p en . net W(}~.. ' i . . . G ( j n l i P . r u ~ d . [ [ 1 1 g p . .a [0.[11]1],Wl.~.I.as e t of ; '5 ieXrotocols tb~Jtsupport Peer-to-Peer,

    It i s made of three layers, the first one is the core~ " " I Y ; , : , ' r I~' p r o v i d .::i.e; e s s e n t i a l elements '11,;:;.;... ';1 by "'1..;,:" servi ",..,,:;;,;:;L!t~~:~ "ll . '.". - 'if.IJ. ,~;:) ~ ~~ . ,1-1.!i.IJO", ~"vLl,,~,I~,~,11L3 ~uaCU, ~: ILl~,1~~~" ' It,LI,' i.;.II..::;_.alt he $ .e co~ ld l]a.yer'~'h~t]?roivi I;;iO""~".B~D

    . ' I R . , c n ' , e Z V O i l[ l S r P n )i ~ o c o :1 {RV ' " P } : Used by peers t o 'propagate me.ssages wir !h&n.a . peeD'groupl'he JXT.A peers do not have '~oimplement all these

    protocols: H " ' ; ! C ! ! ' \ j ' onlv 1 1 . - . . . - . . . . : 1to .~ pl " " ' l U " " " I 1 ' ! f the 0 , 1 1 " " ' 0 fh o:I;li '(hev~" ", I L- IU ~, a~, t-.Ulw J V~.IJ ' ~J ' , , ~, --V.JJ. I :. l L~ . ,~ , , l~ Ib . , .\r . "~. :) -t~ J !pgI J

    T -h e JX.T .A e oa ee pts .Peer: Any d e v i c e in the network that implement o n e 0]'more JX'f.A protocol, itcould be a P[)A.! Laptop, PC~.cellphone, etc..

    A . pee,], is uniquel .. identify b y a Peer' ..D, itpublishone or more network interface peer emc]po ]mt to ~n~lblemulti protocol use, it exist three t y p e s of peer;(TO'!J.v,e~~,a~t al.~2003};.t i l , The s. imp:~epeer: Usually exist Inside ~n ]:rinern~l

    ne tw ork, k~has the l e as t ~m.OU:iil~.f respons l b i U . '[ y in .the i1 Dp'el" to Peer network i i ' l t oro...~de servi ces .......j-b.,p.~llL... ll~ = ! t: _ ,= , ' ,~ . ,l au.. ! L ' _ . _ v ~i ~~ .~ .:_~,l.. _.:. i l l .: w . . . . ~ . iJI t,U ILJ.I,~n e t w o r k and consume services providing by otherpeers

    i ! ! I ' T.he Rende.z\ ' - 'Ouspeer: Usua l l y ex i s t outside a pl i . vH. ' [einternal network's : fb , e :w 3 j U ~ h help peers to discoverother resources of the network ( p ee rs ) ,~ H 'h ,e il :"bycachi ID g peer adverti S ; e H 1 L 1 e ~ l tOr by forwardingdi s c o v e ry '~ 'e q ~ e st

    ;ii , Reuter (G,ebiY) peer: Provides a mechanism L 'Ocornmunicare w it h p e e r s separated . ~ r o :m . the networkt..v barriers ~Iewa' l ' ] - ' I ' - J T A 'I neers tha . .. are ~'1 ot ' II " O ' M ' I '~ e ~ ' 1 : 'l J I 1 . I !Jj1~JJ, tIJ _.lLlll . l1 .. ~ _ , '_ "_ ._ ' ; J J ." !" _ , jl ,[ J~ .. 1 I J ' - " ~ lL ~ 1 " "' - . . lU .LU J . , : _,y. !L jl.!IJmust determine a router peer to use to route theirmessages

    Peer , g f lO 'W.)): . 1 1 . . set of peeD's formed to serve a commoninrerest or goal dictated by the pee r s involved, Itprovidesservices t:ba'~can be accessible to it members only, :it is,uniquely identify by the group Id, it's created for reasonsof security -;seeping or monitorieg ..J l 1 . d , i l l J , b d : It'5 the 'p e er n e two rk i nt er fa ce ( T c p p o r t 4 ! - ' W

    address) used to send and receive data,AdverUse:men'h: Itd es crib es d ue n etw o rk resou rces sucha s 'P ee r s , ! p ee r g ro ru p g ~ 'P i p es .~ e t:c . A n i l i d v e r ~ i s e . i 1 I : W e n ris ,represented flJSan XML dOCUll1jjent; . . i t . is U s . e d . 'by peers todisco-vel the I t : ! L e t w o : t k resoureeS ..' !P~pe : 'Pfiovidle ~~1 ~sy]lchro,"O'ms.~ unidirect.]O'n.~d~ v]rtu(!)]'oomnJljun]c~tkm ch.annels b e t we e ~ tw o o~ 'mOI'fe e ~ ' [ d . p o i ~ l t S . ,. J:xtaSocket .and. JxlaBiiIDtp,jjpe! :Bu]:it on ~(lip of 'Pipes!... . ~! e n d ] ] o b 1 t t [lle5cSiengefs and. t l [ ! e r el ia lbUhy l ib ra ry .; ] )I Eov id e , ab . i d ] Ie c ti o [l l~ ] a n . d . re:Hahle COmIUlII.llicat]on c h a n n e l s . , .

    39'13

  • 8/3/2019 Jxta Chat Application Program

    3/5

    J')j, l- d e ., Ii'J '2 " 1) 3 9 : ~ "l I jtli 1 6 " lI t 'k .n .9. ~PP..tl;f. .Jc.~.;::i l .i.~~'..'_'_."? "; LV(!M,es.~ag:es.:A n obJect thL~ . tis sent j f ] :1O:~U1O~'~J:~endpoin t toanother over. pipe. The peer. package th e data totransmlned into :m .e ss ~g e8 u sin g th e OUl.p1J.]'[ pipe! the pee~dud receive du e rrtessages from an ]nput pipe extract thet re ns rn itt ed d ata , A m essage can be au XML fo rm at 'O rH ] n ~ r n y . "Security::: The use of XML messages :Uve usthe ability toa ss s up pl em e nt m e ta da ta s uc h. a s c re de nti als , c er rl f ie a r es ,",~.. -""i!, . . - .. ( I . - blic 1_- .. t , . ' 1 1 r ' X ' : ' 'J A . -- - - , " - .. - th..~ ~. ideu~.geS! l3 i t I I i l J ' l ! l l l i pl,. l l . ' .!I..I.e .Key s ..0 a . ! I I .' ' . . .. r .m,e3saJge IL.at p~. (J 'V .~, .it security (Daniel e l' a l ., 2 , 0( 2 ).:trnp 1lem,otiliti0n. Q lf a. :LAN ehat Ip,UcaitiQn::: A.t this point,'w e should be fam iliar w ith dle 'basics of JXTA j now " v i l e'will use some of itp ro to co ls . a nd . concepts to implement a

    " ' 1 ' 1 1 J i c e t i o n . I t is s i " . ~ h e o r h e r i] mp' .e c ..at ap p i:Ci'IJ~.10ii1~ is smu ta r '[0 t .e otner H1SUl!nt~rn es s ag ] u g a J.]J!p liarious b'U.'~ it i ~ lco rpor il il te l [1J~~ lyof theJx.'f A. pro toco l s ,Th i s app li c at ion is designed in a LAN~]'[gives us thecapability to register, sign in , " '5 !e~~"Chor due connect ingpeers, exchange messages and to sign outThe ]mp lemen t at ion requires '~Q imsulJ]ltb e Java, JD K IL . d ",D 'II .0..-'1 liTV"T'A"" 'IIb . 'I:[[I! yOlljU~'macnme an to ,ijJ.OiWll]]OiiU. ,!!I.A .l.. :'JXSe-]1 '!. tutona ...d oc um en ts , s rc (M i cro s. y ste ms, 2 .0 07 )..

    The nex t step is W create th e fiame using the swingclasses for the GUI(Gf~~phics~~eJnterfaces) in which wew iU in vo ke th e cla sses th at w e are g oin g to crea te.W 'e c r ea t e a ,d3JSS Sta;rtlV.~IeO it jo b is, to create the peerthat will he C J J . Rendezvous peer if iCs the first one in theN e '~ P ee rG rDm p o r a simple peer ]f 'w e a]] '1e~d.:y have aRendezvous peer for the g roup, then w e are going tocheck the existence of , a n . y : ne '~wo~ " :k .o n fi gu ra ti on . ~ ()setthe peer name, the peer [D l j~ l1dthe protocol Tcp ..

    Once tills step has succeeded 'W~ invoke thes la . f [N e ' ITworkOm.erh od to launch. the JXT.A ne tw ork , A sshown in Fig, '1 .!I C:reaJhon (I f m e network :m ~ l J 1 t l g r , ; : r:Ne~.wo.~kMi1 I i 1 Iage.~My:Net ' !NG~:~Ma na; . .e~~ .Nfl l iU,;M y N ~ . . .'WQ' rkM~Ji~~g~. [~ ne w N e t . W ' U ( [ l M : l : l n ! i l g e : r{

    Ne two rkM I1 nage r, .C o l 1 fi gMod .' e a,R.EN n.Ez V 0 IlJS ~ N asne,~iliifigu~tio~l'lFile_~ll)l]jiR'~())~!l Checking for { :ol il f igLU:a~fi ,al . l! iB: \ i s~e:mi !Xi:Net ' !NG~] !cConf i g l jJJ~~to. rM:yNe.~ .wo"~~C(mf~~. i Lu:atOi " ; : : : : :1 I u H ;: M y N e . . 1 ' 1 , w i k C o : r u f i g u r n : 1 ' o : r = MyNetwoikMana.ge: r , g e ~ C ( l [ ] f i , g ! J l ~ . I . ! I I: Q ' J : O ;If 8 B u ln g m o re oOi1 l f~g iL l : I :a t~o:nM y N ' e t' W Q ! k C O ! .r u fi gu m l b O : ll ', !: i . .t . ' [ ' ! l . 1 . PBnttbkd( tl i~J 'e) ; .II S e . u : h l l g t he P e er N Il! I.l 1e " ~ 1 ' ' i J N e J [ . . . . . . .'I'''f'''I.-cifur.;J1I\!lruL'''f_""tN'i l ir~le("'.fi ifl~e)',y.,,~ __ " ",j Ji !: ;, '! .,. JI JI ~ ~ _ . _v . y .~ _ ~J.. _,I! Sett i l l lg. the ~~'6er.ID. , , ~ 1 ' ' ! J N i t ! f W . o : " " ' k C onfi u i L i lt i l . .- . .i ! ' _" e t l P e e r ; ! [ ! i l i P I D ) ' ",y. " _ _ .!\1 .... u : ! l e o . _)W ~.. _~ __~ ...~ ,1 1 SI:ar!illg t~e: ]X T A networkNe t! P. ee rG ir oo p . .. .MyNe l "l ,VO l] {Ma il mg e r_ s ~ ! li 1 1Ne~ . wQ rk~);.

    The class Rd is . .ov ery O ]:~re sp on sib ility is to generatethe di s e Q -v e ry q m eri,e $ ood tn r e c e i ve the di 5 1 c O 'vleryr e s pons es ,

    a r S b M f u t , . : - . : : r l - . ------------~!!IJIIIIIIIII~

    --~ -n~ ~ ~~~ ~ ~ j ~1~i s~~~~Q ~~~C~:ir:I ' ::III~IJ. .1~' I[j~ I I JI ! ;l t ~ a- [ '1 I I i: ' "!!oil.!.!! J! ..J l !:~i !.!!!I U ;n.;I"'-~ - -_ , - _ A~U;:;LrIO I:biI IlMlilr J i l l i;;Qtl!!!!. ~: J I[~a 1U~'.n.d-~ ~~::J!:i l@H;'!IJJ;U;:!tH!!!li1l ,!;T2D.!OJ~I'-'l :n~.~"

    BJii:;,:~i'----------------~~ -.&t .I....

    ~-I i! '! l _ "fJ! lj~I. . 1 : 1 .~r J .'1':-I~;' 1'iI~. !: 1_ ~ UII J~

    - = = I'.~.IIr oI" t . I ! T .il~':~-~. ~~:P ! ! r " tIi jJ JJ! rill..... ~ il'1~,

    'i)g." 'I.l' ,: . C : . . . . . '(J'"' (f ."..t. ,-..".' ....1 ["1 ;:::." _ . '.' lILa J L J t r n .; 5 . lI D J I L : e :r lHce1 I g.ej[rernt'~llg ( l h e d ~ 8 ' C o , v e z y qneriesT I ~ e ' D J r f ( ; ; N " I J e r :' if . l; " e t v i< i '; e ~ NBtP f "" " It ( "' ~ .p . ' r. " "' i '. D~. .. .. . .,....'i;'i"ftj'l;"eF'if"oe;()~_ ~D _,_,. .. .,- ,]1_ ~ _ _ _ ......... r v.' ~ J1 ,J . .e!.....~~ ._v .""""..;,to _ ~ ~ . . _ ~ IThe. D .i soo' i / !e; . r , ' !fSe~-:v: ice_g,eH ~: .e. ,( i i'~eA.dIvel~t~s em.e. i1Irts (Ml I! . I~:~,ID00'lp'e~ Serviee.P:E!ER.;Nfll i l~.;rmI~.;5)th~.s);11 Wf j. re ce iv ed a n adve r t L~eme .u t evenr: p u b 'l ie vo i d d i s cQ I I ; !! 3 Jl "Evem (D io oo ' i /!e~)'E\re.l l1ftTI : t e :D i~oove. r yE \ I !3 i ' L tHnLSOO'' i f e ry~f i ,es .pm1t~eMsg.'he lD .u~ ' i f e ry~fi ,es .pow~eMs g ; ; ; ; ;1 .1JeD5800ve:~ 'YEe l l l. : ,ge tR.es ; ' [ }m1t~e( ) ;

    The last class mtcha .'~ lmgO is, going 10 se t up ,3 .'b " . . : I ." ( . : : .. I ' . . . . . . .n a l " l I '1 i 'J I ~ rel ia l ! .. l .: : ." " mmrir!.! r o l I I ' ~ ' . . . . .m between the]ut .'0 lul.u,i:!I. .i:!I.u.' IJI, .' . ]a.lli!I"", . ,, ;. 'W " I . 1 L. II .~ .l L] !b U! l. ]' W" .~ .1 . ""'1. ,0 1.~. U.['pe:e.rs using the JxtaServlerPipe that expose a input 'Pipe toprocess, connection requests, whe reby the JXla:~n:[)iP].pebind ' I T O respectively to establish private d ed ic ate d p ip esindependent of the connection of the n ~q u es t p ip e (Fig. 2}.The Jj { 'r r~B: i .D . iP. ipese a messenger instead of an outpu~pipe."

    39'14

  • 8/3/2019 Jxta Chat Application Program

    4/5

    J')j, l- d e ., Ii 'J '2 " 1) 39 :~ "l I jtli 1 6 " lI Eii" '9- ~PP. .t l; f . . Jc.~-; ::i l .i.~!"J..-._."? "; L(lV1 1 CI:e:2It~ng '~I~leidi:I:ecIi 'ml!2I~ l~LPe.erverM:yBiDipijpeSm:'lfeI!' = n ~w ]x ta S~ rv e[ :fflij~ (N e~ !8 ~m :G ID 1.iI p.,G ~ t i P u p ' e A d . ' i ; ' e r t u s e l f l ' i e ~ I M ) ) ~:M:y:IE t:lDi:Pi.:(M:~ M : : Y - :B i i D ! f i. ~ p e a B r V e r . .2 I .c r e p i o . ;. if ~MyB ;iDif1.ifJe~=n r l ~ n I ). MyB.:iD.iP.ip~, s0tM~ss[;lgiLis~~I. le~("~Iii~;s)~.II I C . r ' e ' ( I t i 11g a P i ! f i ; Adv~j1 ' i , ferJ 'J 'er ,J :~'p u h l l c static 1 P i p e A d . V e :H i s 8 e ll 'L ' em : G e t l J! . u p e. A d ' l, .l e rt i re m . e : l. l. tO (: P_i peA.d .v e rt is~ l iI l ~m: M ' f lP i peAd .y e -I ti :9 l:m~ .l iI it . _ . (A]~ .Ad~[ t is~ I iI . :).Ad ' i / ! e4 : ' i l : i : ! l eme~~:Faet ( l i ~1 '.~ jew A .d I ' I ; Ie l ! l: i sem.e~t .~ iP .~peA d. ' I ; Ie l !l : isem.e n~~g etAdve .~~ l : ! le'm 6 n ( J ) p e ( ) ) ;Pl:p.r;ID M _ y f ' . u p t : ] D _ . IDF!'I(,:t(!(['y,J1ew:ra]~ID(P,ee.rGrul!p;D. d t e fM l : i: t N e t P e e : F G w u p I D , Name. . .~etBy~e~H . ;rennn MylP.ifJeA(hli

  • 8/3/2019 Jxta Chat Application Program

    5/5

    J')j, l- d e ., Ii 'J '2 " 1) 3 9 ' :~ "lI jtli 16 " l I t ' k . n . 9_~PP..tl;f. .Jc.~_; ::i l .i.~~.'_'_."? "; LV(!-D-'-~'-I~-;'-~-'I-~-~-~.-I_-I---------------------------------------------------~---"

    .. ~

    Fig, : 3 ; ' Sharing interfaceclass th at p ro ce ss . the i ucom i ~ ' [g list and handle th eprocess of reconstituting a document from another peer jihe method Getkemotef-iler) will download the des i re filea nd s how us the download progress.I f1 li b. e la ss w il l do,w,m; loud t'nl;' selected f " H 1 ; ' u nr l s how t h . ' f : clo,wnlmJ.d :prr{l!glles~,, I i i !the l/p:r,ogFess b arp u bli c cl as s .~dbwll l~oading e x te n d s , [, hw ea d iIJ ! ! l ~ l d i . c iRd.ownl !L l' tJi l lung( f :'ome:l i ll tAd iven iscmi ; :mt cun ' tt :: Ii I .Ac l :v . F i le destinationJ'Jabl'lI! table. JPt rogr :essB:ar 'progress)'Ithi.s_NetPee.~Gt'(lilll(ll 0 : : : : , S ta J ltMe2 . .getNBlre~"fifl'oUp~);iff~yDOril'i,!iIO~ !!! ' new GeUil:.e1lr'loiefile{N'e;tlPeerG[(!fup, oo ri t ent Ad'i! ,dBsti:l.l.miO:IiII.this.table, progress);l'c l a s s 'Ge~:~ .erno~:e :E"HeJ : i t e i 1 l ! : H S . Q e ~ . c o i 1 l . : e N i t l R , e q l l . . ! l. e ! l t'IpL'lb~ic ~~Rsl1l1otsf,~~(Pe0IGroup' gro~p . , Coot~Ii!.Ad\le::r:tiS0l1J]lfIft OO:I.n~nJtA.dv"F i l e d~st~]J;a~fiO:I1J T il b .l e r t: a 'b ~ e ~J I ' I o o ' g ; r : e S ; 1 l B ; ! I ! ~ ' p . ~DgC ' ;e s s ) (S ! i 1 l ~ J e : I l '( g . i I 'O l ! . l p , o n t e ! J H : A d . . , deS 1 t i ~ m t i o :n ) ~l'public 'VQ.icl,no~ifyUlPdt!i~t::(iI ill~ :p l ; rcem~w. : } 'I mlllh l 1 I1e~hmJ.w'1~~~lj,htl'W thedO'~J!J]]:~ad pe rc ent age: p f I ' o , g ~ e s B a i ' " s e ! 1 : V ' a ' l u e ( j j o f r c e . N i ~ i l g e ),j,l':~:mbiicvoid illtlt~fyDll.rur;O{ltthi:s l 1 I1e~hodwi~n return l 1 I1e~ t~e abou t dow .I iI I' lu udp:~ 'ocesstable.se rv allleAt~'Cmn.p le i :ed l " ;taJb]If:_gBtSele:cte;rl:~.ow~, 2 )~ ,l'public ' 'mil ~l~infyf,~ ih](rreO Ilitlhis method w~~ nreturn meS:iJJ@: if do,w,I i I I ' loudfailedt : ; : J h : I ; e _ S l e ~ : Vi i J u e A . t ( ; 'f.-\ailed"~ t a ! b l ~ _ g , e t S e' leetf.iUtGw(),2)~,l'

    1'~,-'.'. I I - i !-" E I - ~ ,- . ' 1 '' ' '' , ;ntroduced ~".r"" th e- n_ . , .: . :r - : _~ " . r . . .,_'IIJ").tiIj~[- 'W ' orldl]S i i : ' I ! l l : IjJIl,.,.e [1ii:1l.:!j',~.:~ ,1i .J!1JI. , I;.i !vl il l I L' V!L .. ,IIlIC'L" IL'V , I l l" " , ,, , , , , . . . ' 1 .) , ,, , -and WhJ!JJt ha s the ]OCTA plat form brought '~O it. as w'eshowed, an 'i mplementation of ,~I'[ 'i nstam-messagingapplication ' l A l i f ! j J t can . ' b e f u rt he r extended. A s long as you ,go deep in this platform you will find how rich it is.

    'REFERENCESAmoretti, M "1 ,M . Bisi, ,M .. 'C. Laghi, ,F . Zanichelli an d

    G. , Conte, 200S. Reputatien management service fu]'peer-to-peer enterprise archi tectures. Proceedings ofthe E-.'B US] ness and Telecommnnicetion NetworksThird Intemational Conference, Aug, 7=:1.O J Spr i nge ,Berlin, pp: 52~63,

    , A F O ~ " ; E I . ! A , . , C . Haywood and. K,S _Pabla, .2002. JXT.A fUFJ2M:~-- :Ext .e .nding the Reach o f 'Wb e '[ ~ ss with 1X.1'Al'e cb no lo gy , S un M i c ro sy st em s , UK;,

    Contreras, P ,,~S. Johnstone, F, M : u r l a ,g and K .. Englmeier I'2003. Distributed multimedia content 'wi~l~r2.pJX'f,A technology, h:~tp: l lw'W'w.cs.rhul.ac.ukrhome/:pedEol 'p~p~l" 'SmCI-2003. pdf.

    Daniel, , B , . " O .. D a i lr r .e n ~ , K, . Navaueetb aa d J .C . Soto, 2.002.lX'f,A J'.ava :P.:tP Program ming. lst Edn . I' SarnaPublishing, 'UK.

    Ismai] , , A . ! M . Merabti, D_L . J ones an d S ,. Sudinnan, 1008.The 9th annual postgradaere symposium, LiverpoolJohn Moores U~l] 'ver'$]-~yJ1J I .~~e008 ,

    : M i i c r o s , y : s : ~ e n i l :S \ ~ s , " ' l < 2 0017_ JXT ,A java standard edition,v2.5: Programmers guide", September ,HJtfu.; 2007'.h Ups ~I j xta- gui de". dev.ja v a J " net/fi '[e s / , o ' O e m [11 e uts/7150/:[31364IJX.SE_ProgG'ui'~ _v2. j.pdf.Traversat, . B ., ; M ,. Abdelaziz, ,M., Dnigou, J..C. Hugly,E . Po u y o nla n d : ( 1 . " Yeager , z o o a Proiect JX T A VirtualNi~t.wO'dc. Sun Microsystems, UK.

    Wi' [s!on, 'B . ] f . ' i 2002 .. JXT A.. 1st Edn.~ N e'w nide~~ ,Publishine USA.nus l , . i ; ; . : j ,ft"


Recommended