BrightSide Workbench Full Report + Source Code
HandshakeStatus.java
Go to the documentation of this file.
1
/*
2
* TurrĂ³ i Cutiller Foundation. License notice.
3
* Copyright (C) 2015 Lluis TurrĂ³ Cutiller <http://www.turro.org/>
4
*
5
* This program is free software: you can redistribute it and/or modify
6
* it under the terms of the GNU Affero General Public License as published by
7
* the Free Software Foundation, either version 3 of the License, or
8
* (at your option) any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU Affero General Public License for more details.
14
*
15
* You should have received a copy of the GNU Affero General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
19
package
org.turro.financials.handshake;
20
21
import
org.turro.http.ElephantResponse;
22
27
public
enum
HandshakeStatus
{
28
29
HS_NO_HANDSHAKE
,
30
HS_BROKEN
,
31
HS_ESTABLISHED
;
32
33
public
static
HandshakeStatus
getStatus
(
ElephantResponse
er) {
34
try
{
35
return
er !=
null
?
HandshakeStatus
.valueOf(er.
code
) :
null
;
36
}
catch
(IllegalArgumentException |NullPointerException ex) {
37
return
null
;
38
}
39
}
40
41
}
org.turro.http.ElephantResponse
Definition:
ElephantResponse.java:40
org.turro.http.ElephantResponse.code
String code
Definition:
ElephantResponse.java:44
org.turro.financials.handshake.HandshakeStatus
Definition:
HandshakeStatus.java:27
org.turro.financials.handshake.HandshakeStatus.HS_BROKEN
HS_BROKEN
Definition:
HandshakeStatus.java:30
org.turro.financials.handshake.HandshakeStatus.getStatus
static HandshakeStatus getStatus(ElephantResponse er)
Definition:
HandshakeStatus.java:33
org.turro.financials.handshake.HandshakeStatus.HS_ESTABLISHED
HS_ESTABLISHED
Definition:
HandshakeStatus.java:31
org.turro.financials.handshake.HandshakeStatus.HS_NO_HANDSHAKE
HS_NO_HANDSHAKE
Definition:
HandshakeStatus.java:29
TurroProjects
Public
BrightSide
bsfinancials-core
src
main
java
org
turro
financials
handshake
HandshakeStatus.java
Generated on Tue Mar 12 2024 07:01:19 for BrightSide by
1.9.1