org.jdiameter.client.impl.transport
Class TransportLayerFactory

java.lang.Object
  extended by org.jdiameter.client.impl.transport.TransportLayerFactory
All Implemented Interfaces:
Wrapper, ITransportLayerFactory
Direct Known Subclasses:
TransportLayerFactory

public class TransportLayerFactory
extends java.lang.Object
implements ITransportLayerFactory

Author:
erick.svenson@yahoo.com, Bartosz Baranowski , Alexandre Mendonca

Field Summary
protected  Configuration config
           
protected  IMessageParser parser
           
 
Constructor Summary
TransportLayerFactory(Configuration config, IMessageParser parser)
           
 
Method Summary
 IConnection createConnection(java.net.InetAddress remoteAddress, IConcurrentFactory factory, int remotePort, java.net.InetAddress localAddress, int localPort, IConnectionListener listener, java.lang.String ref)
          Create new IConnection instance with predefined parameters
 IConnection createConnection(java.net.InetAddress remoteAddress, IConcurrentFactory factory, int remotePort, java.net.InetAddress localAddress, int localPort, java.lang.String ref)
          Create new IConnection instance with predefined parameters
 boolean isWrapperFor(java.lang.Class<?> aClass)
           
<T> T
unwrap(java.lang.Class<T> aClass)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parser

protected IMessageParser parser

config

protected Configuration config
Constructor Detail

TransportLayerFactory

public TransportLayerFactory(Configuration config,
                             IMessageParser parser)
                      throws TransportException
Throws:
TransportException
Method Detail

createConnection

public IConnection createConnection(java.net.InetAddress remoteAddress,
                                    IConcurrentFactory factory,
                                    int remotePort,
                                    java.net.InetAddress localAddress,
                                    int localPort,
                                    java.lang.String ref)
                             throws TransportException
Description copied from interface: ITransportLayerFactory
Create new IConnection instance with predefined parameters

Specified by:
createConnection in interface ITransportLayerFactory
Parameters:
remoteAddress - destination host address
factory - concurrent factory
remotePort - destination port address
localAddress - local network adapter address
localPort - local socket port
ref - reference to additional parameters
Returns:
IConnection instance
Throws:
TransportException

createConnection

public IConnection createConnection(java.net.InetAddress remoteAddress,
                                    IConcurrentFactory factory,
                                    int remotePort,
                                    java.net.InetAddress localAddress,
                                    int localPort,
                                    IConnectionListener listener,
                                    java.lang.String ref)
                             throws TransportException
Description copied from interface: ITransportLayerFactory
Create new IConnection instance with predefined parameters

Specified by:
createConnection in interface ITransportLayerFactory
Parameters:
remoteAddress - destination host address
factory - concurrent factory
remotePort - destination port address
localAddress - local network adapter address
localPort - local socket port
listener - connection listener instance
ref - reference to additional parameters
Returns:
IConnection instance
Throws:
TransportException

isWrapperFor

public boolean isWrapperFor(java.lang.Class<?> aClass)
                     throws InternalException
Specified by:
isWrapperFor in interface Wrapper
Throws:
InternalException

unwrap

public <T> T unwrap(java.lang.Class<T> aClass)
         throws InternalException
Specified by:
unwrap in interface Wrapper
Throws:
InternalException


Copyright © 2014. All Rights Reserved.