This repository was archived by the owner on Jan 30, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +51
-7
lines changed
encoder-client/src/main/java/org/glassfish/encoder/client
encoder/src/main/java/org/sample/encoder Expand file tree Collapse file tree 5 files changed +51
-7
lines changed Original file line number Diff line number Diff line change 4343import javax .json .Json ;
4444import javax .websocket .DecodeException ;
4545import javax .websocket .Decoder ;
46+ import javax .websocket .EndpointConfig ;
4647
4748/**
4849 * @author Arun Gupta
4950 */
50- public class MyMessageDecoder extends Decoder . Adapter implements Decoder .Text <MyMessage > {
51+ public class MyMessageDecoder implements Decoder .Text <MyMessage > {
5152
5253 @ Override
5354 public MyMessage decode (String string ) throws DecodeException {
@@ -58,4 +59,14 @@ public MyMessage decode(String string) throws DecodeException {
5859 public boolean willDecode (String string ) {
5960 return true ;
6061 }
62+
63+ @ Override
64+ public void init (EndpointConfig ec ) {
65+ System .out .println ("init" );
66+ }
67+
68+ @ Override
69+ public void destroy () {
70+ System .out .println ("desroy" );
71+ }
6172}
Original file line number Diff line number Diff line change 4141
4242import javax .websocket .EncodeException ;
4343import javax .websocket .Encoder ;
44+ import javax .websocket .EndpointConfig ;
4445
4546/**
4647 * @author Arun Gupta
4748 */
48- public class MyMessageEncoder extends Encoder . Adapter implements Encoder .Text <MyMessage > {
49+ public class MyMessageEncoder implements Encoder .Text <MyMessage > {
4950 @ Override
5051 public String encode (MyMessage myMessage ) throws EncodeException {
5152 return myMessage .getJsonObject ().toString ();
5253 }
54+
55+ @ Override
56+ public void init (EndpointConfig ec ) {
57+ System .out .println ("init" );
58+ }
59+
60+ @ Override
61+ public void destroy () {
62+ System .out .println ("desroy" );
63+ }
5364}
Original file line number Diff line number Diff line change 4343import javax .json .Json ;
4444import javax .websocket .DecodeException ;
4545import javax .websocket .Decoder ;
46+ import javax .websocket .EndpointConfig ;
4647
4748/**
4849 * @author Arun Gupta
4950 */
50- public class MyMessageDecoder extends Decoder . Adapter implements Decoder .Text <MyMessage > {
51+ public class MyMessageDecoder implements Decoder .Text <MyMessage > {
5152
5253 @ Override
5354 public MyMessage decode (String string ) throws DecodeException {
@@ -62,4 +63,14 @@ public MyMessage decode(String string) throws DecodeException {
6263 public boolean willDecode (String string ) {
6364 return true ;
6465 }
66+
67+ @ Override
68+ public void init (EndpointConfig ec ) {
69+ System .out .println ("init" );
70+ }
71+
72+ @ Override
73+ public void destroy () {
74+ System .out .println ("desroy" );
75+ }
6576}
Original file line number Diff line number Diff line change 4141
4242import javax .websocket .EncodeException ;
4343import javax .websocket .Encoder ;
44+ import javax .websocket .EndpointConfig ;
4445
4546/**
4647 * @author Arun Gupta
4748 */
48- public class MyMessageEncoder extends Encoder . Adapter implements Encoder .Text <MyMessage > {
49+ public class MyMessageEncoder implements Encoder .Text <MyMessage > {
4950 @ Override
5051 public String encode (MyMessage myMessage ) throws EncodeException {
5152// return this.getClass().getName();
5253 return myMessage .getJsonObject ().toString ();
5354 }
55+
56+ @ Override
57+ public void init (EndpointConfig ec ) {
58+ System .out .println ("init" );
59+ }
60+
61+ @ Override
62+ public void destroy () {
63+ System .out .println ("destroy" );
64+ }
5465}
Original file line number Diff line number Diff line change 2121 <module >client</module >
2222 <module >encoder</module >
2323 <module >encoder-client</module >
24- <!-- < module>encoder-programmatic</module> -- >
24+ <module >encoder-programmatic</module >
2525 <module >endpoint</module >
2626 <module >endpoint-javatypes</module >
2727 <module >endpoint-multipart</module >
28- <!-- <module>endpoint-multipart-programmatic</module>
28+ <!-- < module>endpoint-multipart-programmatic</module> -- >
2929 <module >endpoint-programmatic</module >
30- <module>httpsession</module>-->
30+ <module >httpsession</module >
3131 <module >injection</module >
3232 <module >javase-client</module >
3333 <module >messagesize</module >
You can’t perform that action at this time.
0 commit comments