C# Class Brunet.Security.Transport.WrapperEdgeListener

Wraps the underlying EdgeListener by listening for new edges and wrapping those edges. This class is thread-safe.
Inheritance: EdgeListener
Afficher le fichier Open project: johnynek/brunet Class Usage Examples

Protected Properties

Свойство Type Description
_edge_to_ecw EdgeCreationWrapper>.Dictionary
_edge_to_wrapper_edge WrapperEdge>.Dictionary
_el EdgeListener
_sync object

Méthodes publiques

Méthode Description
AddEdge ( EdgeCreationWrapper ecw ) : void

A new underlying edge has been created, this is used to add the edge to the EdgeListener for handling and to wrap the edge.

CreateEdgeTo ( TransportAddress ta, EdgeCreationCallback ecb ) : void

This wraps the underlying CreateEdgeTo using EdgeCreationWrappers

Start ( ) : void

This is passed to the underlying EdgeListener. By default we do nothing to this.

Stop ( ) : void

This is passed to the underlying EdgeListener. By default we do nothing to this.

UpdateLocalTAs ( Edge e, TransportAddress ta ) : void

This is passed tothe underlying EdgeListener. By default we do nothing to this.

UpdateRemoteTAs ( IList list, Edge e, TransportAddress ta ) : void

This is passed tothe underlying EdgeListener. By default we do nothing to this.

WrapperEdgeListener ( EdgeListener el ) : Brunet

Méthodes protégées

Méthode Description
EdgeClose ( object o, EventArgs ea ) : void

This is called when one of our edges closes. This handles removing the state from the EdgeListener as necessary.

Finalize ( WrapperEdge wedge ) : void

When the edge is finally wrapped, this is called to finalize the adding of the edge to the edgelistner.

HandleEdgeCloseRequestEvent ( object el, EventArgs ea ) : void

This handles the RequestClose of the underlying edge.

The convoluted model for handling edge closes is this... I) UEL calls RequestClose 1) Triggers HandleEdgeCloseRequestEvent 2) If there is a wrapper edge, call RequestClose on it 3) If there isn't a wrapper edge, we are forced to simply close the edge and send a failed ecw II) A wrapper edge is responsible for calling edge close on the wrapped edge on edge close III) if an wrapped edge calls close, we are notified via an event, that will send a failed ecw or close the wrapper edge

HandleEdgeEvent ( object edge, EventArgs ea ) : void

A new edge has been created! This comes from the underlying EL's SendEdgeEvent.

SendEdgeEventHelper ( bool success, Edge e, Exception x ) : void

This is a EdgeCallback used when to handle the cases for inbound edes. This executes SendEdgeEvent for this WEL.

WrapEdge ( Edge edge ) : void

This method is usd to wrap the edge.

Method Details

AddEdge() public méthode

A new underlying edge has been created, this is used to add the edge to the EdgeListener for handling and to wrap the edge.
public AddEdge ( EdgeCreationWrapper ecw ) : void
ecw EdgeCreationWrapper
Résultat void

CreateEdgeTo() public méthode

This wraps the underlying CreateEdgeTo using EdgeCreationWrappers
public CreateEdgeTo ( TransportAddress ta, EdgeCreationCallback ecb ) : void
ta TransportAddress
ecb EdgeCreationCallback
Résultat void

EdgeClose() protected méthode

This is called when one of our edges closes. This handles removing the state from the EdgeListener as necessary.
protected EdgeClose ( object o, EventArgs ea ) : void
o object
ea System.EventArgs
Résultat void

Finalize() protected méthode

When the edge is finally wrapped, this is called to finalize the adding of the edge to the edgelistner.
protected Finalize ( WrapperEdge wedge ) : void
wedge WrapperEdge
Résultat void

HandleEdgeCloseRequestEvent() protected méthode

This handles the RequestClose of the underlying edge.
The convoluted model for handling edge closes is this... I) UEL calls RequestClose 1) Triggers HandleEdgeCloseRequestEvent 2) If there is a wrapper edge, call RequestClose on it 3) If there isn't a wrapper edge, we are forced to simply close the edge and send a failed ecw II) A wrapper edge is responsible for calling edge close on the wrapped edge on edge close III) if an wrapped edge calls close, we are notified via an event, that will send a failed ecw or close the wrapper edge
protected HandleEdgeCloseRequestEvent ( object el, EventArgs ea ) : void
el object
ea System.EventArgs
Résultat void

HandleEdgeEvent() protected méthode

A new edge has been created! This comes from the underlying EL's SendEdgeEvent.
protected HandleEdgeEvent ( object edge, EventArgs ea ) : void
edge object
ea System.EventArgs
Résultat void

SendEdgeEventHelper() protected méthode

This is a EdgeCallback used when to handle the cases for inbound edes. This executes SendEdgeEvent for this WEL.
protected SendEdgeEventHelper ( bool success, Edge e, Exception x ) : void
success bool
e Edge
x System.Exception
Résultat void

Start() public méthode

This is passed to the underlying EdgeListener. By default we do nothing to this.
public Start ( ) : void
Résultat void

Stop() public méthode

This is passed to the underlying EdgeListener. By default we do nothing to this.
public Stop ( ) : void
Résultat void

UpdateLocalTAs() public méthode

This is passed tothe underlying EdgeListener. By default we do nothing to this.
public UpdateLocalTAs ( Edge e, TransportAddress ta ) : void
e Edge
ta TransportAddress
Résultat void

UpdateRemoteTAs() public méthode

This is passed tothe underlying EdgeListener. By default we do nothing to this.
public UpdateRemoteTAs ( IList list, Edge e, TransportAddress ta ) : void
list IList
e Edge
ta TransportAddress
Résultat void

WrapEdge() protected méthode

This method is usd to wrap the edge.
protected WrapEdge ( Edge edge ) : void
edge Edge
Résultat void

WrapperEdgeListener() public méthode

public WrapperEdgeListener ( EdgeListener el ) : Brunet
el EdgeListener
Résultat Brunet

Property Details

_edge_to_ecw protected_oe property

protected Dictionary _edge_to_ecw
Résultat EdgeCreationWrapper>.Dictionary

_edge_to_wrapper_edge protected_oe property

protected Dictionary _edge_to_wrapper_edge
Résultat WrapperEdge>.Dictionary

_el protected_oe property

protected EdgeListener _el
Résultat EdgeListener

_sync protected_oe property

protected object _sync
Résultat object