public class LicenseEvent extends Object
LicenseListener
class for details.T-Plan Robot Enterprise, (C) 2009-2022 T-Plan Limited. All rights reserved.
Modifier and Type | Field and Description |
---|---|
static int |
TYPE_POOLED
Event type - a desktop connection was released by a testing process
(thread) to the connection pool for reuse.
|
static int |
TYPE_RELEASED
Event type - a seat has been released because a connection was either
closed or crashed.
|
static int |
TYPE_REUSED
Event type - a desktop connection was picked up from the connection pool
(reused) by a testing process (thread).
|
static int |
TYPE_STATUS
Event type - initial status request
|
static int |
TYPE_UTILIZED
Event type - a seat has been utilized by an established desktop
connection.
|
static int |
TYPE_WAITING
Event type - all licensed seats have been exhausted and the client was
put onto a waiting list.
|
Constructor and Description |
---|
LicenseEvent(int type,
int totalEx,
int availableEx,
int totalDev,
int availableDev,
boolean server,
boolean dev,
RemoteDesktopClient owner)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getFreeDevelopmentSeats()
Get the number of free (available) development seats (connections).
|
int |
getFreeExecutionSeats()
Get the number of free (available) execution seats (connections).
|
int |
getFreeSeats()
Get the number of free (available) seats (connections).
|
RemoteDesktopClient |
getSeatOwner()
Get the desktop client owning the license seat.
|
int |
getTotalDevelopmentSeats()
Get the total number of licensed execution seats (connections).
|
int |
getTotalExecutionSeats()
Get the total number of licensed execution seats (connections).
|
int |
getTotalSeats()
Get the total number of licensed seats (connections).
|
int |
getType()
Get the event type, one of:
TYPE_STATUS is the initial status event fired immediately
after the listeners registers with the
ApplicationSupport
class,
TYPE_UTILIZED is fired when a desktop client is about to
connect to a desktop and uses up a license seat,
TYPE_RELEASED is fired when a desktop client disconnects and
frees up the owned license seat,
TYPE_POOLED is fired when a connection is released by a test
process and pooled for eventual reuse. |
String |
getTypeAsString() |
long |
getWhen()
Time of event creation.
|
boolean |
isDevelopmentLicense()
Indicate whether the license is a development (true) or execution (false)
one.
|
boolean |
isServer()
Indicates whether the application is licensed through the licensing
server or a file based license key.
|
String |
toString() |
public static final int TYPE_STATUS
public static final int TYPE_RELEASED
public static final int TYPE_UTILIZED
public static final int TYPE_WAITING
public static final int TYPE_POOLED
public static final int TYPE_REUSED
public LicenseEvent(int type, int totalEx, int availableEx, int totalDev, int availableDev, boolean server, boolean dev, RemoteDesktopClient owner)
type
- event type. See the getType()
method for details on
recognized event types.totalEx
- the number of execution seats.availableEx
- the number of free (unused) execution seats.totalDev
- the number of development seats.availableDev
- the number of free (unused) development seats.server
- true for licensing server or false for a file based license
key(s).dev
- true/false for development/execution license type.owner
- license owner. It is null for the initial event of the
TYPE_STATUS
type.public int getType()
TYPE_STATUS
is the initial status event fired immediately
after the listeners registers with the
ApplicationSupport
class,TYPE_UTILIZED
is fired when a desktop client is about to
connect to a desktop and uses up a license seat,TYPE_RELEASED
is fired when a desktop client disconnects and
frees up the owned license seat,TYPE_POOLED
is fired when a connection is released by a test
process and pooled for eventual reuse. Though this means no change to the
license status because pooled connections keep holding the license seat,
it is useful for debugging of the pool mechanism.TYPE_REUSED
is fired when a connection is picked up from the
connection pool and reused for a test script. Though this means no change
to the license status because reused connections keep holding the license
seat, it is useful for debugging of the pool mechanism.TYPE_WAITING
is fired when the number of licenses is
exhausted and the client requesting a license seat is queued to wait for
a released license.public int getFreeSeats()
public int getFreeExecutionSeats()
public int getFreeDevelopmentSeats()
public int getTotalSeats()
public int getTotalExecutionSeats()
public int getTotalDevelopmentSeats()
public RemoteDesktopClient getSeatOwner()
public long getWhen()
System.currentTimeMillis()
at the time of event creation.public boolean isServer()
public boolean isDevelopmentLicense()
public String getTypeAsString()