Package com.gigaspaces.lrmi.nio
Class ChannelEntry
java.lang.Object
com.gigaspaces.lrmi.nio.ChannelEntry
- All Implemented Interfaces:
IWriteInterestManager
A Channel Entry is an entry in the Pivot Channels Table.
- Since:
- 4.0
- Author:
- Igor Goldenberg
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionChannelEntry(WriteSelectorThread writeSelectorThread, ReadSelectorThread readSelectorThread, SelectionKey selectionKey, InetSocketAddress clientEndPointAddress, Pivot pivot) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()longlonglonglonglonglongbooleanvoidmonitorActivity(String trackingId) voidbooleanvoidremoveWriteInterest(boolean restoreReadInterest) voidvoidvoidsetOwnerRemoteObjID(long remoteObjID) Set the remote objectID this ChannelEntry belongs to.voidsetSourceDetails(PlatformLogicalVersion logicalVersion, long pid) voidunmarshall(MarshalInputStream stream) voidwriteReply(ReplyPacket packet, boolean reuseBuffer, Writer.Context ctx, String monitoringId)
-
Field Details
-
_writer
-
_reader
-
_writeSelectionKey
-
_connectionID
public final long _connectionIDthe unique connection ID identifier
-
-
Constructor Details
-
ChannelEntry
public ChannelEntry(WriteSelectorThread writeSelectorThread, ReadSelectorThread readSelectorThread, SelectionKey selectionKey, InetSocketAddress clientEndPointAddress, Pivot pivot) Constructor.- Parameters:
selectionKey- a token representing the registration of aSelectableChannelwith aSelector.clientEndPointAddress- the - The address of the connecting LRMI client.
-
-
Method Details
-
readRequest
-
unmarshall
-
setOwnerRemoteObjID
public void setOwnerRemoteObjID(long remoteObjID) Set the remote objectID this ChannelEntry belongs to. -
getClientEndPointAddress
- Returns:
- the end point of the connected SocketChannel.
-
writeReply
public void writeReply(ReplyPacket packet, boolean reuseBuffer, Writer.Context ctx, String monitoringId) -
removeWriteInterest
public void removeWriteInterest(boolean restoreReadInterest) - Specified by:
removeWriteInterestin interfaceIWriteInterestManager
-
setWriteInterest
public void setWriteInterest()- Specified by:
setWriteInterestin interfaceIWriteInterestManager
-
getRemoteObjID
public long getRemoteObjID()- Returns:
- the remoteObjectID this ChannelEntry belongs to.
-
getConnectionTimeStamp
public long getConnectionTimeStamp()- Returns:
- the timeStamp where client connected to the server
-
getConnectionID
public long getConnectionID()- Returns:
- the unique connection ID identifier
-
returnSocket
public void returnSocket() -
onWriteEvent
public void onWriteEvent() -
close
- Throws:
IOException
-
setSourceDetails
-
getSourcePlatformLogicalVersion
-
getSourcePid
public long getSourcePid() -
getGeneratedTraffic
public long getGeneratedTraffic() -
getReceivedTraffic
public long getReceivedTraffic() -
getRemoteClassProvider
-
getSocketChannel
-
getReadSelectionKey
-
isProtocolValidated
public boolean isProtocolValidated() -
readProtocolValidationHeader
-
monitorActivity
-
getMonitoringModule
-
getChannelState
-
setChannelState
-
getWriteExecutionPhaseListener
-