Partilhar via


ConnectionError Class

  • java.lang.Object
    • com.azure.resourcemanager.cosmos.models.ConnectionError

Implements

public final class ConnectionError
implements JsonSerializable<ConnectionError>

The ConnectionError model.

Constructor Summary

Constructor Description
ConnectionError()

Creates an instance of ConnectionError class.

Method Summary

Modifier and Type Method and Description
ConnectionState connectionState()

Get the connectionState property: The kind of connection error that occurred.

String exception()

Get the exception property: Detailed error message about the failed connection.

static ConnectionError fromJson(JsonReader jsonReader)

Reads an instance of ConnectionError from the JsonReader.

String iPFrom()

Get the iPFrom property: The IP of host that originated the failed connection.

String iPTo()

Get the iPTo property: The IP that the connection attempted to reach.

Integer port()

Get the port property: The TCP port the connection was attempted on.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

ConnectionError withConnectionState(ConnectionState connectionState)

Set the connectionState property: The kind of connection error that occurred.

ConnectionError withException(String exception)

Set the exception property: Detailed error message about the failed connection.

ConnectionError withIPFrom(String iPFrom)

Set the iPFrom property: The IP of host that originated the failed connection.

ConnectionError withIPTo(String iPTo)

Set the iPTo property: The IP that the connection attempted to reach.

ConnectionError withPort(Integer port)

Set the port property: The TCP port the connection was attempted on.

Methods inherited from java.lang.Object

Constructor Details

ConnectionError

public ConnectionError()

Creates an instance of ConnectionError class.

Method Details

connectionState

public ConnectionState connectionState()

Get the connectionState property: The kind of connection error that occurred.

Returns:

the connectionState value.

exception

public String exception()

Get the exception property: Detailed error message about the failed connection.

Returns:

the exception value.

fromJson

public static ConnectionError fromJson(JsonReader jsonReader)

Reads an instance of ConnectionError from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ConnectionError if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the ConnectionError.

iPFrom

public String iPFrom()

Get the iPFrom property: The IP of host that originated the failed connection.

Returns:

the iPFrom value.

iPTo

public String iPTo()

Get the iPTo property: The IP that the connection attempted to reach.

Returns:

the iPTo value.

port

public Integer port()

Get the port property: The TCP port the connection was attempted on.

Returns:

the port value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withConnectionState

public ConnectionError withConnectionState(ConnectionState connectionState)

Set the connectionState property: The kind of connection error that occurred.

Parameters:

connectionState - the connectionState value to set.

Returns:

the ConnectionError object itself.

withException

public ConnectionError withException(String exception)

Set the exception property: Detailed error message about the failed connection.

Parameters:

exception - the exception value to set.

Returns:

the ConnectionError object itself.

withIPFrom

public ConnectionError withIPFrom(String iPFrom)

Set the iPFrom property: The IP of host that originated the failed connection.

Parameters:

iPFrom - the iPFrom value to set.

Returns:

the ConnectionError object itself.

withIPTo

public ConnectionError withIPTo(String iPTo)

Set the iPTo property: The IP that the connection attempted to reach.

Parameters:

iPTo - the iPTo value to set.

Returns:

the ConnectionError object itself.

withPort

public ConnectionError withPort(Integer port)

Set the port property: The TCP port the connection was attempted on.

Parameters:

port - the port value to set.

Returns:

the ConnectionError object itself.

Applies to