Java Doc for TcpConnection.java in  » EJB-Server-resin-3.1.5 » resin » com » caucho » server » port » 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 » EJB Server resin 3.1.5 » resin » com.caucho.server.port 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.caucho.server.connection.Connection
      com.caucho.server.port.PortConnection
         com.caucho.server.port.TcpConnection

TcpConnection
public class TcpConnection extends PortConnection implements ThreadTask(Code)
A protocol-independent TcpConnection. TcpConnection controls the TCP Socket and provides buffered streams.

Each TcpConnection has its own thread.


Inner Class :class Admin extends AbstractManagedObject implements TcpConnectionMXBean


Constructor Summary
 TcpConnection(Port port, QSocket socket)
     Creates a new TcpConnection.

Method Summary
public  booleanallowKeepalive()
    
final public  voidbeginActive()
     Begins an active connection.
public  voidclearKeepalive()
     Sets the keepalive state.
protected  voidcloseControllerImpl()
     Closes the controller.
public  voidcloseOnShutdown()
     Closes on shutdown.
protected  StringdbgId()
    
final public  voiddestroy()
    
final public  voidendActive()
     Ends an active connection.
final  voidfree()
    
public  InetAddressgetLocalAddress()
     Returns the local address of the socket.
public  intgetLocalPort()
     Returns the socket's local TCP port.
public  StringgetName()
     Returns the object name for jmx.
public  InetAddressgetRemoteAddress()
     Returns the socket's remote address.
public  intgetRemoteAddress(byte[] buffer, int offset, int length)
     Adds from the socket's remote address.
public  StringgetRemoteHost()
     Returns the socket's remote host name.
public  intgetRemotePort()
    
final public  longgetRequestActiveTime()
     Returns the time the current request has taken.
public  QSocketgetSocket()
    
final public  StringgetState()
     Returns the state string.
public  longgetSuspendTime()
    
final public  longgetThreadId()
     Returns the thread id.
public  StringgetVirtualHost()
     Returns the virtual host.
public  voidinitSocket()
     Initialize the socket.
public  booleanisActive()
     Returns true for active.
public  booleanisClosed()
     Returns true for closed.
 booleanisComet()
    
public  booleanisSecure()
    
 booleanisWake()
    
public  voidrun()
     Runs as a task.
public  voidsendBroadcast(BroadcastTask task)
     Sends a broadcast request.
public  voidsetActive(boolean isActive)
     Set true for active.
public  voidsetKeepalive()
     Sets the keepalive state.
 voidsetResume()
    
final public  voidsetState(String state)
     Sets the state string.
 voidsetWake()
    
public  voidstart()
     Starts the connection.
public  QSocketstartSocket()
    
public  StringtoString()
    
protected  booleanwake()
     Wakes the connection (comet-style).


Constructor Detail
TcpConnection
TcpConnection(Port port, QSocket socket)(Code)
Creates a new TcpConnection.
Parameters:
  server - The TCP server controlling the connections
Parameters:
  request - The protocol Request




Method Detail
allowKeepalive
public boolean allowKeepalive()(Code)



beginActive
final public void beginActive()(Code)
Begins an active connection.



clearKeepalive
public void clearKeepalive()(Code)
Sets the keepalive state. Called only by the SelectManager and Port.



closeControllerImpl
protected void closeControllerImpl()(Code)
Closes the controller.



closeOnShutdown
public void closeOnShutdown()(Code)
Closes on shutdown.



dbgId
protected String dbgId()(Code)



destroy
final public void destroy()(Code)
Destroys the connection()



endActive
final public void endActive()(Code)
Ends an active connection.



free
final void free()(Code)
Frees the connection()



getLocalAddress
public InetAddress getLocalAddress()(Code)
Returns the local address of the socket.



getLocalPort
public int getLocalPort()(Code)
Returns the socket's local TCP port.



getName
public String getName()(Code)
Returns the object name for jmx.



getRemoteAddress
public InetAddress getRemoteAddress()(Code)
Returns the socket's remote address.



getRemoteAddress
public int getRemoteAddress(byte[] buffer, int offset, int length)(Code)
Adds from the socket's remote address.



getRemoteHost
public String getRemoteHost()(Code)
Returns the socket's remote host name.



getRemotePort
public int getRemotePort()(Code)
Returns the socket's remote port



getRequestActiveTime
final public long getRequestActiveTime()(Code)
Returns the time the current request has taken.



getSocket
public QSocket getSocket()(Code)
Returns the connection's socket



getState
final public String getState()(Code)
Returns the state string.



getSuspendTime
public long getSuspendTime()(Code)



getThreadId
final public long getThreadId()(Code)
Returns the thread id.



getVirtualHost
public String getVirtualHost()(Code)
Returns the virtual host.



initSocket
public void initSocket() throws IOException(Code)
Initialize the socket.



isActive
public boolean isActive()(Code)
Returns true for active.



isClosed
public boolean isClosed()(Code)
Returns true for closed.



isComet
boolean isComet()(Code)



isSecure
public boolean isSecure()(Code)



isWake
boolean isWake()(Code)



run
public void run()(Code)
Runs as a task.



sendBroadcast
public void sendBroadcast(BroadcastTask task)(Code)
Sends a broadcast request.



setActive
public void setActive(boolean isActive)(Code)
Set true for active.



setKeepalive
public void setKeepalive()(Code)
Sets the keepalive state. Called only by the SelectManager and Port.



setResume
void setResume()(Code)



setState
final public void setState(String state)(Code)
Sets the state string.



setWake
void setWake()(Code)



start
public void start()(Code)
Starts the connection.



startSocket
public QSocket startSocket()(Code)
Returns the connection's socket



toString
public String toString()(Code)



wake
protected boolean wake()(Code)
Wakes the connection (comet-style).



Methods inherited from com.caucho.server.port.PortConnection
public void close()(Code)(Java Doc)
public long getAccessTime()(Code)(Java Doc)
public int getId()(Code)(Java Doc)
abstract public InetAddress getLocalAddress()(Code)(Java Doc)
abstract public int getLocalPort()(Code)(Java Doc)
public Port getPort()(Code)(Java Doc)
abstract public InetAddress getRemoteAddress()(Code)(Java Doc)
abstract public int getRemotePort()(Code)(Java Doc)
final public ServerRequest getRequest()(Code)(Java Doc)
public SelectableChannel getSelectableChannel()(Code)(Java Doc)
public String getVirtualHost()(Code)(Java Doc)
public boolean isSecure()(Code)(Java Doc)
public void setAccessTime(long now)(Code)(Java Doc)
public void setPort(Port port)(Code)(Java Doc)
final public void setRequest(ServerRequest request)(Code)(Java Doc)

Fields inherited from com.caucho.server.connection.Connection
protected ConnectionController _controller(Code)(Java Doc)

Methods inherited from com.caucho.server.connection.Connection
protected void closeControllerImpl()(Code)(Java Doc)
public ConnectionController getController()(Code)(Java Doc)
abstract public int getId()(Code)(Java Doc)
abstract public InetAddress getLocalAddress()(Code)(Java Doc)
abstract public int getLocalPort()(Code)(Java Doc)
final public ReadStream getReadStream()(Code)(Java Doc)
abstract public InetAddress getRemoteAddress()(Code)(Java Doc)
public int getRemoteAddress(byte[] buffer, int offset, int length)(Code)(Java Doc)
public String getRemoteHost()(Code)(Java Doc)
abstract public int getRemotePort()(Code)(Java Doc)
public String getVirtualHost()(Code)(Java Doc)
final public WriteStream getWriteStream()(Code)(Java Doc)
public boolean isSecure()(Code)(Java Doc)
public void sendBroadcast(BroadcastTask task)(Code)(Java Doc)
protected boolean wake()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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