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