mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-16 01:19:49 +00:00
session expiry is an exception
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@203 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
449c50f4aa
commit
4c6c4fa79b
2 changed files with 4 additions and 5 deletions
|
@ -251,7 +251,7 @@ public class OebbProvider implements NetworkProvider
|
|||
if (mError.group(2) != null)
|
||||
return QueryConnectionsResult.INVALID_DATE;
|
||||
if (mError.group(3) != null)
|
||||
return QueryConnectionsResult.SESSION_TIMEOUT;
|
||||
throw new SessionExpiredException();
|
||||
}
|
||||
|
||||
List<String> fromAddresses = null;
|
||||
|
@ -301,7 +301,7 @@ public class OebbProvider implements NetworkProvider
|
|||
if (mError.group(2) != null)
|
||||
return QueryConnectionsResult.INVALID_DATE;
|
||||
if (mError.group(3) != null)
|
||||
return QueryConnectionsResult.SESSION_TIMEOUT;
|
||||
throw new SessionExpiredException();
|
||||
}
|
||||
|
||||
return queryConnections(uri, page);
|
||||
|
@ -363,7 +363,7 @@ public class OebbProvider implements NetworkProvider
|
|||
if (mError.group(2) != null)
|
||||
return QueryConnectionsResult.INVALID_DATE;
|
||||
if (mError.group(3) != null)
|
||||
return QueryConnectionsResult.SESSION_TIMEOUT;
|
||||
throw new SessionExpiredException();
|
||||
}
|
||||
|
||||
// parse page
|
||||
|
|
|
@ -28,13 +28,12 @@ public final class QueryConnectionsResult implements Serializable
|
|||
{
|
||||
public enum Status
|
||||
{
|
||||
OK, AMBIGUOUS, TOO_CLOSE, NO_CONNECTIONS, INVALID_DATE, SESSION_TIMEOUT;
|
||||
OK, AMBIGUOUS, TOO_CLOSE, NO_CONNECTIONS, INVALID_DATE;
|
||||
}
|
||||
|
||||
public static final QueryConnectionsResult TOO_CLOSE = new QueryConnectionsResult(Status.TOO_CLOSE, null, null, null);
|
||||
public static final QueryConnectionsResult NO_CONNECTIONS = new QueryConnectionsResult(Status.NO_CONNECTIONS, null, null, null);
|
||||
public static final QueryConnectionsResult INVALID_DATE = new QueryConnectionsResult(Status.INVALID_DATE, null, null, null);
|
||||
public static final QueryConnectionsResult SESSION_TIMEOUT = new QueryConnectionsResult(Status.SESSION_TIMEOUT, null, null, null);
|
||||
|
||||
public final Status status;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue