Java Doc for TCConnection.java in  » Net » Terracotta » com » tc » net » core » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Net » Terracotta » com.tc.net.core 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.tc.net.core.TCConnection

All known Subclasses:   com.tc.net.core.TCConnectionJDK14,  com.tc.net.core.MockTCConnection,  com.tc.net.core.TestTCConnection,
TCConnection
public interface TCConnection extends NetworkMessageSink(Code)
Common interface for TC network connections
author:
   teck




Method Summary
public  voidaddListener(TCConnectionEventListener listener)
     Add the given connection event listener.
public  voidasynchClose()
     Close this connection.
public  booleanasynchConnect(TCSocketAddress addr)
    
public  booleanclose(long timeout)
    
public  voidconnect(TCSocketAddress addr, int timeout)
     Connect synchronously to a given destination.
public  Socketdetach()
    
public  longgetConnectTime()
     Returns a long timestamp as reported by Sytem.currentTimeMillis() when this connection was connected.
public  longgetIdleTime()
     Returns a long representing the number of milliseconds this connection has been idle (ie.
public  TCSocketAddressgetLocalAddress()
    
public  TCSocketAddressgetRemoteAddress()
    
public  booleanisClosed()
    
public  booleanisConnected()
    
public  voidremoveListener(TCConnectionEventListener listener)
     Remove the given event listener.



Method Detail
addListener
public void addListener(TCConnectionEventListener listener)(Code)
Add the given connection event listener. Re-adding an existing listener will have no effect (ie. the listener will not be in the list twice).
Parameters:
  listener - listener to add



asynchClose
public void asynchClose()(Code)
Close this connection. The actual close happens asynchronously to this call.



asynchConnect
public boolean asynchConnect(TCSocketAddress addr) throws IOException(Code)
Connect asynchronously to the given destination address
Parameters:
  addr - the destination address to connect to true if the connection was opened immediately, otherwise false (NOTE: return value of "false" this NOT anindication of error)
throws:
  IOException - if there is an error connecting to the destination



close
public boolean close(long timeout)(Code)
Close this connection, blocking for at most the given timeout value true/false whether the connection closed in time



connect
public void connect(TCSocketAddress addr, int timeout) throws IOException, TCTimeoutException(Code)
Connect synchronously to a given destination. If this call fails, connect called be called again. However once a connection has successfully connected once, it cannot be re-connected
Parameters:
  addr - the destination address
Parameters:
  timeout - time in milliseconds to wait before throwing a timeout exception
throws:
  IOException - if there is an error connecting to the destination address
throws:
  TCTimeoutException - if a timeout occurs



detach
public Socket detach() throws IOException(Code)
Detatch this connection from it's connection manager
throws:
  IOException -



getConnectTime
public long getConnectTime()(Code)
Returns a long timestamp as reported by Sytem.currentTimeMillis() when this connection was connected. If connect() has never been called, the return value is undefined



getIdleTime
public long getIdleTime()(Code)
Returns a long representing the number of milliseconds this connection has been idle (ie. not data sent or received)



getLocalAddress
public TCSocketAddress getLocalAddress()(Code)
Get local side connection details
throws:
  IllegalStateException - if connection has never been connected



getRemoteAddress
public TCSocketAddress getRemoteAddress()(Code)
Get remote side connection details
throws:
  IllegalStateException - if connection has never been connected



isClosed
public boolean isClosed()(Code)
Whether or not this connection is closed true iff this connection is closed



isConnected
public boolean isConnected()(Code)
Whether or not this connection is connected true iff this connection is connected to the destination address



removeListener
public void removeListener(TCConnectionEventListener listener)(Code)
Remove the given event listener. Attempting to remove a listener that is not currently in the listeners set has not effect



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.