Appendix A Jaguar 1.1 Java Classes and Interfaces


jaguar.beans.enterprise.CommunicationManager class

Description

package com.sybase.jaguar.beans.enterprise;public class CommunicationManager extends Object

CommunicationManager instantiates stub objects used to invoke Jaguar component methods.

Future versions of the Java Developer's Kit will include a built-in version of this class. The Jaguar implementation is based on a draft version of JavaSoft's Enterprise JavaBeans specification.

Constructors

None. All methods are static.

Methods

See Also

jaguar.beans.enterprise.Stub interface


CommunicationManager.createInstance(Properties)

Description

Create an instance of a server component and return a stub instance that communicates with the server component instance.

Syntax

Package

com.sybase.jaguar.beans.enterprise

Class

jaguar.beans.enterprise.CommunicationManager class

public static synchronized Stub createInstance
( Properties props)
throws EnterpriseBeanException

Parameters

props

A JProperties object initialized to describe the component and the particulars that are required to establish communication with the server. This object must be an initialized JProperties object; passing an instance of any other class will result in an exception.

Return Values

An instance of the stub class for the component specified by URL or null if no installed driver can instantiate a stub for the specified URL.

Cast the returned object to either the generated-stub interface or the generated-stub class. Casting to the interface provides portability to other communication drivers. However, you must cast to the stub class and not the interface if you call Jaguar methods that return row results.

Note   Note The Jaguar results processing methods cannot be used unless you cast the returned object to the generated stub class (and not the interface). These methods are inherited from either jaguar.stub.jdbc102.JJDBCStub class or jaguar.stub.jdbc11.JJDBCStub class, depending on the JDK version used by your code.

See Also

createInstance(String, Class), getDriver(String), registerDriver(CommunicationDriver), jaguar.beans.enterprise.JProperties class


CommunicationManager.createInstance(String, Class)

Description

Create an instance of a server component and return a stub instance that communicates with the server component instance.

Syntax

Package

com.sybase.jaguar.beans.enterprise

Class

jaguar.beans.enterprise.CommunicationManager class

public static synchronized Stub createInstance
( String URL, Class typeView)
throws EnterpriseBeanException

Parameters

URL

A Uniform Resource Locator (URL) of the form:

ejb:protocol[//subprotocol1]

where protocol identifies which CommunicationDriver instance will be used to instantiate the stub class and the rest of the URL indicates a server component and the particulars that are required to establish communication with the server. Each implementation of CommunicationDriver recognizes a different protocol. The comments below describe the URL to use for Jaguar components.

typeView

Not used. Pass as null .

Return Values

An instance of the stub class for the component specified by URL or null if no installed driver can instantiate a stub for the specified URL.

Cast the returned object to either the generated-stub interface or the generated-stub class. Casting to the interface provides portability to other communication drivers. However, you must cast to the stub class and not the interface if you call Jaguar methods that return row results.

Note   Note The Jaguar results processing methods cannot be used unless you cast the returned object to the generated stub class (and not the interface). These methods are inherited from either jaguar.stub.jdbc102.JJDBCStub class or jaguar.stub.jdbc11.JJDBCStub class, depending on the JDK version used by your code.

Usage

Jaguar component URLs are composed as follows:

ejb:{iiop|iiops|jdbc|jdbc102}//host:port:[jag_tunnel:
[tport:]][jag_new_connection:]user:pwrd:
stubpack/srvpack/comp

Note   Note The component URL must not contain white space. The syntax description above contains a newline to improve readability.

The URL components are:

The example URL below connects to machine "xyz.com," at port 9000, with user "fred," and password "secret." It runs in a JDK 1.1 application (or component) and identifies the component "Stock" in package "Trade." The stub class is OnLineApps.Trade.

ejb:jdbc//xyz.com:9000:fred:secret:OnLineApps.Trade/Trade/Stock

See Also

createInstance(Properties), getDriver(String), registerDriver(CommunicationDriver)


CommunicationManager.deregisterDriver(CommunicationDriver)

Description

Remove a previously registered driver from the driver manager's list of installed drivers.

Syntax

Package

com.sybase.jaguar.beans.enterprise

Class

jaguar.beans.enterprise.CommunicationManager class

public static synchronized void deregisterDriver
( CommunicationDriver driver)
throws CommunicationDriverException

Parameters

driver

The CommunicationDriver instance to be deregistered.

See Also

registerDriver(CommunicationDriver)


CommunicationManager.getDriver(String)

Description

Get the driver instance that recognizes the protocol in the specified URL.

Syntax

Package

com.sybase.jaguar.beans.enterprise

Class

jaguar.beans.enterprise.CommunicationManager class

public static void getDriver
( String URL)
throws CommunicationDriverException

Parameters

URL

A URL that identifies an Enterprise JavaBean. See createInstance(String, Class) for details on the URL format.

Return Values

A CommunicationDriver instance that recognizes the specified URL. If no installed driver recognizes the URL, a CommunicationDriverException is thrown.

See Also

createInstance(Properties), registerDriver(CommunicationDriver)


CommunicationManager.getDrivers()

Description

Get an enumeration of currently registered drivers.

Syntax

Package

com.sybase.jaguar.beans.enterprise

Class

CommunicationManager

public static Enumeration getDrivers()
throws CommunicationDriverException

Return Values

A java.util.Enumeration object that contains each currently installed CommunicationDriver instance.

See Also

getDriver(String), registerDriver(CommunicationDriver)


CommunicationManager.registerDriver(CommunicationDriver)

Description

Add a driver to the driver manager's list of installed drivers.

Syntax

Package

com.sybase.jaguar.beans.enterprise

Class

CommunicationManager

public static synchronized void registerDriver
( CommunicationDriver driver)
throws CommunicationDriverException

Parameters

driver

The CommunicationDriver instance to be registered.

See Also

deregisterDriver(CommunicationDriver)

 


Copyright © 2000 Sybase, Inc. All rights reserved.