|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.invocation.pooled.interfaces.PooledInvokerProxy
Client socket connections are pooled to avoid the overhead of making a connection. RMI seems to do a new connection with each request.
Nested Class Summary | |
protected static class |
PooledInvokerProxy.ClientSocket
|
Field Summary | |
protected ServerAddress |
address
connection information |
protected static HashMap |
connectionPools
|
static long |
deserializeTime
|
static long |
getSocketTime
|
static int |
MAX_RETRIES
Set number of retries in getSocket method |
protected int |
maxPoolSize
|
protected LinkedList |
pool
Pool for this invoker. |
static long |
readTime
|
static long |
serializeTime
|
protected static org.jboss.tm.TransactionPropagationContextFactory |
tpcFactory
Factory for transaction propagation contexts. |
static long |
usedPooled
|
static long |
writeTime
|
Fields inherited from interface org.jboss.invocation.Invoker |
ID |
Constructor Summary | |
PooledInvokerProxy()
Exposed for externalization. |
|
PooledInvokerProxy(ServerAddress sa,
int maxPoolSize)
Create a new Proxy. |
Method Summary | |
static void |
clearPool(ServerAddress sa)
Close all sockets in a specific pool. |
static void |
clearPools()
Close all sockets in all pools |
protected PooledInvokerProxy.ClientSocket |
getConnection()
|
protected PooledInvokerProxy.ClientSocket |
getPooledConnection()
|
String |
getServerHostName()
The name of of the server. |
Object |
getTransactionPropagationContext()
??? |
protected void |
initPool()
|
Object |
invoke(Invocation invocation)
The invocation on the delegate, calls the right invoker. |
void |
readExternal(ObjectInput in)
Un-externalize this instance. |
static void |
setTPCFactory(org.jboss.tm.TransactionPropagationContextFactory tpcf)
|
void |
writeExternal(ObjectOutput out)
Externalize this instance and handle obtaining the remoteInvoker stub |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static org.jboss.tm.TransactionPropagationContextFactory tpcFactory
public static long getSocketTime
public static long readTime
public static long writeTime
public static long serializeTime
public static long deserializeTime
public static long usedPooled
public static int MAX_RETRIES
protected static HashMap connectionPools
protected ServerAddress address
protected LinkedList pool
protected int maxPoolSize
Constructor Detail |
public PooledInvokerProxy()
public PooledInvokerProxy(ServerAddress sa, int maxPoolSize)
Method Detail |
public static void setTPCFactory(org.jboss.tm.TransactionPropagationContextFactory tpcf)
public static void clearPool(ServerAddress sa)
public static void clearPools()
protected void initPool()
protected PooledInvokerProxy.ClientSocket getConnection() throws Exception
Exception
protected PooledInvokerProxy.ClientSocket getPooledConnection()
public String getServerHostName() throws Exception
getServerHostName
in interface Invoker
Exception
public Object getTransactionPropagationContext() throws SystemException
null
if the transaction manager was never
set, or if no transaction is associated with the current thread.
SystemException
public Object invoke(Invocation invocation) throws Exception
invocation
- A pointer to the invocation object
Exception
- Failed to invoke method.public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |