/**
  * Deep clone
  *
  * @return cloned EndpointConfiguration
  */
 public EndpointConfiguration clone() {
   EndpointConfiguration result = new EndpointConfiguration();
   result.OperationTimeout = OperationTimeout;
   result.UseBinaryEncoding = UseBinaryEncoding;
   result.MaxStringLength = MaxStringLength;
   result.MaxByteStringLength = MaxByteStringLength;
   result.MaxArrayLength = MaxArrayLength;
   result.MaxMessageSize = MaxMessageSize;
   result.MaxBufferSize = MaxBufferSize;
   result.ChannelLifetime = ChannelLifetime;
   result.SecurityTokenLifetime = SecurityTokenLifetime;
   return result;
 }
  /**
   * Creates an instance of a configuration with reasonable default values.
   *
   * @return configuration
   */
  public static EndpointConfiguration defaults() {
    EndpointConfiguration configuration = new EndpointConfiguration();

    configuration.OperationTimeout = 120000;
    configuration.UseBinaryEncoding = true;
    configuration.MaxArrayLength = UnsignedShort.MAX_VALUE.intValue();
    configuration.MaxByteStringLength = UnsignedShort.MAX_VALUE.intValue() * 16;
    configuration.MaxMessageSize = UnsignedShort.MAX_VALUE.intValue() * 64;
    configuration.MaxStringLength = UnsignedShort.MAX_VALUE.intValue();
    configuration.MaxBufferSize = UnsignedShort.MAX_VALUE.intValue();
    configuration.ChannelLifetime = 120000;
    configuration.SecurityTokenLifetime = 3600000;

    return configuration;
  }