org.mule.transport.tcp
Class TcpSocketKey

java.lang.Object
  extended by org.mule.transport.tcp.TcpSocketKey

public class TcpSocketKey
extends java.lang.Object

This is used to adapt an endpoint so that it can be used as a key for sockets. It must meet two requirements: (1) implement hash and equals in a way that reflects socket identity (ie using address and port); (2) allow access to the endpoint for use in the socket factory. For simplicity we also expose the connector, address and port directly.


Constructor Summary
TcpSocketKey(ImmutableEndpoint endpoint)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 TcpConnector getConnector()
           
 ImmutableEndpoint getEndpoint()
           
 java.net.InetAddress getInetAddress()
           
 int getPort()
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TcpSocketKey

public TcpSocketKey(ImmutableEndpoint endpoint)
Method Detail

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getEndpoint

public ImmutableEndpoint getEndpoint()

getConnector

public TcpConnector getConnector()

getInetAddress

public java.net.InetAddress getInetAddress()

getPort

public int getPort()

toString

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


Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.