|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tubo.resource.baseimpl.BaseResourceImpl
org.tubo.resource.consumer.BaseConsumerImpl
org.tubo.resource.consumer.serversocket.ServerSocketConsumer
org.tubo.resource.consumer.serversocketlinereader.ServerSocketLineReaderConsumer
public class ServerSocketLineReaderConsumer
This class is a Consumer Component based on ServerSocket. When the connection is established on ServerSocketConsumerWorker this class call process(Socket) on ServerSocketConsumer which is overwited by this class. When a process(Socket) is call, streams are opened and delegate procesing to process(InputStream,OutputStream). In this method tree event are throw:
The method process(Socket) is override by this class,
Created: Oct 19, 2006, 6:12:44 PM
Last Modification Date: $Date: 2006-11-08 11:06:59 -0300 (Wed, 08 Nov 2006) $
| Field Summary | |
|---|---|
static java.lang.String |
GOODBYE_EVENT
|
static java.lang.String |
RCS_ID
|
static java.lang.String |
READ_LINE_EVENT
|
static java.lang.String |
SERVERSOCKET_LINE_READER_INPUT_PROPERTY
|
static java.lang.String |
SERVERSOCKET_LINE_READER_OUTPUT_PROPERTY
|
| Fields inherited from class org.tubo.resource.consumer.serversocket.ServerSocketConsumer |
|---|
NEW_CONNECTION_EVENT |
| Constructor Summary | |
|---|---|
ServerSocketLineReaderConsumer()
|
|
| Method Summary | |
|---|---|
protected Item |
createItem()
Override this method to create only one item. |
protected void |
postOriginFlowEvent(FlowContext flowContext)
Hook from consumer life cycle called after listener execution. |
protected void |
preOriginFlowEvent(FlowContext flowContext)
Hook from consumer life cycle called before listener execution. |
void |
process(java.io.InputStream is,
java.io.OutputStream os)
Streams Procesing. |
void |
process(java.net.Socket socket)
Override normal ServerSocketConsumer behavior. |
| Methods inherited from class org.tubo.resource.consumer.BaseConsumerImpl |
|---|
createEvent, createFlowContext, dispatchOriginFlowEvent, doConsumerLifeCycle, initializeEvent, initializeItem, setListener |
| Methods inherited from class org.tubo.resource.baseimpl.BaseResourceImpl |
|---|
getId, getProperties, getProperty, getResourceManager, setId, setProperties, setProperty, setResourceManager |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.tubo.resource.consumer.Consumer |
|---|
getId |
| Field Detail |
|---|
public static final java.lang.String RCS_ID
public static final java.lang.String SERVERSOCKET_LINE_READER_INPUT_PROPERTY
public static final java.lang.String SERVERSOCKET_LINE_READER_OUTPUT_PROPERTY
public static final java.lang.String READ_LINE_EVENT
public static final java.lang.String GOODBYE_EVENT
| Constructor Detail |
|---|
public ServerSocketLineReaderConsumer()
| Method Detail |
|---|
public void process(java.net.Socket socket)
throws TuboConsumerException
Override normal ServerSocketConsumer behavior. On this implementation obtains in and out streams. Delegate the stream procesing on other method.
process in class ServerSocketConsumersocket - A new socket open from client
TuboConsumerException - When geting InputStream or OutputStream from socket
public void process(java.io.InputStream is,
java.io.OutputStream os)
throws TuboConsumerException
Streams Procesing.
is - Socket inputos - Socket output
TuboConsumerExceptionprotected Item createItem()
createItem in class BaseConsumerImplprotected void preOriginFlowEvent(FlowContext flowContext)
preOriginFlowEvent in class BaseConsumerImplflowContext - The flowContextprotected void postOriginFlowEvent(FlowContext flowContext)
postOriginFlowEvent in class BaseConsumerImplflowContext - The item
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||