org.jboss.remoting.transport.socket
Class SocketClientInvoker

java.lang.Object
  extended byorg.jboss.remoting.AbstractInvoker
      extended byorg.jboss.remoting.MicroRemoteClientInvoker
          extended byorg.jboss.remoting.RemoteClientInvoker
              extended byorg.jboss.remoting.transport.socket.MicroSocketClientInvoker
                  extended byorg.jboss.remoting.transport.socket.SocketClientInvoker
All Implemented Interfaces:
ClientInvoker, Invoker
Direct Known Subclasses:
MultiplexClientInvoker, SSLSocketClientInvoker

public class SocketClientInvoker
extends MicroSocketClientInvoker

SocketClientInvoker uses Sockets to remotely connect to the a remote ServerInvoker, which must be a SocketServerInvoker.

Version:
$Revision: 1.37 $
Author:
Jeff Haynie, Tom Elrod

Field Summary
static int SO_TIMEOUT_DEFAULT
          Default value for socket timeout is 30 minutes.
static java.lang.String SO_TIMEOUT_FLAG
           
protected  int timeout
           
 
Fields inherited from class org.jboss.remoting.transport.socket.MicroSocketClientInvoker
addr, address, CLIENT_SOCKET_CLASS_FLAG, clientSocketClass, clientSocketClassName, connectionPools, deserializeTime, enableTcpNoDelay, getSocketTime, MAX_CALL_RETRIES, MAX_POOL_SIZE, MAX_POOL_SIZE_FLAG, MAX_RETRIES, maxPoolSize, numberOfCallRetries, numberOfRetries, pool, port, readTime, serializeTime, shouldCheckConnection, TCP_NODELAY_DEFAULT, TCP_NODELAY_FLAG, usedPooled, usedPoolLock, writeTime
 
Fields inherited from class org.jboss.remoting.MicroRemoteClientInvoker
connected
 
Fields inherited from class org.jboss.remoting.AbstractInvoker
classbyteloader, configuration, localServerLocators, locator, log, serializationType, socketFactory, socketFactoryCreatedFromSSLParameters
 
Constructor Summary
SocketClientInvoker(InvokerLocator locator)
          Set number of retries in getSocket method
SocketClientInvoker(InvokerLocator locator, java.util.Map configuration)
           
 
Method Summary
protected  void configureParameters()
           
protected  SocketWrapper createClientSocket(java.net.Socket socket, int timeout, java.util.Map metadata)
          used for debugging (tracing) connections leaks
protected  ServerAddress createServerAddress()
           
protected  java.net.Socket createSocket(java.lang.String address, int port)
           
protected  SocketWrapper getPooledConnection()
           
 int getTimeout()
          Getter for property timeout
protected  java.lang.Object handleException(java.lang.Exception ex, SocketWrapper socketWrapper)
           
 
Methods inherited from class org.jboss.remoting.transport.socket.MicroSocketClientInvoker
checkingConnection, clearPool, clearPools, finalize, flushConnectionPool, getConnection, getDefaultDataType, getNumberOfCallRetries, getNumberOfRetries, getReuseAddress, getServerHostName, handleConnect, handleDisconnect, initPool, setNumberOfCallRetries, setNumberOfRetries, setReuseAddress, setup, transport
 
Methods inherited from class org.jboss.remoting.MicroRemoteClientInvoker
connect, disconnect, getMarshaller, getUnMarshaller, invoke, isConnected, postProcess, preProcess, setMarshaller, setUnMarshaller
 
Methods inherited from class org.jboss.remoting.AbstractInvoker
addClientLocator, createSocketFactory, getClassLoader, getClientLocator, getLocator, getSerializationType, getSocketFactory, isSocketFactoryCreatedFromSSLParameters, needsCustomSSLConfiguration, setClassLoader, setSerializationType, setSocketFactory
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.remoting.transport.ClientInvoker
addClientLocator, getClientLocator, getSocketFactory, setSocketFactory
 
Methods inherited from interface org.jboss.remoting.Invoker
getLocator
 

Field Detail

SO_TIMEOUT_FLAG

public static final java.lang.String SO_TIMEOUT_FLAG
See Also:
Constant Field Values

SO_TIMEOUT_DEFAULT

public static final int SO_TIMEOUT_DEFAULT
Default value for socket timeout is 30 minutes.

See Also:
Constant Field Values

timeout

protected int timeout
Constructor Detail

SocketClientInvoker

public SocketClientInvoker(InvokerLocator locator)
                    throws java.io.IOException
Set number of retries in getSocket method


SocketClientInvoker

public SocketClientInvoker(InvokerLocator locator,
                           java.util.Map configuration)
                    throws java.io.IOException
Method Detail

createServerAddress

protected ServerAddress createServerAddress()
Overrides:
createServerAddress in class MicroSocketClientInvoker

configureParameters

protected void configureParameters()
Overrides:
configureParameters in class MicroSocketClientInvoker

handleException

protected java.lang.Object handleException(java.lang.Exception ex,
                                           SocketWrapper socketWrapper)
                                    throws java.lang.ClassNotFoundException,
                                           java.rmi.MarshalException
Overrides:
handleException in class MicroSocketClientInvoker
Throws:
java.lang.ClassNotFoundException
java.rmi.MarshalException

createClientSocket

protected SocketWrapper createClientSocket(java.net.Socket socket,
                                           int timeout,
                                           java.util.Map metadata)
                                    throws java.lang.Exception
used for debugging (tracing) connections leaks

Overrides:
createClientSocket in class MicroSocketClientInvoker
Throws:
java.lang.Exception

createSocket

protected java.net.Socket createSocket(java.lang.String address,
                                       int port)
                                throws java.io.IOException
Overrides:
createSocket in class MicroSocketClientInvoker
Throws:
java.io.IOException

getPooledConnection

protected SocketWrapper getPooledConnection()
Overrides:
getPooledConnection in class MicroSocketClientInvoker

getTimeout

public int getTimeout()
Getter for property timeout

Returns:
Value of property timeout


Copyright © 1998-2005 JBoss Inc . All Rights Reserved.