org.clazzes.remoting.client
Interface ClientManager

All Superinterfaces:
javax.security.auth.Destroyable
All Known Implementing Classes:
ClientPool

public interface ClientManager
extends javax.security.auth.Destroyable

An interface, which is implemented by bean who are accounting client connections to a server.

Author:
wglas

Method Summary
 Client activateClient()
           
 void passivateClient(Client client)
           
 void start()
          Start the client pool after setting a relevant properties.
 
Methods inherited from interface javax.security.auth.Destroyable
destroy, isDestroyed
 

Method Detail

start

void start()
           throws java.io.IOException
Start the client pool after setting a relevant properties.

Throws:
java.io.IOException - Upon connection errors.

activateClient

Client activateClient()
                      throws java.util.concurrent.TimeoutException
Returns:
A client pulled from the pool.
Throws:
java.util.concurrent.TimeoutException - Upon connection errors or when the pool has no more clients available within a given timeout.

passivateClient

void passivateClient(Client client)
Parameters:
client - A client which previously has been pulled from the pool using activateClient() and may now be used by other consumers.


Copyright © 2010. All Rights Reserved.