public class ClientServerHandler extends Object implements org.oiue.service.tcp.Handler
| Constructor and Description |
|---|
ClientServerHandler(org.oiue.service.tcp.TcpService tcpScript,
org.oiue.service.sql.SqlService sqlService) |
| Modifier and Type | Method and Description |
|---|---|
org.oiue.tools.sql.SQL |
AnalyzeSql(String sourceStr,
Map tb)
通过反射 将字段属性替换到Sql语句中(注意大小写)
|
void |
closed(org.oiue.service.tcp.Session session) |
int |
getReaderIdleCount() |
void |
idled(org.oiue.service.tcp.Session session) |
void |
opened(org.oiue.service.tcp.Session session) |
void |
received(org.oiue.service.tcp.Session session,
String line,
byte[] bytes) |
void |
sent(org.oiue.service.tcp.Session session) |
void |
setParameter(int column,
Object obj,
PreparedStatement pstmt)
参JDBCUtil实现 设置prepared的参数
|
void |
setQueryParams(Collection queryParams,
PreparedStatement pstmt)
根据参数值queryParams集合
|
public ClientServerHandler(org.oiue.service.tcp.TcpService tcpScript,
org.oiue.service.sql.SqlService sqlService)
public void received(org.oiue.service.tcp.Session session,
String line,
byte[] bytes)
throws Exception
received in interface org.oiue.service.tcp.HandlerExceptionpublic org.oiue.tools.sql.SQL AnalyzeSql(String sourceStr, Map tb)
sourceStr - tb - public void setParameter(int column,
Object obj,
PreparedStatement pstmt)
throws SQLException
column - 参数的标号obj - Object obj是参数值SQLExceptionpublic void setQueryParams(Collection queryParams, PreparedStatement pstmt) throws Exception
queryParams - Exceptionpublic void closed(org.oiue.service.tcp.Session session)
throws Exception
closed in interface org.oiue.service.tcp.HandlerExceptionpublic void opened(org.oiue.service.tcp.Session session)
throws Exception
opened in interface org.oiue.service.tcp.HandlerExceptionpublic void idled(org.oiue.service.tcp.Session session)
throws Exception
idled in interface org.oiue.service.tcp.HandlerExceptionpublic void sent(org.oiue.service.tcp.Session session)
throws Exception
sent in interface org.oiue.service.tcp.HandlerExceptionpublic int getReaderIdleCount()
getReaderIdleCount in interface org.oiue.service.tcp.HandlerCopyright © 2016. All rights reserved.