GLG Toolkit, Java Class Library  Version 4.5
13. Graphics Server

GLG Graphics Server is used for server-side deployment of the GLG Toolkit in the JSP environment. More...

Detailed Description

GLG Graphics Server is used for server-side deployment of the GLG Toolkit in the JSP environment.

It is deployed in the form of a Java servlet running inside a JavaEE JSP server and provides a way to web-deploy existing Java code for legacy applications. This an alternative to a more common web deployment of the GLG applications using the GLG JavaScript Library.

The Graphics Server uses a separate GlgServer.jar GLG class library for the JSP environment that supports headless operation as well as a multi-threaded access by the servlet threads.

This library has the same interface as the rest of the GLG API with a few additional methods (SetImageSize, GetImageWidth and GetImageHeight) that are used in the JSP/JavaEE environment. When used in a servlet, GlgObject methods should be used instead of methods of GlgJBean.

The examples_jsp directory of the GLG installation contains elaborate source examples of the GLG servlets.

Functions

int GetImageHeight ()
 Returns the height of the last image generated by the GLG Graphics Server for the top viewport. More...
 
int GetImageWidth ()
 Returns the width of the last image generated by the GLG Graphics Server for the top viewport. More...
 
static void Lock ()
 Locks a servlet's thread for accessing global GLG data. More...
 
void SetImageSize (int width, int height)
 Sets the size of the image to be generated by the Graphics Server for this top viewport. More...
 
static void Unlock ()
 Unlocks a servlet's thread. More...
 
static void UnlockThread ()
 Unlocks a servlet's thread regardless of the lock's reference count. More...
 

Function Documentation

◆ GetImageHeight()

int GetImageHeight ( )

Returns the height of the last image generated by the GLG Graphics Server for the top viewport.

Returns
Image height.

◆ GetImageWidth()

int GetImageWidth ( )

Returns the width of the last image generated by the GLG Graphics Server for the top viewport.

Returns
Image width.

◆ Lock()

static void Lock ( )
static

Locks a servlet's thread for accessing global GLG data.

If the thread is already locked, the method increments the lock's reference count.

◆ SetImageSize()

void SetImageSize ( int  width,
int  height 
)

Sets the size of the image to be generated by the Graphics Server for this top viewport.

Parameters
widthThe width of the image to be generated.
heightThe height of the image to be generated.

◆ Unlock()

static void Unlock ( )
static

Unlocks a servlet's thread.

If the thread was locked multiple times, the method decrements the lock's reference count. The thread is unlocked when the reference count becomes zero.

◆ UnlockThread()

static void UnlockThread ( )
static

Unlocks a servlet's thread regardless of the lock's reference count.