org.jdiameter.client.impl.transport
Class TransportLayerFactory

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

public class TransportLayerFactory
extends java.lang.Object
implements ITransportLayerFactory


Field Summary
protected  org.jdiameter.api.Configuration config
           
protected  java.lang.Class<IConnection> connectionClass
           
protected  java.lang.reflect.Constructor<IConnection> constructorIAi
           
protected  java.lang.reflect.Constructor<IConnection> constructorIAiCL
           
protected  IMessageParser parser
           
 
Constructor Summary
TransportLayerFactory(org.jdiameter.api.Configuration config, IMessageParser parser)
           
 
Method Summary
 IConnection createConnection(java.net.InetAddress inetAddress, int port, IConnectionListener listener, java.lang.String ref)
          Create new IConnection instance with predefined parameters
 IConnection createConnection(java.net.InetAddress inetAddress, int port, 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

connectionClass

protected java.lang.Class<IConnection> connectionClass

constructorIAi

protected java.lang.reflect.Constructor<IConnection> constructorIAi

constructorIAiCL

protected java.lang.reflect.Constructor<IConnection> constructorIAiCL

parser

protected IMessageParser parser

config

protected org.jdiameter.api.Configuration config
Constructor Detail

TransportLayerFactory

public TransportLayerFactory(org.jdiameter.api.Configuration config,
                             IMessageParser parser)
                      throws TransportException
Throws:
TransportException
Method Detail

createConnection

public IConnection createConnection(java.net.InetAddress inetAddress,
                                    int port,
                                    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:
inetAddress - destination host address
port - destination port address
ref - reference to additional parameters
Returns:
IConnection instance
Throws:
TransportException

createConnection

public IConnection createConnection(java.net.InetAddress inetAddress,
                                    int port,
                                    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:
inetAddress - destination host address
port - destination port address
listener - connection listener instance
ref - reference to additional parameters
Returns:
IConnection instance
Throws:
TransportException

isWrapperFor

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

unwrap

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


Copyright © 2008. All Rights Reserved.