Package org.kiwiproject.consul
Class SessionClient
java.lang.Object
org.kiwiproject.consul.SessionClient
HTTP Client for /v1/session/ endpoints.
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncreateSession(Session value) Create Session.createSession(Session value, String dc) Create Session.voiddestroySession(String sessionId) Destroys a session.voiddestroySession(String sessionId, String dc) Destroys a session.getSessionInfo(String sessionId) Retrieves session info.getSessionInfo(String sessionId, String dc) Retrieves session info.Lists all sessions.listSessions(String dc) Lists all sessions.renewSession(String sessionId) renewSession(String dc, String sessionId) Renews a session.
-
Field Details
-
http
-
-
Method Details
-
createSession
Create Session.PUT /v1/session/create
- Parameters:
value- The session to create.- Returns:
- ID of the newly created session.
-
createSession
Create Session.PUT /v1/session/create
- Parameters:
value- The session to create.dc- The data center.- Returns:
- Response containing the session ID.
-
renewSession
-
renewSession
Renews a session.- Parameters:
dc- The datacenter.sessionId- The session ID to renew.- Returns:
- The
SessionInfoobject for the renewed session.
-
destroySession
Destroys a session.PUT /v1/session/destroy/{sessionId}
- Parameters:
sessionId- The session ID to destroy.
-
destroySession
Destroys a session.PUT /v1/session/destroy/{sessionId}
- Parameters:
sessionId- The session ID to destroy.dc- The data center.
-
getSessionInfo
Retrieves session info.GET /v1/session/info/{sessionId}
- Parameters:
sessionId- the session ID- Returns:
SessionInfo.
-
getSessionInfo
Retrieves session info.GET /v1/session/info/{sessionId}
- Parameters:
sessionId- the session IDdc- Data center- Returns:
SessionInfo.
-
listSessions
Lists all sessions.GET /v1/session/list
- Parameters:
dc- The data center.- Returns:
- A list of available sessions.
-
listSessions
Lists all sessions.GET /v1/session/list
- Returns:
- A list of available sessions.
-
getConfig
-
getEventHandler
-