Platform SDK Java 8.5 API Reference

com.genesyslab.platform.commons.protocol
Class ChannelClosedEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.genesyslab.platform.commons.protocol.ChannelErrorEvent
          extended by com.genesyslab.platform.commons.protocol.ChannelClosedEvent
All Implemented Interfaces:
java.io.Serializable

public class ChannelClosedEvent
extends ChannelErrorEvent

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.genesyslab.platform.commons.protocol.ChannelErrorEvent
cause
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ChannelClosedEvent(Channel source)
          Constructs an Event.
ChannelClosedEvent(Channel source, ConnectionClosedEvent ccEvent, ChannelState prevState)
          Constructs an Event.
ChannelClosedEvent(Channel source, java.lang.Throwable cause, ChannelState prevState)
          Constructs an event about closed channel.
ChannelClosedEvent(Channel source, java.lang.Throwable cause, ChannelState prevState, Endpoint endpoint)
          Constructs an event about closed channel.
 
Method Summary
 Endpoint getEndpoint()
          Gets the event's endpoint.
 ChannelState getPreviousChannelState()
          Return channel state before close operation triggered.
 long getUnsentBytes()
          Gets amount of unsent bytes.
 boolean hasUnsentBytes()
          Checks if some unsent bytes have been ramained.
 java.lang.String toString()
           
 
Methods inherited from class com.genesyslab.platform.commons.protocol.ChannelErrorEvent
getCause
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ChannelClosedEvent

public ChannelClosedEvent(Channel source)
Constructs an Event.

Parameters:
source - The object on which the Event initially occurred.

ChannelClosedEvent

public ChannelClosedEvent(Channel source,
                          java.lang.Throwable cause,
                          ChannelState prevState,
                          Endpoint endpoint)
Constructs an event about closed channel. The source of the event is channel itself.

Parameters:
source - The object on which the Event initially occurred.
cause - The cause of emergency disconnection.
prevState - previous state of channel
endpoint - of the event.

ChannelClosedEvent

public ChannelClosedEvent(Channel source,
                          java.lang.Throwable cause,
                          ChannelState prevState)
Constructs an event about closed channel. The source of the event is channel itself.

Parameters:
source - The object on which the Event initially occurred.
cause - The cause of emergency disconnection.
prevState - previous state of channel

ChannelClosedEvent

public ChannelClosedEvent(Channel source,
                          ConnectionClosedEvent ccEvent,
                          ChannelState prevState)
Constructs an Event.

Parameters:
source - The object on which the Event initially occurred.
ccEvent - connection layer event about closed connection
prevState - previous state of channel
Method Detail

getPreviousChannelState

public ChannelState getPreviousChannelState()
Return channel state before close operation triggered.

Returns:
previous channel state

toString

public java.lang.String toString()
Overrides:
toString in class ChannelErrorEvent

hasUnsentBytes

public boolean hasUnsentBytes()
Checks if some unsent bytes have been ramained.

Returns:
true if some unsent bytes have been ramained.

getUnsentBytes

public long getUnsentBytes()
Gets amount of unsent bytes.

Returns:
amount of unsent bytes.

getEndpoint

public Endpoint getEndpoint()
Gets the event's endpoint.

Returns:
the event's endpoint.

Platform SDK Java 8.5 API Reference

Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 8.5.302.00
Copyright © 2006–2017 Genesys Telecommunications Laboratories, Inc. All rights reserved.