public interface ConnectionOpenEvent
Server-answer to Connection.open()
.
This event must be handled by
ConnectionListener.onConnectionOpen()
.
Field Summary | |
---|---|
static int |
RESULT_ALREADY_LOGGED
Failure-code: user already logged. |
static int |
RESULT_EXCEED_SESSION
Failure-code: too much open sessions with the server. |
static int |
RESULT_INVALID_AUTH_KEY
Failure-code: bad configuration key associated to the connection. |
static int |
RESULT_INVALID_CLIENTID
Failure-code: bad client ID associated to the connection. |
static int |
RESULT_INVALID_PASSWORD
Failure-code: bad password associated to the connection. |
static int |
RESULT_INVALID_PROFILE
Failure-code: invalid profile. |
static int |
RESULT_INVALID_REVISION
Failure-code: bad application version associated to the connection. |
static int |
RESULT_INVALID_SERVER_STATUS
Failure-code: the server is in a status (e.g. still in a start-up state) in which connections are not allowed. |
static int |
RESULT_INVALID_SERVICE
Failure-code: bad user type associated to the connection. |
static int |
RESULT_INVALID_USERNAME
Failure-code: bad user name associated to the connection. |
static int |
RESULT_INVALID_USERTYPE
Failure-code: bad user type associated to the connection. |
Fields inherited from interface Event |
---|
RESULT_GENERIC_ERROR, RESULT_OK |
Method Summary | |
---|---|
int |
getActiveConnectionType()
|
int |
getBusinessServiceID()
Returns the business service ID associated to this connection. |
int |
getClientServiceID()
Returns the client service ID associated to this connection. |
int |
getEnvironment()
Returns an indication of the FastTrack server environment (e.g.: Production, Testing, etc...). |
int |
getFTID()
Returns the FastTrack Server ID. |
int[] |
getMarketRevision()
Returns the version of the server. |
int |
getSystemDate()
Returns the system date of the server. |
Date |
getSystemDateTime()
Returns the system date and time of the server. |
int |
getSystemTime()
Returns the system time of the server. |
Methods inherited from interface ConnectionEvent |
---|
getConnection |
Methods inherited from interface Event |
---|
getResult |
Field Detail |
---|
static final int RESULT_INVALID_PASSWORD
static final int RESULT_INVALID_USERNAME
static final int RESULT_INVALID_REVISION
static final int RESULT_ALREADY_LOGGED
static final int RESULT_INVALID_CLIENTID
static final int RESULT_INVALID_SERVER_STATUS
static final int RESULT_EXCEED_SESSION
static final int RESULT_INVALID_PROFILE
static final int RESULT_INVALID_AUTH_KEY
static final int RESULT_INVALID_USERTYPE
static final int RESULT_INVALID_SERVICE
Method Detail |
---|
int getClientServiceID()
The client service ID is one of the elements that identify a
TransactionID
.
This method must be called only when the result
is Event.RESULT_OK
.
Event.RESULT_OK
.TransactionID.belongsTo(it.list.jft.Connection)
int getBusinessServiceID()
The business service ID is one of the elements that identify a
TransactionID
.
This method must be called only when the result
is Event.RESULT_OK
.
Event.RESULT_OK
.TransactionID.belongsTo(it.list.jft.Connection)
int getSystemDate()
The value returned reflects the date in which the server opened the connection.
The returned value is an int
whose decimal representation
is: YYYYMMDD (i.e.: year*10000 + month*100 + day).
This method must be called only when the result
is Event.RESULT_OK
.
Event.RESULT_OK
.getSystemDateTime()
int getSystemTime()
The value returned reflects the time in which the server opened the connection.
The returned value is an int
whose decimal representation
is: HHMMSScc (i.e.: hours*1000000 + minutes*10000 + seconds*100 +
hundreds).
This method must be called only when the result
is Event.RESULT_OK
.
Event.RESULT_OK
.getSystemDateTime()
Date getSystemDateTime()
The value returned reflects the date and time in which the server opened the connection.
This method must be called only when the result
is Event.RESULT_OK
.
This utility method is defined in terms of getSystemDate()
and
getSystemTime()
as follows:
int date = getSystemDate();
int time = getSystemTime();
if(date == -1 || time == -1)
return -1;
Calendar cal = Calendar.getInstance();
cal.set(date/10000, date%10000/100-1, date%100, time/1000000, time%1000000/10000, time%1000/100);
return new Date(cal.getTimeInMillis() + time%100*10);
Event.RESULT_OK
.int[] getMarketRevision()
A version is always represented by a three-dimensional array; e.g. the
version 2.0.3 is represented by:
int[] version = {2, 0, 3};
This method must be called only when the result
is Event.RESULT_OK
.
null
is returned when the
result is not Event.RESULT_OK
.int getFTID()
Each FastTrack server in the world is identified by an unique FastTrack Server ID.
This method must be called only when the result
is Event.RESULT_OK
.
Event.RESULT_OK
.int getEnvironment()
the precise meaning of this value depends on the particular FastTrack server and it is documented in the corresponding manual.
This method must be called only when the result
is Event.RESULT_OK
.
Event.RESULT_OK
.int getActiveConnectionType()