EsiObjects.org

What is the Java Gateway?

The Java Gateway is a set of Java classes that allow Java applications to access one or more EsiObjects servers. TCP/IP handles communications between a Java client and the EsiObjects server, which is the only method this implementation provides. The gateway, in conjunction with Java Proxies, allow for efficient and specialized services to the server. These components are all described in the Java Gateway Programmer’s Guide document which is included in the EsiObjects Client Kit. Using the gateway and proxies, a Java client can connect to the EsiObjects server and gain access to the basic services in EsiObjects, that is, object creation and destruction, operations on methods, properties, and relationships, events and more.

The Java Gateway is a set Java classes that provide a communications link to the EsiObjects server. Once connected to a server, the gateway provides services for creating and looking up objects. These objects are created as proxy objects on the Java side and are connected to a corresponding object on the server side. These proxies use the services of the gateway to connect to the server object. Methods, properties, and relationships of these objects are handled via the gateway that provides the connection from client to server. Besides handling the connection to the server, and routing requests from the proxy object to the server object, the gateway has a set of common support classes such as Variant and Bulk Transfer Objects (BTO) that provide services for moving large amounts of data between client and server. The classes provided in the gateway are all extensible by the user.

EsiObjects classes that define objects to be accessed from the client have Java Proxies generated for them. This process produces a Java file for each generated class. The class files are included in the client application. Also included is the Java Gateway package. At runtime, the gateway is connected to a TCP Listener process running on an EsiObjects server. Once connected, the Java programmer can access the EsiObjects server via the gateway. The gateway is the object that routes requests from the client to the server. A Java Proxy object maps to a server object. Operations invoked on the proxy are sent, via the gateway, to the servant object. The operation is executed on that object and any result is returned back to the proxy. Not shown in the diagram are the Bulk Transfer Objects that the gateway provides for retrieving and sending collections of data to and from the server. The gateway and generated java proxies are included in the Java client. The gateway uses TCP/IP to connect to a TCP listener that is running on the EsiObjects server. Proxies are used to invoke operations on objects within the server.