org.jboss.remoting.transport.bisocket
Class BisocketClientInvoker
java.lang.Object
org.jboss.remoting.AbstractInvoker
org.jboss.remoting.MicroRemoteClientInvoker
org.jboss.remoting.RemoteClientInvoker
org.jboss.remoting.transport.socket.MicroSocketClientInvoker
org.jboss.remoting.transport.socket.SocketClientInvoker
org.jboss.remoting.transport.bisocket.BisocketClientInvoker
- All Implemented Interfaces:
- Invoker, BidirectionalClientInvoker, ClientInvoker
- Direct Known Subclasses:
- SSLBisocketClientInvoker
public class BisocketClientInvoker
- extends SocketClientInvoker
- implements BidirectionalClientInvoker
The bisocket transport, an extension of the socket transport, is designed to allow
a callback server to function behind a firewall. All connections are created by
a Socket constructor or factory on the client side connecting to a ServerSocket on
the server side. When a callback client invoker on the server side needs to
open a connection to the callback server, it requests a connection by sending a
request message over a control connection to the client side.
Because all connections are created in one direction, the bisocket transport is
asymmetric, in the sense that client invokers and server invokers behave differently
on the client side and on the server side.
- Author:
- Ron Sigal
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, maxPoolSize, numberOfCallRetries, pool, port, readTime, semaphore, semaphores, serializeTime, shouldCheckConnection, TCP_NODELAY_DEFAULT, TCP_NODELAY_FLAG, usedPoolLock, WRAP_INTERRUPTED_EXCEPTION, wrapInterruptedException, writeTime |
Method Summary |
protected java.net.Socket |
createSocket(java.lang.String address,
int port,
int timeout)
|
InvokerLocator |
getCallbackLocator(java.util.Map metadata)
Gets the locator to be used for callbacks when want do not want
to establish a new physical connectiong from the server to the client. |
int |
getMaxRetries()
|
int |
getPingFrequency()
|
protected void |
handleConnect()
Subclasses must implement this method to provide a hook to connect to the remote server, if
this applies to the specific transport. |
protected void |
handleDisconnect()
Subclasses must implement this method to provide a hook to disconnect from the remote server,
if this applies to the specific transport. |
void |
setMaxRetries(int maxRetries)
|
void |
setPingFrequency(int pingFrequency)
|
protected java.lang.Object |
transport(java.lang.String sessionId,
java.lang.Object invocation,
java.util.Map metadata,
Marshaller marshaller,
UnMarshaller unmarshaller)
|
Methods inherited from class org.jboss.remoting.transport.socket.MicroSocketClientInvoker |
checkingConnection, clearPool, clearPools, disconnect, finalize, flushConnectionPool, getConnection, getDefaultDataType, getNumberOfAvailableConnections, getNumberOfCallRetries, getNumberOfUsedConnections, getReuseAddress, getServerHostName, initPool, isWrapInterruptedException, setNumberOfCallRetries, setReuseAddress, setup, setWrapInterruptedException |
Methods inherited from class org.jboss.remoting.MicroRemoteClientInvoker |
connect, establishLease, getLeasePeriod, getLeasePinger, getMarshaller, getSessionId, getUnMarshaller, init, invoke, isConnected, postProcess, preProcess, setMarshaller, setUnMarshaller, terminateLease, terminateLease |
Methods inherited from class org.jboss.remoting.AbstractInvoker |
addClientLocator, createSocketFactory, getClassLoader, getClientLocator, getClientLocators, getConfiguration, getLocator, getSerializationType, getSocketFactory, isCompleteSocketFactory, isSocketFactoryCreatedFromSSLParameters, needsCustomSSLConfiguration, setClassLoader, setSerializationType, setSocketFactory, wrapSocketFactory |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.jboss.remoting.transport.ClientInvoker |
addClientLocator, connect, disconnect, establishLease, getClientLocator, getClientLocators, getLeasePeriod, getMarshaller, getSocketFactory, getUnMarshaller, invoke, isConnected, setMarshaller, setSocketFactory, setUnMarshaller, terminateLease |
listenerId
protected java.lang.String listenerId
isCallbackInvoker
protected boolean isCallbackInvoker
pingFailed
protected org.jboss.remoting.transport.bisocket.BisocketClientInvoker.BooleanHolder pingFailed
BisocketClientInvoker
public BisocketClientInvoker(InvokerLocator locator)
throws java.io.IOException
- Throws:
java.io.IOException
BisocketClientInvoker
public BisocketClientInvoker(InvokerLocator locator,
java.util.Map config)
throws java.io.IOException
- Throws:
java.io.IOException
getMaxRetries
public int getMaxRetries()
setMaxRetries
public void setMaxRetries(int maxRetries)
getPingFrequency
public int getPingFrequency()
setPingFrequency
public void setPingFrequency(int pingFrequency)
handleConnect
protected void handleConnect()
throws ConnectionFailedException
- Description copied from class:
MicroRemoteClientInvoker
- Subclasses must implement this method to provide a hook to connect to the remote server, if
this applies to the specific transport. However, in some transport implementations, this may
not make must difference since the connection is not persistent among invocations, such as
SOAP. In these cases, the method should silently return without any processing.
- Overrides:
handleConnect
in class MicroSocketClientInvoker
- Throws:
ConnectionFailedException
handleDisconnect
protected void handleDisconnect()
- Description copied from class:
MicroRemoteClientInvoker
- Subclasses must implement this method to provide a hook to disconnect from the remote server,
if this applies to the specific transport. However, in some transport implementations, this
may not make must difference since the connection is not persistent among invocations, such as
SOAP. In these cases, the method should silently return without any processing.
- Overrides:
handleDisconnect
in class MicroSocketClientInvoker
transport
protected java.lang.Object transport(java.lang.String sessionId,
java.lang.Object invocation,
java.util.Map metadata,
Marshaller marshaller,
UnMarshaller unmarshaller)
throws java.io.IOException,
ConnectionFailedException,
java.lang.ClassNotFoundException
- Overrides:
transport
in class MicroSocketClientInvoker
- Throws:
java.io.IOException
ConnectionFailedException
java.lang.ClassNotFoundException
createSocket
protected java.net.Socket createSocket(java.lang.String address,
int port,
int timeout)
throws java.io.IOException
- Overrides:
createSocket
in class SocketClientInvoker
- Throws:
java.io.IOException
getCallbackLocator
public InvokerLocator getCallbackLocator(java.util.Map metadata)
- Description copied from interface:
BidirectionalClientInvoker
- Gets the locator to be used for callbacks when want do not want
to establish a new physical connectiong from the server to the client.
- Specified by:
getCallbackLocator
in interface BidirectionalClientInvoker
- Returns:
Copyright © 1998-2005 JBoss Inc . All Rights Reserved.