org.jdiameter.client.impl.transport.tcp
Class TCPTransportClient

java.lang.Object
  extended by org.jdiameter.client.impl.transport.tcp.TCPTransportClient
All Implemented Interfaces:
java.lang.Runnable

public class TCPTransportClient
extends java.lang.Object
implements java.lang.Runnable

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

Field Summary
protected  java.nio.ByteBuffer buffer
           
protected  int bufferSize
           
static int DEFAULT_BUFFER_SIZE
           
static int DEFAULT_STORAGE_SIZE
           
protected  java.net.InetSocketAddress destAddress
           
protected  java.util.concurrent.locks.Lock lock
           
protected  java.net.InetSocketAddress origAddress
           
protected  java.lang.Thread selfThread
           
protected  java.nio.channels.SocketChannel socketChannel
           
protected  boolean stop
           
protected  java.nio.ByteBuffer storage
           
protected  int storageSize
           
 
Constructor Summary
TCPTransportClient()
           
 
Method Summary
 java.net.InetSocketAddress getDestAddress()
           
 java.net.InetSocketAddress getOrigAddress()
           
 TCPClientConnection getParent()
           
 void initialize()
          Network init socket
 void initialize(java.net.Socket socket)
           
 void release()
           
 void run()
           
 void sendMessage(java.nio.ByteBuffer bytes)
           
 void setDestAddress(java.net.InetSocketAddress address)
           
 void setOrigAddress(java.net.InetSocketAddress address)
           
 void start()
           
 void stop()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_BUFFER_SIZE

public static final int DEFAULT_BUFFER_SIZE
See Also:
Constant Field Values

DEFAULT_STORAGE_SIZE

public static final int DEFAULT_STORAGE_SIZE
See Also:
Constant Field Values

stop

protected boolean stop

selfThread

protected java.lang.Thread selfThread

bufferSize

protected int bufferSize

buffer

protected java.nio.ByteBuffer buffer

destAddress

protected java.net.InetSocketAddress destAddress

origAddress

protected java.net.InetSocketAddress origAddress

socketChannel

protected java.nio.channels.SocketChannel socketChannel

lock

protected java.util.concurrent.locks.Lock lock

storageSize

protected int storageSize

storage

protected java.nio.ByteBuffer storage
Constructor Detail

TCPTransportClient

public TCPTransportClient()
Method Detail

initialize

public void initialize()
                throws java.io.IOException,
                       NotInitializedException
Network init socket

Throws:
java.io.IOException
NotInitializedException

getParent

public TCPClientConnection getParent()

initialize

public void initialize(java.net.Socket socket)
                throws java.io.IOException,
                       NotInitializedException
Throws:
java.io.IOException
NotInitializedException

start

public void start()
           throws NotInitializedException
Throws:
NotInitializedException

run

public void run()
Specified by:
run in interface java.lang.Runnable

stop

public void stop()
          throws java.lang.Exception
Throws:
java.lang.Exception

release

public void release()
             throws java.lang.Exception
Throws:
java.lang.Exception

getDestAddress

public java.net.InetSocketAddress getDestAddress()

setDestAddress

public void setDestAddress(java.net.InetSocketAddress address)

setOrigAddress

public void setOrigAddress(java.net.InetSocketAddress address)

getOrigAddress

public java.net.InetSocketAddress getOrigAddress()

sendMessage

public void sendMessage(java.nio.ByteBuffer bytes)
                 throws java.io.IOException
Throws:
java.io.IOException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2014. All Rights Reserved.