Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

WebLogic Server 5.1.0sp9 API Reference

## weblogic.common
Class T3Connection

    java.lang.Object
      |
      +--weblogic.common.T3Connection

public class T3Connection
extends java.lang.Object

A T3Connection object is used to establish communication between a T3Client and a WebLogic Server on a TCP/IP hostname and port number. A T3Connection is the representation of the link between a T3Client and a WebLogic Server.

Changes in internal communications in version 4.0 affected how T3Connection. Socket management is no longer managed by T3Connection (as of version 4.0); now sharing sockets is done automatically for you by the framework. Consequently, the methods in the T3Connection class have been deprecated. In general, the model in which T3Connection was used -- that you supply the URL of a WebLogic Server and get back a connection to the server -- has been made obsolete with the introduction of JNDI and the use of an InitialContext, by which access to all WebLogic services are then acquired without direct reference to any WebLogic Server in particular. This model facilitates cluster use for failover and load balancing.

Removing references to T3Connection is strongly recommended, since the class will not be supported indefinitely. The accessor methods in this class to get information about the connection still work as expected, with some exceptions. For example, if operating in a cluster environment, the accessors will only return information about the original host, port, etc. The `isConnected()` method always returns true, since there is no longer any real tie between the connection itself and its socket. The `disconnect()` method may not behave as you expect, since the socket is managed by the framework. Again, we recommend that you upgrade your classes to use the much more flexible JNDI model for access to all WebLogic services.

Author:
  Copyright (c) 1995-1998 by WebLogic, Inc. All Rights Reserved., Copyright (c) 1998-2000 by BEA Systems, Inc. All Rights Reserved.
  Copyright © 2001 BEA Systems, Inc. All Rights Reserved.
See Also:
  `WLInitialContextFactory`

Constructor Summary
`T3Connection(java.lang.String url)` Deprecated. Use the JNDI model
`T3Connection(java.lang.String url, UserInfo t3usr)` Deprecated. Use the JNDI model

Method Summary
`T3Connection` | `connect()` Deprecated. Use the JNDI model
`void` | `disconnect()` Deprecated. Use the JNDI model
`java.lang.String` | `getHost()` Deprecated. Use the JNDI model and its accessors for information about the connection
`java.lang.String` | `getPath()` Deprecated. Use the JNDI model and its accessors for information about the connection
`int` | `getPort()` Deprecated. Use the JNDI model and its accessors for information about the connection
`java.lang.String` | `getProtocol()` Deprecated. Use the JNDI model and its accessors for information about the connection
`java.lang.String` | `getQueryParam(java.lang.String key)` Deprecated. Use the JNDI model and its accessors for information about the connection
`java.util.Hashtable` | `getQueryParams()` Deprecated. Use the JNDI model and its accessors for information about the connection
`java.lang.String` | `getURL()` Deprecated. Use the JNDI model and its accessors for information about the connection
`UserInfo` | `getUser()` Deprecated. Use the JNDI model and its accessors for information about the connection
`boolean` | `isConnected()` Deprecated. Use the JNDI model
`java.lang.String` | `toString()` Deprecated. Information is no longer very useful

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### T3Connection

    public T3Connection(java.lang.String url)
                 throws java.net.UnknownHostException,
                        java.net.MalformedURLException

  Deprecated. Use the JNDI model
  Establishes a WebLogic Server connection to the specified URL for the specified UserInfo information. With version 4.0, the recommended method of establishing a connection to a server is through the use of a JNDI Context.

  Parameters:
    `URL` - URL for the WebLogic Server
  Throws:
    java.net.UnknownHostException - if the URL for the WebLogic Server is not found

### T3Connection

    public T3Connection(java.lang.String url,
                        UserInfo t3usr)
                 throws java.net.UnknownHostException,
                        java.net.MalformedURLException

  Deprecated. Use the JNDI model
  Establishes a WebLogic Server connection to the specified URL and the specified UserInfo information. With version 4.0, the recommended method of establishing a connection to a server is through the use of a JNDI Context.

  Parameters:
    `URL` - URL for the WebLogic Server
    `t3usr` - A UserInfo with username and credential to provide access to the WebLogic Server
  Throws:
    java.net.UnknownHostException - if the URL is not found
    java.net.MalformedURLException - if the URL for the WebLogic Server is invalid

Method Detail

### getHost

    public java.lang.String getHost()

  Deprecated. Use the JNDI model and its accessors for information about the connection
  Returns the host name of a WebLogic Server to which a T3Connection was originally connected.

  Returns:
    Hostname

### getPort

    public int getPort()

  Deprecated. Use the JNDI model and its accessors for information about the connection
  Returns the port number over which a T3Connection was originally connected to a WebLogic Server.

  Returns:
    Port number on WebLogic Server

### getProtocol

    public java.lang.String getProtocol()

  Deprecated. Use the JNDI model and its accessors for information about the connection
  Returns the protocol with which a T3Connection communicates to a WebLogic Server.

  Returns:
    Communication protocol

### getUser

    public UserInfo getUser()

  Deprecated. Use the JNDI model and its accessors for information about the connection
  Returns the UserInfo by which a T3Connection is connected to a WebLogic Server. A UserInfo has a username and credential that allows authentication and access to a secure WebLogic Server. The default is "Guest" (no password).

  Returns:
    UserInfo object

### getURL

    public java.lang.String getURL()

  Deprecated. Use the JNDI model and its accessors for information about the connection
  Returns the URL with which a T3Connection was established as a UserInfo object.

  Returns:
    String

### getPath

    public java.lang.String getPath()

  Deprecated. Use the JNDI model and its accessors for information about the connection
  Returns the path extracted from the URL used to connect to the WebLogic Server.

  Returns:
    Path sent to WebLogic Server

### getQueryParams

    public java.util.Hashtable getQueryParams()

  Deprecated. Use the JNDI model and its accessors for information about the connection
  Returns a Hashtable of the query params extracted from the URL used to connect to the WebLogic Server. May be null.

  Returns:
    Query params sent to WebLogic Server

### getQueryParam

    public java.lang.String getQueryParam(java.lang.String key)

  Deprecated. Use the JNDI model and its accessors for information about the connection
  Returns the value of the named query param, or null if there was no value passed for that param.

  Returns:
    Value of the given query param

### isConnected

    public boolean isConnected()

  Deprecated. Use the JNDI model
  Returns true. With version 4.0, management of the supporting socket is handled automatically by the framework, and this class no longer has access to the socket's state.

### connect

    public T3Connection connect()
                         throws java.io.IOException,
                                T3Exception

  Deprecated. Use the JNDI model
  Returns the current T3Connection. The method signature still throws exceptions to make it backwards compatible.

  Returns:
    T3Connection
  Throws:
    java.io.IOException - if an IO error occurs
    T3Exception - if there is an error with the connect request

### disconnect

    public void disconnect()
                    throws java.io.IOException,
                           T3Exception

  Deprecated. Use the JNDI model
  Does absolutely nothing. The method signature still throws exceptions to make it backwards compatible.

  Throws:
    java.io.IOException - if an IO error occurs
    T3Exception - if there is an error with the disconnect request

### toString

    public java.lang.String toString()

  Deprecated. Information is no longer very useful
  Returns a string representation of the T3Connection, including the name of the host and the port to which it is connected.

  Overrides:
    toString in class java.lang.Object

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://www.weblogic.com/docs51
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD