1 //
2 // ========================================================================
3 // Copyright (c) 1995-2014 Mort Bay Consulting Pty. Ltd.
4 // ------------------------------------------------------------------------
5 // All rights reserved. This program and the accompanying materials
6 // are made available under the terms of the Eclipse Public License v1.0
7 // and Apache License v2.0 which accompanies this distribution.
8 //
9 // The Eclipse Public License is available at
10 // http://www.eclipse.org/legal/epl-v10.html
11 //
12 // The Apache License v2.0 is available at
13 // http://www.opensource.org/licenses/apache2.0.php
14 //
15 // You may elect to redistribute this code under either of these licenses.
16 // ========================================================================
17 //
18
19 package org.eclipse.jetty.websocket.common.events;
20
21 import org.eclipse.jetty.websocket.common.events.annotated.CallableMethod;
22 import org.eclipse.jetty.websocket.common.events.annotated.OptionalSessionCallableMethod;
23
24 public class JettyAnnotatedMetadata
25 {
26 /** @OnWebSocketConnect () */
27 public CallableMethod onConnect;
28 /** @OnWebSocketMessage (byte[], or ByteBuffer, or InputStream) */
29 public OptionalSessionCallableMethod onBinary;
30 /** @OnWebSocketMessage (String, or Reader) */
31 public OptionalSessionCallableMethod onText;
32 /** @OnWebSocketFrame (Frame) */
33 public OptionalSessionCallableMethod onFrame;
34 /** @OnWebSocketError (Throwable) */
35 public OptionalSessionCallableMethod onError;
36 /** @OnWebSocketClose (Frame) */
37 public OptionalSessionCallableMethod onClose;
38
39 @Override
40 public String toString()
41 {
42 StringBuilder s = new StringBuilder();
43 s.append("JettyPojoMetadata[");
44 s.append("onConnect=").append(onConnect);
45 s.append(",onBinary=").append(onBinary);
46 s.append(",onText=").append(onText);
47 s.append(",onFrame=").append(onFrame);
48 s.append(",onError=").append(onError);
49 s.append(",onClose=").append(onClose);
50 s.append("]");
51 return s.toString();
52 }
53 }