org.sapia.ubik.rmi.server.transport.http
Class JdkClientConnectionPool

java.lang.Object
  extended by org.sapia.ubik.rmi.server.transport.http.JdkClientConnectionPool
All Implemented Interfaces:
Connections

public class JdkClientConnectionPool
extends java.lang.Object
implements Connections

This class implements the Connections interface over the JDK's HTTP support classes (URL, HttpURLConnection). It is a sub-optimal implementation used only if the Jakarta HTTP client classes are not in the classpath.

Author:
Yanick Duchesne
Copyright:
Copyright © 2002-2004 Sapia Open Source Software. All Rights Reserved.
License:
Read the license.txt file of the jar or visit the license page at the Sapia OSS web site

Constructor Summary
JdkClientConnectionPool(HttpAddress address)
           
JdkClientConnectionPool(java.lang.String transportType, Uri serverUri)
           
 
Method Summary
 RmiConnection acquire()
          Acquires a connection from this pool.
 void clear()
          Closes all connections kept internally and removes them.
 java.lang.String getTransportType()
          Returns the "transport type" of the connections held by this instance.
 void release(Connection conn)
          Releases the given connection to this pool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdkClientConnectionPool

public JdkClientConnectionPool(HttpAddress address)
                        throws UriSyntaxException
Parameters:
transportType - the "transport type" identifier.
address - the address of the target server.
Throws:
UriSyntaxException

JdkClientConnectionPool

public JdkClientConnectionPool(java.lang.String transportType,
                               Uri serverUri)
Parameters:
transportType - the "transport type" identifier.
serverUri - the address of the target server.
Method Detail

acquire

public RmiConnection acquire()
                      throws java.rmi.RemoteException
Description copied from interface: Connections
Acquires a connection from this pool.

Specified by:
acquire in interface Connections
Returns:
a Connection.
Throws:
java.rmi.RemoteException - if a problem occurs acquiring a connection.
See Also:
Connections.acquire()

clear

public void clear()
Description copied from interface: Connections
Closes all connections kept internally and removes them.

Specified by:
clear in interface Connections
See Also:
Connections.clear()

getTransportType

public java.lang.String getTransportType()
Description copied from interface: Connections
Returns the "transport type" of the connections held by this instance.

Specified by:
getTransportType in interface Connections
Returns:
a transport type.
See Also:
Connections.getTransportType()

release

public void release(Connection conn)
Description copied from interface: Connections
Releases the given connection to this pool.

Specified by:
release in interface Connections
See Also:
Connections.release(org.sapia.ubik.net.Connection)


Copyright © 2010 Sapia OSS. All Rights Reserved.