gr.uoa.di.madgik.commons.channel.proxy.tcp
Class OutletProtocol
java.lang.Object
java.lang.Thread
gr.uoa.di.madgik.commons.channel.proxy.tcp.OutletProtocol
- All Implemented Interfaces:
- Runnable, Observer
public class OutletProtocol
- extends Thread
- implements Observer
This class implements the synchronization protocol for the outlet nozzle sides of a channel.
- Author:
- gpapanikos
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
OutletProtocol
public OutletProtocol(Object synchThreadStart,
Socket clientSock,
String NozzleID,
String ChannelID,
ChannelState State)
- Instantiates a new outlet protocol. The instance is set as a daemon thread and is started
- Parameters:
synchThreadStart - the object the client should wait on until the thread is started and a notify is emittedclientSock - the socket the protocol should write and read synchronization infoNozzleID - the id of the nozzle this protocol is acting on behalf ofChannelID - the id of the channel the nozzle is interested inState - the state where to emit incoming events and register for outgoing events
Dispose
public void Dispose()
- Disposes the protocol state and unregisters from events
run
public void run()
- Specified by:
run in interface Runnable- Overrides:
run in class Thread
HasConnected
public Boolean HasConnected()
- Checks if the outlet is connected to the inlet channel
- Returns:
- whether or not the outlet is connected to the inlet channel
StillConnected
public Boolean StillConnected()
- Checks if the outlet is still connected to the inlet channel
- Returns:
- whether or not the outlet is still connected to the inlet channel
update
public void update(Observable o,
Object arg)
- Specified by:
update in interface Observer
Copyright © 2013. All Rights Reserved.