Trial expired detection in a vision component ? in a gw mod?

How detect Trial expired in a vision component ?
in a gateway module ?

GatewayContext has a #getLicenseManager() call that you can then use #getLicenseState() on.
ClientContext has a #getLicenseState() call on it directly.