Java Doc for IoService.java in  » Net » mina-2.0.0-M1 » org » apache » mina » common » 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 » mina 2.0.0 M1 » org.apache.mina.common 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.mina.common.IoService

All known Subclasses:   org.apache.mina.common.AbstractIoService,
IoService
public interface IoService (Code)
Base interface for all IoAcceptor s and IoConnector s that provide I/O service and manage IoSession s.
author:
   The Apache MINA Project (dev@mina.apache.org)
version:
   $Rev: 606098 $, $Date: 2007-12-20 22:11:58 -0700 (Thu, 20 Dec 2007) $




Method Summary
 voidaddListener(IoServiceListener listener)
     Adds an IoServiceListener that listens any events related with this service.
 Set<WriteFuture>broadcast(Object message)
     Writes the specified message to all the IoSession s managed by this service.
 voiddispose()
     Releases any resources allocated by this service.
 longgetActivationTime()
     Returns the time when this service was activated.
 intgetBothIdleCount()
     Returns the number of the fired continuous serviceIdle events for IdleStatus.BOTH_IDLE .
 intgetBothIdleTime()
     Returns idle time for IdleStatus.BOTH_IDLE in seconds.
 longgetBothIdleTimeInMillis()
     Returns idle time for IdleStatus.BOTH_IDLE in milliseconds.
 longgetCumulativeManagedSessionCount()
     Returns the cumulative number of sessions which were managed (or are being managed) by this service, which means 'currently managed session count + closed session count'.
 DefaultIoFilterChainBuildergetFilterChain()
     A shortcut for ( ( DefaultIoFilterChainBuilder ) IoService.getFilterChainBuilder() ). Please note that the returned object is not a real IoFilterChain but a DefaultIoFilterChainBuilder .
 IoFilterChainBuildergetFilterChainBuilder()
     Returns the IoFilterChainBuilder which will build the IoFilterChain of all IoSession s which is created by this service.
 IoHandlergetHandler()
     Returns the handler which will handle all connections managed by this service.
 intgetIdleCount(IdleStatus status)
     Returns the number of the fired continuous serviceIdle events for the specified IdleStatus .

If serviceIdle event is fired first after some time after I/O, idleCount becomes 1.

 intgetIdleTime(IdleStatus status)
     Returns idle time for the specified type of idleness in seconds.
 longgetIdleTimeInMillis(IdleStatus status)
     Returns idle time for the specified type of idleness in milliseconds.
 intgetLargestManagedSessionCount()
     Returns the maximum number of sessions which were being managed at the same time.
 doublegetLargestReadBytesThroughput()
     Returns the maximum of the IoService.getReadBytesThroughput() readBytesThroughput .
 doublegetLargestReadMessagesThroughput()
     Returns the maximum of the IoService.getReadMessagesThroughput() readMessagesThroughput .
 doublegetLargestWrittenBytesThroughput()
     Returns the maximum of the IoService.getWrittenBytesThroughput() writtenBytesThroughput .
 doublegetLargestWrittenMessagesThroughput()
     Returns the maximum of the IoService.getWrittenMessagesThroughput() writtenMessagesThroughput .
 longgetLastBothIdleTime()
     Returns the time in milliseconds when the last serviceIdle event is fired for IdleStatus.BOTH_IDLE .
 longgetLastIdleTime(IdleStatus status)
     Returns the time in milliseconds when the last serviceIdle event is fired for the specified IdleStatus .
 longgetLastIoTime()
     Returns the time in millis when I/O occurred lastly.
 longgetLastReadTime()
     Returns the time in millis when read operation occurred lastly.
 longgetLastReaderIdleTime()
     Returns the time in milliseconds when the last serviceIdle event is fired for IdleStatus.READER_IDLE .
 longgetLastWriteTime()
     Returns the time in millis when write operation occurred lastly.
 longgetLastWriterIdleTime()
     Returns the time in milliseconds when the last serviceIdle event is fired for IdleStatus.WRITER_IDLE .
 intgetManagedSessionCount()
     Returns the number of all sessions which are currently managed by this service.
 Set<IoSession>getManagedSessions()
     Returns all sessions which are currently managed by this service. the sessions.
 longgetReadBytes()
    
 doublegetReadBytesThroughput()
     Returns the number of read bytes per second.
 longgetReadMessages()
    
 doublegetReadMessagesThroughput()
     Returns the number of read messages per second.
 intgetReaderIdleCount()
     Returns the number of the fired continuous serviceIdle events for IdleStatus.READER_IDLE .
 intgetReaderIdleTime()
     Returns idle time for IdleStatus.READER_IDLE in seconds.
 longgetReaderIdleTimeInMillis()
     Returns idle time for IdleStatus.READER_IDLE in milliseconds.
 longgetScheduledWriteBytes()
    
 longgetScheduledWriteMessages()
    
 IoSessionConfiggetSessionConfig()
     Returns the default configuration of the new IoSession s created by this service.
 IoSessionDataStructureFactorygetSessionDataStructureFactory()
     Returns the IoSessionDataStructureFactory that provides related data structures for a new session created by this service.
 intgetThroughputCalculationInterval()
     Returns the interval (seconds) between each throughput calculation.
 longgetThroughputCalculationIntervalInMillis()
     Returns the interval (milliseconds) between each throughput calculation.
 TransportMetadatagetTransportMetadata()
     Returns the TransportMetadata that this service runs on.
 intgetWriterIdleCount()
     Returns the number of the fired continuous serviceIdle events for IdleStatus.WRITER_IDLE .
 intgetWriterIdleTime()
     Returns idle time for IdleStatus.WRITER_IDLE in seconds.
 longgetWriterIdleTimeInMillis()
     Returns idle time for IdleStatus.WRITER_IDLE in milliseconds.
 longgetWrittenBytes()
    
 doublegetWrittenBytesThroughput()
     Returns the number of written bytes per second.
 longgetWrittenMessages()
    
 doublegetWrittenMessagesThroughput()
     Returns the number of written messages per second.
 booleanisActive()
    
 booleanisBothIdle()
     Returns true if this service is IdleStatus.BOTH_IDLE .
 booleanisDisposed()
     Returns true if and if only all resources of this processor have been disposed.
 booleanisDisposing()
     Returns true if and if only IoService.dispose() method has been called.
 booleanisIdle(IdleStatus status)
     Returns true if this service is idle for the specified IdleStatus .
 booleanisReaderIdle()
     Returns true if this service is IdleStatus.READER_IDLE .
 booleanisWriterIdle()
     Returns true if this service is IdleStatus.WRITER_IDLE .
 voidremoveListener(IoServiceListener listener)
     Removed an existing IoServiceListener that listens any events related with this service.
 voidsetBothIdleTime(int idleTime)
     Sets idle time for IdleStatus.WRITER_IDLE in seconds.
 voidsetFilterChainBuilder(IoFilterChainBuilder builder)
     Sets the IoFilterChainBuilder which will build the IoFilterChain of all IoSession s which is created by this service.
 voidsetHandler(IoHandler handler)
     Sets the handler which will handle all connections managed by this service.
 voidsetIdleTime(IdleStatus status, int idleTime)
     Sets idle time for the specified type of idleness in seconds.
 voidsetReaderIdleTime(int idleTime)
     Sets idle time for IdleStatus.READER_IDLE in seconds.
 voidsetSessionDataStructureFactory(IoSessionDataStructureFactory sessionDataStructureFactory)
     Sets the IoSessionDataStructureFactory that provides related data structures for a new session created by this service.
 voidsetThroughputCalculationInterval(int throughputCalculationInterval)
     Sets the interval (seconds) between each throughput calculation.
 voidsetWriterIdleTime(int idleTime)
     Sets idle time for IdleStatus.WRITER_IDLE in seconds.



Method Detail
addListener
void addListener(IoServiceListener listener)(Code)
Adds an IoServiceListener that listens any events related with this service.



broadcast
Set<WriteFuture> broadcast(Object message)(Code)
Writes the specified message to all the IoSession s managed by this service. This method is a convenience shortcut for IoUtil.broadcast(ObjectCollection) .



dispose
void dispose()(Code)
Releases any resources allocated by this service. Please note that this method might block as long as there are any sessions managed by this service.



getActivationTime
long getActivationTime()(Code)
Returns the time when this service was activated. It returns the last time when this service was activated if the service is not active now. The time by using System.currentTimeMillis



getBothIdleCount
int getBothIdleCount()(Code)
Returns the number of the fired continuous serviceIdle events for IdleStatus.BOTH_IDLE .
See Also:   IoService.getIdleCount(IdleStatus)



getBothIdleTime
int getBothIdleTime()(Code)
Returns idle time for IdleStatus.BOTH_IDLE in seconds.



getBothIdleTimeInMillis
long getBothIdleTimeInMillis()(Code)
Returns idle time for IdleStatus.BOTH_IDLE in milliseconds.



getCumulativeManagedSessionCount
long getCumulativeManagedSessionCount()(Code)
Returns the cumulative number of sessions which were managed (or are being managed) by this service, which means 'currently managed session count + closed session count'.



getFilterChain
DefaultIoFilterChainBuilder getFilterChain()(Code)
A shortcut for ( ( DefaultIoFilterChainBuilder ) IoService.getFilterChainBuilder() ). Please note that the returned object is not a real IoFilterChain but a DefaultIoFilterChainBuilder . Modifying the returned builder won't affect the existing IoSession s at all, because IoFilterChainBuilder s affect only newly created IoSession s.
throws:
  IllegalStateException - if the current IoFilterChainBuilder isnot a DefaultIoFilterChainBuilder



getFilterChainBuilder
IoFilterChainBuilder getFilterChainBuilder()(Code)
Returns the IoFilterChainBuilder which will build the IoFilterChain of all IoSession s which is created by this service. The default value is an empty DefaultIoFilterChainBuilder .



getHandler
IoHandler getHandler()(Code)
Returns the handler which will handle all connections managed by this service.



getIdleCount
int getIdleCount(IdleStatus status)(Code)
Returns the number of the fired continuous serviceIdle events for the specified IdleStatus .

If serviceIdle event is fired first after some time after I/O, idleCount becomes 1. idleCount resets to 0 if any I/O occurs again, otherwise it increases to 2 and so on if serviceIdle event is fired again without any I/O between two (or more) serviceIdle events.




getIdleTime
int getIdleTime(IdleStatus status)(Code)
Returns idle time for the specified type of idleness in seconds.



getIdleTimeInMillis
long getIdleTimeInMillis(IdleStatus status)(Code)
Returns idle time for the specified type of idleness in milliseconds.



getLargestManagedSessionCount
int getLargestManagedSessionCount()(Code)
Returns the maximum number of sessions which were being managed at the same time.



getLargestReadBytesThroughput
double getLargestReadBytesThroughput()(Code)
Returns the maximum of the IoService.getReadBytesThroughput() readBytesThroughput .



getLargestReadMessagesThroughput
double getLargestReadMessagesThroughput()(Code)
Returns the maximum of the IoService.getReadMessagesThroughput() readMessagesThroughput .



getLargestWrittenBytesThroughput
double getLargestWrittenBytesThroughput()(Code)
Returns the maximum of the IoService.getWrittenBytesThroughput() writtenBytesThroughput .



getLargestWrittenMessagesThroughput
double getLargestWrittenMessagesThroughput()(Code)
Returns the maximum of the IoService.getWrittenMessagesThroughput() writtenMessagesThroughput .



getLastBothIdleTime
long getLastBothIdleTime()(Code)
Returns the time in milliseconds when the last serviceIdle event is fired for IdleStatus.BOTH_IDLE .
See Also:   IoService.getLastIdleTime(IdleStatus)



getLastIdleTime
long getLastIdleTime(IdleStatus status)(Code)
Returns the time in milliseconds when the last serviceIdle event is fired for the specified IdleStatus .



getLastIoTime
long getLastIoTime()(Code)
Returns the time in millis when I/O occurred lastly.



getLastReadTime
long getLastReadTime()(Code)
Returns the time in millis when read operation occurred lastly.



getLastReaderIdleTime
long getLastReaderIdleTime()(Code)
Returns the time in milliseconds when the last serviceIdle event is fired for IdleStatus.READER_IDLE .
See Also:   IoService.getLastIdleTime(IdleStatus)



getLastWriteTime
long getLastWriteTime()(Code)
Returns the time in millis when write operation occurred lastly.



getLastWriterIdleTime
long getLastWriterIdleTime()(Code)
Returns the time in milliseconds when the last serviceIdle event is fired for IdleStatus.WRITER_IDLE .
See Also:   IoService.getLastIdleTime(IdleStatus)



getManagedSessionCount
int getManagedSessionCount()(Code)
Returns the number of all sessions which are currently managed by this service.



getManagedSessions
Set<IoSession> getManagedSessions()(Code)
Returns all sessions which are currently managed by this service. the sessions. An empty collection if there's no session.



getReadBytes
long getReadBytes()(Code)
Returns the number of bytes read by this service The number of bytes this service has read



getReadBytesThroughput
double getReadBytesThroughput()(Code)
Returns the number of read bytes per second.



getReadMessages
long getReadMessages()(Code)
Returns the number of messages this services has read The number of messages this services has read



getReadMessagesThroughput
double getReadMessagesThroughput()(Code)
Returns the number of read messages per second.



getReaderIdleCount
int getReaderIdleCount()(Code)
Returns the number of the fired continuous serviceIdle events for IdleStatus.READER_IDLE .
See Also:   IoService.getIdleCount(IdleStatus)



getReaderIdleTime
int getReaderIdleTime()(Code)
Returns idle time for IdleStatus.READER_IDLE in seconds.



getReaderIdleTimeInMillis
long getReaderIdleTimeInMillis()(Code)
Returns idle time for IdleStatus.READER_IDLE in milliseconds.



getScheduledWriteBytes
long getScheduledWriteBytes()(Code)
Returns the number of bytes scheduled to be written The number of bytes scheduled to be written



getScheduledWriteMessages
long getScheduledWriteMessages()(Code)
Returns the number of messages scheduled to be written The number of messages scheduled to be written



getSessionConfig
IoSessionConfig getSessionConfig()(Code)
Returns the default configuration of the new IoSession s created by this service.



getSessionDataStructureFactory
IoSessionDataStructureFactory getSessionDataStructureFactory()(Code)
Returns the IoSessionDataStructureFactory that provides related data structures for a new session created by this service.



getThroughputCalculationInterval
int getThroughputCalculationInterval()(Code)
Returns the interval (seconds) between each throughput calculation. The default value is 3 seconds.



getThroughputCalculationIntervalInMillis
long getThroughputCalculationIntervalInMillis()(Code)
Returns the interval (milliseconds) between each throughput calculation. The default value is 3 seconds.



getTransportMetadata
TransportMetadata getTransportMetadata()(Code)
Returns the TransportMetadata that this service runs on.



getWriterIdleCount
int getWriterIdleCount()(Code)
Returns the number of the fired continuous serviceIdle events for IdleStatus.WRITER_IDLE .
See Also:   IoService.getIdleCount(IdleStatus)



getWriterIdleTime
int getWriterIdleTime()(Code)
Returns idle time for IdleStatus.WRITER_IDLE in seconds.



getWriterIdleTimeInMillis
long getWriterIdleTimeInMillis()(Code)
Returns idle time for IdleStatus.WRITER_IDLE in milliseconds.



getWrittenBytes
long getWrittenBytes()(Code)
Returns the number of bytes written out by this service The number of bytes this service has written



getWrittenBytesThroughput
double getWrittenBytesThroughput()(Code)
Returns the number of written bytes per second.



getWrittenMessages
long getWrittenMessages()(Code)
Returns the number of messages this service has written The number of messages this service has written



getWrittenMessagesThroughput
double getWrittenMessagesThroughput()(Code)
Returns the number of written messages per second.



isActive
boolean isActive()(Code)
Returns a value of whether or not this service is active whether of not the service is active.



isBothIdle
boolean isBothIdle()(Code)
Returns true if this service is IdleStatus.BOTH_IDLE .
See Also:   IoService.isIdle(IdleStatus)



isDisposed
boolean isDisposed()(Code)
Returns true if and if only all resources of this processor have been disposed.



isDisposing
boolean isDisposing()(Code)
Returns true if and if only IoService.dispose() method has been called. Please note that this method will return true even after all the related resources are released.



isIdle
boolean isIdle(IdleStatus status)(Code)
Returns true if this service is idle for the specified IdleStatus .



isReaderIdle
boolean isReaderIdle()(Code)
Returns true if this service is IdleStatus.READER_IDLE .
See Also:   IoService.isIdle(IdleStatus)



isWriterIdle
boolean isWriterIdle()(Code)
Returns true if this service is IdleStatus.WRITER_IDLE .
See Also:   IoService.isIdle(IdleStatus)



removeListener
void removeListener(IoServiceListener listener)(Code)
Removed an existing IoServiceListener that listens any events related with this service.



setBothIdleTime
void setBothIdleTime(int idleTime)(Code)
Sets idle time for IdleStatus.WRITER_IDLE in seconds.



setFilterChainBuilder
void setFilterChainBuilder(IoFilterChainBuilder builder)(Code)
Sets the IoFilterChainBuilder which will build the IoFilterChain of all IoSession s which is created by this service. If you specify null this property will be set to an empty DefaultIoFilterChainBuilder .



setHandler
void setHandler(IoHandler handler)(Code)
Sets the handler which will handle all connections managed by this service.



setIdleTime
void setIdleTime(IdleStatus status, int idleTime)(Code)
Sets idle time for the specified type of idleness in seconds.



setReaderIdleTime
void setReaderIdleTime(int idleTime)(Code)
Sets idle time for IdleStatus.READER_IDLE in seconds.



setSessionDataStructureFactory
void setSessionDataStructureFactory(IoSessionDataStructureFactory sessionDataStructureFactory)(Code)
Sets the IoSessionDataStructureFactory that provides related data structures for a new session created by this service.



setThroughputCalculationInterval
void setThroughputCalculationInterval(int throughputCalculationInterval)(Code)
Sets the interval (seconds) between each throughput calculation. The default value is 3 seconds.



setWriterIdleTime
void setWriterIdleTime(int idleTime)(Code)
Sets idle time for IdleStatus.WRITER_IDLE in seconds.



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