From 1f0f35420c9aef42799e9cc1e968e4c06fa39014 Mon Sep 17 00:00:00 2001 From: Riccardo Presotto Date: Mon, 17 May 2021 11:04:19 +0200 Subject: [PATCH] aggiunto codice client --- .DS_Store | Bin 0 -> 6148 bytes .../6.7/executionHistory/executionHistory.bin | Bin 117584 -> 117584 bytes .../executionHistory/executionHistory.lock | Bin 17 -> 17 bytes .gradle/6.7/fileHashes/fileHashes.bin | Bin 23397 -> 23597 bytes .gradle/6.7/fileHashes/fileHashes.lock | Bin 17 -> 17 bytes .gradle/6.7/javaCompile/classAnalysis.bin | Bin 29778 -> 79713 bytes .gradle/6.7/javaCompile/javaCompile.lock | Bin 17 -> 17 bytes .gradle/6.7/javaCompile/taskHistory.bin | Bin 29868 -> 29868 bytes .../buildOutputCleanup.lock | Bin 17 -> 17 bytes build.gradle | 2 + build/classes/java/main/MQTT/PubExample.class | Bin 2897 -> 2897 bytes .../java/main/MQTT/PubSubExample$1.class | Bin 2409 -> 2466 bytes .../java/main/MQTT/PubSubExample.class | Bin 3789 -> 3789 bytes .../java/main/REST/Client/ClientExample.class | Bin 0 -> 3578 bytes .../classes/java/main/REST/beans/Users.class | Bin 2007 -> 2011 bytes .../main/REST/services/UsersService.class | Bin 1888 -> 1888 bytes .../compileJava/source-classes-mapping.txt | 20 +++--- src/.DS_Store | Bin 0 -> 6148 bytes src/main/.DS_Store | Bin 0 -> 6148 bytes src/main/java/.DS_Store | Bin 0 -> 6148 bytes src/main/java/MQTT/PubExample.java | 2 + src/main/java/REST/.DS_Store | Bin 6148 -> 6148 bytes src/main/java/REST/Client/ClientExample.java | 63 ++++++++++++++++++ src/main/java/REST/beans/Users.java | 7 +- src/main/java/REST/services/UsersService.java | 7 +- 25 files changed, 81 insertions(+), 20 deletions(-) create mode 100644 .DS_Store create mode 100644 build/classes/java/main/REST/Client/ClientExample.class create mode 100644 src/.DS_Store create mode 100644 src/main/.DS_Store create mode 100644 src/main/java/.DS_Store create mode 100644 src/main/java/REST/Client/ClientExample.java diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..c14cf8b3d1f4303c7a326ea373ab57e9efe7398d GIT binary patch literal 6148 zcmeHK%Wl&^6upzAsZBu5q7vO8dBZM>l9n#AKr$g+bb*90f(4+~uC3ORYge{|MMIGH zd;u)@1-^qX;9FS1y)!ppJEa>WgwWh*=8R{~na7Dd;{gCMo%>^eJ^&b)2s<}0yCSHa z(pt2*riUnGA30=)QF7u%iMPhq71{yqz`y1Iy}Mm-A;Vt)_4k)Hg$J01-(|?DZ-57L z2q6N$@}?8>bAx&F7ZZkX3Mr1_qb{iH#GQt&dkyz}gS%PfLec2?TZ7%JvvF1)&MB{} zTBi+_2~XeveVD-`#37uot(-jiRPktwz0A?47{|=6Tfg+Js%|4cg_HWMq)S(@ydt~c z-S&%j5rtVk8hsV5c4wozX&6S&xMjR@&XU5(-F%)+-Sh=LJ$CamkIPS!B>Gu)y=P%i z9QC&!CUNeDaga)J=m$u7`8f>KRiBvbGdlCeD?wE!Vq|5$k<|B!AC5x39p?rj*^)Ek`;T!()h;? zu%!m=0Xnn;+5zoA)dAWcEKGzpW2sPX9hk{00AdHLWnh^;21sKu+Ki<_Y{3vpim0T5 zuNXqfvEE{y%~&c_au9s^5InNr8;X#lWB-< Ohk&#}XWD_k>c9`GK*q`d literal 0 HcmV?d00001 diff --git a/.gradle/6.7/executionHistory/executionHistory.bin b/.gradle/6.7/executionHistory/executionHistory.bin index cf68230edc9d9ba5be3c1c19c012d35607759a02..ac2d3bc50b0dad75e647014873dc6fa0b674c4e2 100644 GIT binary patch delta 943 zcmcaGjs3zj_J%EtzNzXK_Op{pb27|Kvob2mQY(^DN(xdcO-hn0sxrz78Nh()GQ;M{ zfnK81C!{fQOuwGWsJ4B3D&u)(W})*;(;KHTN=$diWmHc|&(BZKN!3fvPf68FFV4@? z2NOnm=KAKQhH0iI7ReT-X^AG5X~xC|$*IXnNro2YrWTgQX_n@ONyf&>CaGW@x$+4FOw=0)1R&g^49G;%o#^^l#Q6uA80nLji?)}jHz5eT@k7usT z@aW$@zlo8RQDBc+Y}u0juLk+A=kkZIFA3bfrI}HgNhsnqv%=g19_opa7o@|2wLdUU zn|`2`QIzpK$V5+3=bX&cyb?yno*>uY5Pb;m5m?Fx!hwppRwU*Y0AnC4u`H2UVAHm3 zvn!vt8v16Nv78ptyTUjhNjnxD7eOWlZVzZ<hW zPGyvy-qy}|R^y2Hw-a-+)~r@My7^8;M)!T@sVS+&C7F4NC7JnoE}2EC$tC$kmBMGI zAM9lG-F~8jF^*BdAgOuAjE*f`zr-{fZ5bJarcdZ+44q!k&B!%fu8Wav`|K`8S0(|D z(A~|~jZ`XE>xv%JKIHpo`iCCI%R;=)OQj~qa3wsrnr5-tQs4~ZGmyz))6euUa&0&5 zV~k@FZ;w_rIv ztihO^lUQ8LEO5-gUQg~qUgw)DSJ&{I%Kpj-(Ibsp&ux&Q(c4oeGwxv&*lzVn|5xNI ziCr67CUU(EzP8NI(I%cQ?m1JdebZKs3bZKvHL}_wmV{~tFc@ejj{%oakpWbfON;>!x6+IOMFJ9=#_0Icj~Lo_7Q#qhV+CUY z=$Ao`0allPj{$oTPhH3M^h(Y&2sC|emGB$P0hf`F0cW>zkO5c(mnXvk5dq|vL6reh zmoJq85x3=*0T==jVHUHpouVdokEY+n>)=bE0q&PUl>t+i;Ftj$w|$ubEddaWqfGH{ iVVkN4%W>KXIM*t-x|#vj0s=H}v*6jh9k+6~0p1fur?4FW diff --git a/.gradle/6.7/executionHistory/executionHistory.lock b/.gradle/6.7/executionHistory/executionHistory.lock index 764860d31f678bd696584538cc55e5d9d0cc14bd..d387f07e90872a35034ceea4a994f7c79da9d03a 100644 GIT binary patch literal 17 VcmZSHUU)b*s&hv)0~jzC0suCr1hfDE literal 17 UcmZSHUU)b*s&hv)0|Xof05!|d%xkNmg1;y0 zO3x5@$koERcWRgyRPf~Hz0v|K0xsvj#V!)~83`3l-F#GjH6!D~jfy|SHyTv%ZFcnd z#m6Ei>%C*LeYli@=EW2De(3&Q|8>&GGgoGK^fNFpR?5jaUV!Lk|1r5TT#W~$8X~}~ zGkIdLDr+TJ|L$O^porJZ3Ud#5s3%5VkPZvh{s7XS<>r(CQO@!NNb4B`2~8kY1Yv>p z(_E6}s*iI*JwN-1nw&j_rbB+RV}u&Sec2IG5(Y`lGiG#b>G~z6*=WniAOu#eGr?i< z+z36EED+;7jKLTQ6glXD~0Ao{1n zw0Vb0No=?Jr2i}OmBg+MEfcxk2490|n_L?zHCZ&u4dSr#5mH`z)MCq)^nW$Te?6B! ze0@nENF^ei_;Y}^pn06vd8yRo7_Ni|SJNyuTMC?kd*yJHo*l?5AeRB%1_~-PtsJ4d zo39(GRIb()J*Iug_Yq7hSOWv+qRINvYV`;scy41Fv1!}3*_BUR4SloCSWXM+U4i%v z7EzpTm^#WCixcx@B($?QxLT#bjX`o;o? z0JF~IiNUI@l^~JHyMuLED}{^?C`^7EETv$3GE6aY#RdD=5RPvX&s*q%Op-V$*a6YV zvU;*(gc^&G<}!oH*%49__78XK>+JCrsmwlq@rUo-ez3j0Y(FN?jnD(S&NE^1c^HE+ zQjdkN#?D~!`cSFK@nOQeKs#?&K#XO-J~=m14I(`qs7}bJL}IdcsFXya*yc@h7pax? zFS~#A^#gC9^MU>XnO_SuL^R5cMZ{PNWQUYjz?Y}O`?_n^UNz$qJ^pc(BuJ(B|A#;w zAiysMB=n4dgeDLxg0O&p?D213yv~_$nAGM?{UCh??9&x~7bYK$(zBBQGJvXpfE}a* pP3!DqFMeF=m$+3fcE}?>nKc=v6|8}QGjp3^3}C>-3;;J)1Y`gJ literal 17 VcmZRMJbXs##J>3^3}C=$3II2T1eE{) diff --git a/.gradle/6.7/javaCompile/classAnalysis.bin b/.gradle/6.7/javaCompile/classAnalysis.bin index 171f0c01e68dccad4143e6a46836bd4862ac1fb1..93a33dfedace3a96436180822ec7eebcf00a1ff0 100644 GIT binary patch literal 79713 zcmeG_2YggT^Y5h?Kt8dc0)hqzDhdZFB2iF6h>%D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01Woz{OkX2Vknp^x-FnsK?vQ%da-Jh3OI7J!I6vd{`uRwR`C#(6wWD0K!%MDS$BqRY=b zYR9>rDOf-(0G#TTo)*#=kM@N(9G+Ilt3E&-gb7J;$sG)_=5+X70Yj3>W=}Hp&4E7- zufTsI@T~>_FyN6MnWTP;z8sfp%*-~!{&~kI3f_}z13ZA>`8_&kYs<+pWSFcrQ=Y+? zoo+~_qIEL$0O>3_)>KoN@>7N`Pr#9r@~&A>Ia?XC(#$3+KlnNqmw#Qqpehq8MQ3eX zQ&QICc&jG@s6jTwFjGEJUk{Tp%Vy|kGg+z1}Sk1$5WEOfPq`xz7vEtN$}hB1Gw*nofeacZJOqrErWq-4w-zlh diff --git a/.gradle/6.7/javaCompile/javaCompile.lock b/.gradle/6.7/javaCompile/javaCompile.lock index 0042925bd1410ce2bde3e31d8f2ae0a941cbd577..549dd2246fe6813a0f23935d9fd93d981b6cd73a 100644 GIT binary patch literal 17 VcmZRssg;yV;(Icm0Sp))001V=1PA~C literal 17 UcmZRssg;yV;(Icm0RmP704A3M(f|Me diff --git a/.gradle/6.7/javaCompile/taskHistory.bin b/.gradle/6.7/javaCompile/taskHistory.bin index 0986f1f244f0639fbe4473a070a336d8043bbafd..61a815658122a919a671427ba2e3ac51cd8a8c76 100644 GIT binary patch delta 150 zcmZ4Ul5x#T#tl9mOhQ7N{XBYEnS{uw&QD3zOE1pP(+3kq zdgl7(riN*zCKkySrfG>LmTAVu2Fa<(NlAtl=B5^w#%Y%3hDpZ8$tI~_9lAgrdRd7@ w0`e&uF*~?xQkeB_MEzXJ|7LPxnCoP@V7|@zev`PFgybjxi;~=28>KG=0In`EfdBvi delta 144 zcmZ4Ul5x#T#tl9mOoD}*{XBYECo_h-P2L~OxA}tKByJ|by2*c|q!LR~i%T-|(qjzu zj7;?mVvJHu42+B|Op`4vk}XZm4b4(5Qj$##Q;iLhQ_PJ`EetIalT(b$6Jyeg3X*l9 pnsp(X^|BI+1cE+FysY5Z?bR8{-goZ@!-f-+3#08f*GB0}0RS=&GKv5I diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock index 5bed8506330eb7a9ea3cd5707c9ce1e82bf489e5..dac388f67820b873c1d450aa9ccbdc863f371b2e 100644 GIT binary patch literal 17 UcmZS92~Bz((7uR^0Sp-90V(DKwEzGB literal 17 UcmZS92~Bz((7uR^0Rj#K04hiX7ytkO diff --git a/build.gradle b/build.gradle index d1ce39d..3bd8f5a 100644 --- a/build.gradle +++ b/build.gradle @@ -14,6 +14,8 @@ dependencies { testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0' testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine' + compile 'com.google.code.gson:gson:2.7' + // REST Dependencies // https://mvnrepository.com/artifact/org.codehaus.jackson/jackson-core-asl compile group: 'org.codehaus.jackson', name: 'jackson-core-asl', version: '1.9.2' diff --git a/build/classes/java/main/MQTT/PubExample.class b/build/classes/java/main/MQTT/PubExample.class index 096af4d968d638287e8d55194f6dea477fa9c366..88733c3960417d475fa4a5f77a4c092a838ee392 100644 GIT binary patch delta 105 zcmca8c2R7DHCL#-PLSgF%;3ltGWth(VvxpTU4Jhry7sjlqbqo55uA H46dC3<>eFw delta 105 zcmca8c2R7DHCHSjg9HOVgCc_fgF1sagA0)7#URO$%plEB$RNW|&mhmx#-PBk5~yM$ zgA&6j1{H>j45|!Q8Ppg)GZ->_W6)yw!Jy43%Amt&#GuRQ&!ESc!=TUD#$dqM&0sWn H2G>pi+*K3R diff --git a/build/classes/java/main/MQTT/PubSubExample$1.class b/build/classes/java/main/MQTT/PubSubExample$1.class index 4e867400b577c341026242f07ad2e876c516727a..cd083e996b3b4931ae491c9b661bb03e690e25a8 100644 GIT binary patch delta 810 zcmYL{X-^YT6o#MaRA#u0*i?gtbx;8#7#%-HBB@7d{xoa_EF=~-mdYkeMBpt>Wci2vyLp>>jU@|rn3umXs z!@Y@AJe!N9CN0tq6HMxkDTfSMgFvBeJeD2__vA8(w1DOurkT-A_Z()K^M=eybDsO& zg4rB+;P8+IhrEWFXVLp^wzfUuu}+>C7|P{ZAkrELrV)x?Zow$1T zf;u?rj3+O8_Mh;daQtm>@UXwO-}2jiyY_eS{LepMz5&g=j^c4dvynDMyQYJqnlQ&~ z=u~uRj&nkzI2o0@Q;O4?0@`di?G-O-sOVJMVCvK*=whlU9Q;Nsp;dY zOTQ*Qz@SU2fNNZL8Bz=@ZYV~U7So}DQNtMHhRtj-RB_Xxcsw1R=HnLHJ>|}Q>$@Pt^UXAQxx2QPmVXsva zOjgt_%dh)Pg~K8>@6lf==>3GL{fJ{dD#c@cpM6V_Y=!7YWy6H*^xwr_b@6FopQyJA bGK`auuwTj$2RJA>!XXY*CzTeECmGzo$ZBTM diff --git a/build/classes/java/main/MQTT/PubSubExample.class b/build/classes/java/main/MQTT/PubSubExample.class index 8658736e28e1f6ef4c6c3aaaff7b4894adc62222..ed877e0412025feb276a0b649845d90d8464571b 100644 GIT binary patch delta 96 zcmX>rdscSCYTi&QhV2a24Eq^u7#=X#GcqzbF!D1vF^VxbGg>mZFgh~0GA1*4FlIA& zGL|!VG1fBpFg7xTGqx}UFt#xSGA?EaVm!bQ%y^d}gz*rdscSCYTi%_hV2ZN4Eq_Z7#=X#GBPsQG4eAwFp4oaGFmb?F*-6hGbS^*F=jKk zGnO-WFxE17F*Y)UGPW@IF}5-IGcINbU_8JO$at3_i18OgFp~&F2$Lj3_$0ow00x~D A>i_@% diff --git a/build/classes/java/main/REST/Client/ClientExample.class b/build/classes/java/main/REST/Client/ClientExample.class new file mode 100644 index 0000000000000000000000000000000000000000..63d0e0cb78d2a0765cb6305d9f93f0e4b04bb34a GIT binary patch literal 3578 zcmbVPS##TD6g^*JTe71r*mWQc6t|>pmIkFQP;g3FLV!XVN>c)5S8S0eIFc*LZNt9r z`@Zk{S~j=P8KyJLFhhR@!!z&9@IX1ABqz=Sp}c6hzW3a7*H1q3*AG7eI1S&W(1mML zxDMB=xIx8@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{6*(4Jxt4bcK3!LDO>o<8n)?nT+YDgF-Qd;__TxJ$nNh6Qr1AtP7Glu zkuyyD6+u#Dh^-Ju2^_D*$H;~m9E5@^85X}kqOe|NW@9wS1z~Ml7e!JZWfI-y2ByS W1~!!(@N4iT?K^fcP6c`kOca literal 0 HcmV?d00001 diff --git a/build/classes/java/main/REST/beans/Users.class b/build/classes/java/main/REST/beans/Users.class index 716a10ac95f02a1fe468dd0009cc1df8e354c6d8..71577ee673a4dbfea5f516fd0be6449ab23415dd 100644 GIT binary patch delta 56 zcmcc4f17{8Z%&Tf%J|aa)S}`|jHg&xbr`rAbSIx@s}?n6U}Z33P+%|yk|qqMK-z-A JbaFg<1px4K4lV!y delta 53 zcmcc3f1Q8AZ&sGl;?$zeER3gES#=q>8T2P#W~&x8W?*G7Wl&%+V=!Vc2eQlM#0JFSQA*K7}y!4CmXXh^C~lNFsLx_FsL$!FsM&H%r+MQ DD7gx^ delta 47 zcmaFB_keFhH!GvSMzP7~SQA*~8Q2*VCL6Og^J*|~FlaLHFlaG|Fz8G^%r+MQ DEB6ZD diff --git a/build/tmp/compileJava/source-classes-mapping.txt b/build/tmp/compileJava/source-classes-mapping.txt index 45d5820..7a5f425 100644 --- a/build/tmp/compileJava/source-classes-mapping.txt +++ b/build/tmp/compileJava/source-classes-mapping.txt @@ -1,21 +1,23 @@ +MQTT/SubExample.java + MQTT.SubExample + MQTT.SubExample$1 REST/beans/User.java REST.beans.User +REST/services/HelloWorld.java + REST.services.HelloWorld MQTT/PubSubExample.java MQTT.PubSubExample MQTT.PubSubExample$1 -REST/beans/Users.java - REST.beans.Users REST/StartServer.java REST.StartServer MQTT/PubExampleCallback.java MQTT.PubExampleCallback MQTT.PubExampleCallback$1 -REST/services/HelloWorld.java - REST.services.HelloWorld -REST/services/UsersService.java - REST.services.UsersService MQTT/PubExample.java MQTT.PubExample -MQTT/SubExample.java - MQTT.SubExample - MQTT.SubExample$1 +REST/services/UsersService.java + REST.services.UsersService +REST/beans/Users.java + REST.beans.Users +REST/Client/ClientExample.java + REST.Client.ClientExample diff --git a/src/.DS_Store b/src/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..f277d49cee3910a51f5757e553cdcdd40c66768a GIT binary patch literal 6148 zcmeHK%}T>S5Z-O8ZYW|8f<5Nqtw?|Dp$8$>dgx7v=s~4TY_WkfD{X4gSjlVX8~Fr2 zj?V0E3tGL2NST4zZ!$ZxVZIH!8O9iIPI?u_3XCxUikPur_(pIZbxAVDlLh3sMmv<( zekgr-#sx|KKLfaTIW}Y-3t04J{|;ep?_G&1WD)02$G2vmU;W!K7{}%E8_#5OYwH_A zh`iVoSMESg-PnsKq|o_`kfr=7y~k&I$5i25Uy9Q67Sa(Ny^ zJvnX4Nz@ywbzD7RS(dOmg<_Ia8ugN0tJP;EJ84wQC40Y7oy{zZ$l zS?>jh4^_#Q!8yEuu_*A)9YvvxZooH>pT`jr1H=F^umTL2qfO*jpcX2D7$63ImjOH< zY*0kUV5(6a9WbaC05At`C19&xe?S`@fR4dbBX~f#P6gDd+_V_nbPimn!@OhSQ;j;E zarI_c$Gn-F4uzY>gWD>caYrMK!~ikynE~wmKni&OAOGC{s~{SP0b*b^8Q{5=+iF5> z=5Af867O0YvG1AofE2UtB? A{Qv*} literal 0 HcmV?d00001 diff --git a/src/main/.DS_Store b/src/main/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..4fcdafec7ce672fc04976de4feaaffdb9e9f09b7 GIT binary patch literal 6148 zcmeHK%}&BV5Z(pUZHSSBi5z?JMhri4;9yb_58O;@^q>Y>AyQMj1PVkE)7Q{9@(Fw# zo!MPT6ulW^$V@W(O=oAenQxoj4r7ehN1YO5ImVa(MNC;Rd?PrIx+E#%Ndt0RqZ!I; zKa@T^8#C|A{vE>H-n$Z2$Rf_44EtuEU;Ta<4C7+)ji=I?we<}l zL{@ByE4L>nZtTUQVci>C;M0j0_k3fYN*OL}&p!*glU8o~NJg<2MBRZ(4mw>3xjYY| zj-1rxDC!K=I8Jxol7>feO?jQm`UBeN0CWr{8o>j?bt<4v<)+2prgPvr9p)VqpJ>$S zjH@@pI_AyXbST_39^6*pj5``>BnF6q&kSJi2a?14|M=(rUj@-X3=jjW$pFtZ+(sR0 zGk5D!m3Y_MplwhTj7u~wQovAGF~s6koCj3`ej5!y$6%rnJRtNVplG0h82D2LJ^+@4 BTJ!(_ literal 0 HcmV?d00001 diff --git a/src/main/java/.DS_Store b/src/main/java/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..33179ed1403b823ec452480b3ad82fe01a52c389 GIT binary patch literal 6148 zcmeHK&2HL25S|66SqnwsP^mfk(i^Jy2?q|597+xxBDFPY4s8W?K#3*Ci@+2$gvhUv zzC@p+PteC{XLc7PLUV0VG$YM^v$Hd6?`Law2LMESHmm`Z0YIV>7F=xpA~a6AB?aqo z5CzTAP1I$Ss0jNsAUjb);JU7K`{kp>qSk6wyhfwBtayu7y;|{( zTlMAAm9JjcPP&7eZ?}uP<^6+RDhT|cwH#Vp!FM#)M0^bHI%? zy8hox;vO@=3_L3agwqK+ZCsK)TelWRXRU`iKqaBL+~7I|4Sf`2EFHy1s9MnPk%8!2 T%nhOkg)ah{25y*vf6Blglrm)@ literal 0 HcmV?d00001 diff --git a/src/main/java/MQTT/PubExample.java b/src/main/java/MQTT/PubExample.java index 666b229..502e76b 100644 --- a/src/main/java/MQTT/PubExample.java +++ b/src/main/java/MQTT/PubExample.java @@ -10,6 +10,8 @@ public class PubExample { String topic = "home/sensors/light"; int qos = 2; + //brew services start mosquitto + try { client = new MqttClient(broker, clientId); MqttConnectOptions connOpts = new MqttConnectOptions(); diff --git a/src/main/java/REST/.DS_Store b/src/main/java/REST/.DS_Store index 9fdb7fb8f988971f518e46ca0193ff093f0bf48e..5380d49adec926c0b330a28dbb91a6918692a494 100644 GIT binary patch delta 143 zcmZoMXfc@J&&ahgU^g=(*Jd6TZAMo%24{vGhD?T3hCGH6&z$_^q@4UD1_lNJ1_s7% zAg%Ww41g>K1{AeP<;4Y1wI?SBurzQ>R972Xn(8PR8=FoRV3TE>Ia!ZQUT_w=zRen} Mn;18%ZN|+hY>OE;Hs~^LX6N|J4*;o(3G@H} diff --git a/src/main/java/REST/Client/ClientExample.java b/src/main/java/REST/Client/ClientExample.java new file mode 100644 index 0000000..5679144 --- /dev/null +++ b/src/main/java/REST/Client/ClientExample.java @@ -0,0 +1,63 @@ +package REST.Client; + +import REST.beans.User; +import REST.beans.Users; +import com.google.gson.Gson; +import com.sun.jersey.api.client.Client; +import com.sun.jersey.api.client.ClientHandlerException; +import com.sun.jersey.api.client.ClientResponse; +import com.sun.jersey.api.client.WebResource; + +public class ClientExample { + + public static void main(String args[]){ + Client client = Client.create(); + String serverAddress = "http://localhost:1337"; + ClientResponse clientResponse = null; + + // POST EXAMPLE + String postPath = "/users/add"; + User user = new User("riccardo","presotto"); + clientResponse = postRequest(client,serverAddress+postPath,user); + System.out.println(clientResponse.toString()); + + //GET REQUEST #1 + String getPath = "/users"; + clientResponse = getRequest(client,serverAddress+getPath); + System.out.println(clientResponse.toString()); + Users users = clientResponse.getEntity(Users.class); + System.out.println("Users List"); + for (User u : users.getUserslist()){ + System.out.println("Name: " + u.getName() + " Surname: " + u.getSurname()); + } + + //GET REQUEST #2 + String getUserPath = "/users/get/riccardo"; + clientResponse = getRequest(client,serverAddress+getUserPath); + System.out.println(clientResponse.toString()); + User userResponse = clientResponse.getEntity(User.class); + System.out.println("Name: " + userResponse.getName() + " Surname: " + userResponse.getSurname()); + + } + + public static ClientResponse postRequest(Client client, String url, User u){ + WebResource webResource = client.resource(url); + String input = new Gson().toJson(u); + try { + return webResource.type("application/json").post(ClientResponse.class, input); + } catch (ClientHandlerException e) { + System.out.println("Server non disponibile"); + return null; + } + } + + public static ClientResponse getRequest(Client client, String url){ + WebResource webResource = client.resource(url); + try { + return webResource.type("application/json").get(ClientResponse.class); + } catch (ClientHandlerException e) { + System.out.println("Server non disponibile"); + return null; + } + } +} diff --git a/src/main/java/REST/beans/Users.java b/src/main/java/REST/beans/Users.java index 6ec3ad8..59f43b4 100644 --- a/src/main/java/REST/beans/Users.java +++ b/src/main/java/REST/beans/Users.java @@ -14,7 +14,7 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlAccessorType (XmlAccessType.FIELD) public class Users { - @XmlElement(name="user") + @XmlElement(name="my_users") private List userslist; private static Users instance; @@ -41,15 +41,12 @@ public class Users { } public synchronized void add(User u){ - userslist.add(u); - } - public User getByName(String name){ + public User getByName(String name){ List usersCopy = getUserslist(); - for(User u: usersCopy) if(u.getName().toLowerCase().equals(name.toLowerCase())) return u; diff --git a/src/main/java/REST/services/UsersService.java b/src/main/java/REST/services/UsersService.java index 89c24e2..bf19bb8 100644 --- a/src/main/java/REST/services/UsersService.java +++ b/src/main/java/REST/services/UsersService.java @@ -4,12 +4,7 @@ package REST.services; import REST.beans.User; import REST.beans.Users; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; +import javax.ws.rs.*; import javax.ws.rs.core.Response; @Path("users") -- 2.18.1