KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > net > protocol > transport > TransportHandshakeErrorContext


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.net.protocol.transport;
5
6 public class TransportHandshakeErrorContext {
7   private String JavaDoc message;
8   private Throwable JavaDoc throwable;
9
10   public TransportHandshakeErrorContext(String JavaDoc message) {
11     this.message = message;
12   }
13
14   public TransportHandshakeErrorContext(String JavaDoc message, Throwable JavaDoc throwable) {
15     this(message);
16     this.throwable = throwable;
17   }
18
19   public String JavaDoc getMessage() {
20     return message;
21   }
22
23   public String JavaDoc toString() {
24     StringBuffer JavaDoc rv = new StringBuffer JavaDoc(getClass().getName() + ": " + this.message);
25     if (this.throwable != null) {
26       rv.append(", throwable=" + throwable.getMessage());
27     }
28     return rv.toString();
29   }
30 }
Popular Tags