Commit Graph
112 Commits
Author SHA1 Message Date
Atsushi Eno e1ae570a9b 2009-12-10 Atsushi Enomoto <[email protected]>
* OperationInvokerHandler.cs : fix async operation handling. Since
	  the entire handler chain is designed to be in synchronous, one
	  single handler must not leave its work incomplete (async). Just
	  wait for the async process completion within the handler.


svn path=/trunk/mcs/; revision=148021
2009-12-10 11:38:05 +00:00
Atsushi Eno 07d0ed89df 2009-12-07 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : fix regression; ServiceBehaviorAttribute
	  could be set explicitly null.


svn path=/trunk/mcs/; revision=147782
2009-12-07 15:50:08 +00:00
Atsushi Eno 0c9426582b 2009-12-07 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : handle AddressFilterMode (.Any only yet).
	* OperationInvokerHandler.cs : fix wrong IAsyncResult use.


svn path=/trunk/mcs/; revision=147781
2009-12-07 15:40:13 +00:00
Atsushi Eno 85f58a5b94 2009-12-07 Atsushi Enomoto <[email protected]>
* ServiceHostBase.cs : in AddBaseAddress(), use base_addresses
	  instead of Description. It could be called in InitializeDescription.

	* InstanceBehavior.cs : allow nonpublic instance.
	* DefaultOperationInvoker.cs : do use IsSynchronous correctly.


svn path=/trunk/mcs/; revision=147774
2009-12-07 14:02:59 +00:00
Atsushi Eno 9f41ecccde 2009-10-22 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : disable concurrent channel acceptance
	  until it gets working fine.


svn path=/trunk/mcs/; revision=144657
2009-10-22 18:08:45 +00:00
Atsushi Eno be14cb07f3 2009-10-16 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : fix warnings.


svn path=/trunk/mcs/; revision=144260
2009-10-16 11:23:34 +00:00
Atsushi Eno 6a913053e4 2009-10-16 Atsushi Enomoto <[email protected]>
* ClientOperation.cs, ClientRuntime.cs : another couple of changes
	  are required to not use non-SL types.


svn path=/trunk/mcs/; revision=144252
2009-10-16 05:30:59 +00:00
Atsushi Eno 13661222e6 2009-10-16 Atsushi Enomoto <[email protected]>
* ClientRuntime.cs : enable Operations property on monotouch.
	  Hopefully it will enable us to build WebHttpBinding.


svn path=/trunk/mcs/; revision=144251
2009-10-16 05:23:42 +00:00
Atsushi Eno e4fe97dc46 2009-10-09 Atsushi Enomoto <[email protected]>
* CommunicationObject.cs : OnOpening() and OnOpened() require calls
	  to base methods. This resulted in not a few changes everywhere.

	 * ChannelDispatcher.cs : OnOpened/OnOpening constraints related
	   changes were required here too. Actually it simplified code.

	* InstanceContext.cs : new constraints on CommunicationObject
	  required calls to base methods.
	* ChannelFactory.cs : ditto. Actually changed timing to call
	  Open() on the internal factory.
	* ServiceHostBase.cs : removed DoOpen() which is almost extra now.
	  Added temporary IMetadataExchange workaround.


svn path=/trunk/mcs/; revision=143829
2009-10-09 07:30:39 +00:00
Atsushi Eno 6c77634162 2009-10-06 Atsushi Enomoto <[email protected]>
* OperationInvokerHandler.cs : a bit more explaining message.


svn path=/trunk/mcs/; revision=143552
2009-10-06 19:16:43 +00:00
Atsushi Eno 487b8d3e04 2009-10-05 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : make sure to close, *and* abort channels
	  in case they failed to close. Also consider close timeouts.
	  Rename a field to make less confusing.


svn path=/trunk/mcs/; revision=143431
2009-10-05 18:18:32 +00:00
Atsushi Eno e3f4a64baf 2009-09-17 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs, EndpointDispatcher.cs :
	  when an EndpointDispatcher is added to ChannelDispatcher, its
	  ChannelDispatcher property is automatically filled. To do this,
	  create a derived collection type for Endpoints (that's what .NET
	  does). Remove extra InitializeEndpoint() argument.

	* DuplexClientRuntimeChannel.cs : reflecting EndpointDispatcher change.

	* ChannelDispatcherTest.cs : add a test to make sure that
	  EndpointDispatcher.ChannelDispatcher property is filled by Add().


svn path=/trunk/mcs/; revision=142124
2009-09-17 17:58:15 +00:00
Atsushi Eno ddc4a200f1 2009-09-17 Atsushi Enomoto <[email protected]>
* OperationInvokerHandler.cs : make error message a bit verbose.


svn path=/trunk/mcs/; revision=142121
2009-09-17 17:53:35 +00:00
Atsushi Eno f6f60a7e50 2009-09-16 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : make sure to close the request context,
	  some channels such as http keeps opening it. Patch by Levi Bard.
	  Fixed bug #533776.


svn path=/trunk/mcs/; revision=142008
2009-09-16 05:02:42 +00:00
Atsushi Eno baff9c75c8 2009-09-14 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : do not try to wait for channel closer
	  handle when the loop is not started yet. This fixes lengthy wait
	  in the nunit tests.


svn path=/trunk/mcs/; revision=141881
2009-09-14 09:03:15 +00:00
Atsushi Eno 8110699760 2009-09-11 Atsushi Enomoto <[email protected]>
* EndpointDispatcher.cs : AddressFilter is always non-null.
	* DispatchRuntime.cs : CallbackClientRuntime seems to be created even
	  for non-callback dispatchers. Fixing this also results in fixes in
	  couple of nunit regressions.
	* InputOrReplyRequestProcessor.cs : the change above required fix
	  here too (it has null check).


svn path=/trunk/mcs/; revision=141743
2009-09-11 10:33:15 +00:00
Atsushi Eno 47765e1338 2009-09-11 Atsushi Enomoto <[email protected]>
* BaseMessagesFormatter.cs, DefaultOperationInvoker.cs:
	  Fix the crash that ref parameter in contract methods caused.


svn path=/trunk/mcs/; revision=141731
2009-09-11 09:02:11 +00:00
Atsushi Eno 006af1c9f7 2009-09-04 Atsushi Enomoto <[email protected]>
* OperationInvokerHandler.cs, ReplyHandler.cs :
	  - Eliminate ReplyHandler use. What is does is simple reply, while
	    it brings inconsistency between sync and async models.
	    What reply handler used to do are now integrated.
	  - Support ErrorHandlers and InputSessionShutdownHandlers.
	    Actually ErrorHandlers were processed at wrong place and they
	    weren't called where they are expected.
	* InputOrReplyRequestProcessor.cs : hence eliminated ReplyHandler.
	* BaseRequestProcessor.cs : add FIXME notes on ErrorHandlers.


svn path=/trunk/mcs/; revision=141326
2009-09-04 13:51:22 +00:00
Atsushi Eno db820aa7c6 2009-09-04 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : remove obsoleted method.


svn path=/trunk/mcs/; revision=141314
2009-09-04 10:41:45 +00:00
Atsushi Eno b98bb73fa6 2009-09-02 Atsushi Enomoto <[email protected]>
* BaseMessagesFormatter.cs :
	  implement XmlBodyWriter.OnCreateBufferedCopy().

	* XmlReaderBodyWriter.cs : implement OnCreateBufferedCopy()
	  for XmlReader input.


svn path=/trunk/mcs/; revision=141111
2009-09-02 10:18:38 +00:00
Atsushi Eno 329379f739 2009-08-24 Atsushi Enomoto <[email protected]>
* CallbackInstanceContextProvider.cs : new instance context provider
	  used by duplex client dispatcher.


svn path=/trunk/mcs/; revision=140477
2009-08-24 08:52:24 +00:00
Atsushi Eno 2297a7547e 2009-08-24 Atsushi Enomoto <[email protected]>
* SecurityHandler.cs : skip callback duplex blocker.


svn path=/trunk/mcs/; revision=140476
2009-08-24 08:50:51 +00:00
Atsushi Eno c3995f0e2f 2009-08-24 Atsushi Enomoto <[email protected]>
* EndpointDispatcher.cs, ChannelDispatcher.cs : differentiate
	  service dispatch and callback client dispatch at initialization.


svn path=/trunk/mcs/; revision=140475
2009-08-24 08:50:05 +00:00
Atsushi Eno d577a89aa2 2009-08-21 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : also made reference to host optional.


svn path=/trunk/mcs/; revision=140406
2009-08-21 08:26:28 +00:00
Atsushi Eno 5678390b82 2009-08-21 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : isolated loop manager class from parent,
	  as well as moved some code from parent.


svn path=/trunk/mcs/; revision=140405
2009-08-21 08:25:23 +00:00
Atsushi Eno c79ccba22b 2009-08-21 Atsushi Enomoto <[email protected]>
* ChannelDispatcherCollection.cs : remove extra members.


svn path=/trunk/mcs/; revision=140402
2009-08-21 07:09:54 +00:00
Atsushi Eno 6ac70127d7 2009-08-21 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs, EndpointDispatcher.cs :
	  moved some initialization code from ServiceHostBase, to start
	  reducing dependencies on ServiceHostBase.

	* ServiceHostBase.cs : moved some code to channel/endpoint dispatcher
	  to reduce their dependencies on this type.


svn path=/trunk/mcs/; revision=140401
2009-08-21 06:35:21 +00:00
Atsushi Eno c78338f2fb 2009-08-20 Atsushi Enomoto <[email protected]>
* ServiceHostBase.cs : support UnknownMessageReceived (used by
	  ChannelDispatcher).

	* ChannelDispatcher.cs : handle unknown message in host event.


svn path=/trunk/mcs/; revision=140324
2009-08-20 10:48:11 +00:00
Atsushi Eno 9f9ce350de 2009-08-17 Atsushi Enomoto <[email protected]>
* ServiceHostBase.cs : set expected AddressFilter.

	* EndpointDispatcher.cs : do not try to create wrong filter.


svn path=/trunk/mcs/; revision=140058
2009-08-17 12:54:31 +00:00
Atsushi Eno 0e567db131 2009-08-14 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : EndpointNotFoundException message could
	  be a bit kindful.


svn path=/trunk/mcs/; revision=139911
2009-08-14 12:35:24 +00:00
Atsushi Eno 95ce234785 2009-08-11 Atsushi Enomoto <[email protected]>
* IOperationInvoker.cs : fix interface.
	* DefaultOperationInvoker.cs : refresh implementation of the above.
	* BaseMessagesFormatter.cs, OperationInvokerHandler.cs :
	  dependent changes for above.

	* ServiceHostBase.cs : use new IOperationInvoker implementation.

	* System.ServiceModel.dll.sources: add DefaultOperationInvoker.cs.


svn path=/trunk/mcs/; revision=139695
2009-08-11 08:14:30 +00:00
Atsushi Eno 0c22cb44ff 2009-08-07 Atsushi Enomoto <[email protected]>
* ServiceRuntimeChannel.cs : change .ctor() args.
	  Add proxy hook methods that simply calls those in callback
	  ClientRuntimeChannel.

	* InputOrReplyRequestProcessor.cs : now it could return an instance
	  of dynamically generated proxy over DuplexServiceRuntimeChannel.


svn path=/trunk/mcs/; revision=139550
2009-08-07 06:33:38 +00:00
Atsushi Eno 6105965541 2009-08-07 Atsushi Enomoto <[email protected]>
* ClientRuntime.cs : oops, it should have been committed at a time.
	  Change .ctor() args. Make some properties auto.


svn path=/trunk/mcs/; revision=139546
2009-08-07 06:24:08 +00:00
Atsushi Eno a8b7f12194 2009-08-07 Atsushi Enomoto <[email protected]>
* DispatchRuntime.cs : callback runtime is set later.


svn path=/trunk/mcs/; revision=139543
2009-08-07 06:12:21 +00:00
Atsushi Eno 9e4d364a6d 2009-08-06 Atsushi Enomoto <[email protected]>
* ClientRuntimeChannel.cs : removing extra deps on ServiceEndpoint.

	* ClientRuntime.cs :
	  .ctor() just needs contract. Fill some properties.

	* ServiceEndpoint.cs : follow ClientRuntime change.


svn path=/trunk/mcs/; revision=139464
2009-08-06 08:39:05 +00:00
Atsushi Eno 3d637ff7a1 2009-08-04 Atsushi Enomoto <[email protected]>
* ReplyHandler.cs : there is better way to check IsOneWay.


svn path=/trunk/mcs/; revision=139322
2009-08-04 08:43:18 +00:00
Atsushi Eno 9977bb5fdd 2009-08-04 Atsushi Enomoto <[email protected]>
* OperationInvokerHandler.cs : One way operation has no reply.
	* ReplyHandler.cs : ditto.


svn path=/trunk/mcs/; revision=139321
2009-08-04 08:14:11 +00:00
Atsushi Eno 4bd222cfb5 2009-07-31 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : raise error on multiple endpoint match
	  (documented at EndpointDispatcher.FilterPriority).


svn path=/trunk/mcs/; revision=139194
2009-07-31 16:10:27 +00:00
Atsushi Eno d50ee44924 2009-07-28 Atsushi Enomoto <[email protected]>
* TcpChannelListener.cs : to avoid creating two or more channels
	  for one remote endpoint, check existing remote endpoints and
	  ignore such connections (it must be handled in different thread
	  fired by ChannelDispatcher loop).

	* ChannelDispatcher.cs : move Open() inside acceptor lock, so that
	  the channel does not have to be fired Receive() before Open().


svn path=/trunk/mcs/; revision=138986
2009-07-29 19:02:40 +00:00
Atsushi Eno f1915fefb7 2009-07-14 Atsushi Enomoto <[email protected]>
* OperationBehaviorAttribute.cs :
	  add AutoDisposeParameters, and apply it.
	* CallbackBehaviorAttribute.cs : added couple of missing members.

	* DispatchRuntime.cs : add ValidateMustUnderstand.
	* DispatchOperation.cs : add AutoDisposeParameters.


svn path=/trunk/mcs/; revision=137849
2009-07-14 11:31:10 +00:00
Atsushi Eno 8b8a21d6c0 2009-07-02 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : when service instance is provided to the
	  ServiceHost, do not reject Type-less state.


svn path=/trunk/mcs/; revision=137266
2009-07-02 10:29:59 +00:00
Atsushi Eno 166e408ef7 2009-06-29 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : do not iterate extra channel acceptance
	  and hence close channels a bit more gracefully.

	* TcpDuplexSessionChannel.cs : on Abort(), do just Close() within
	  (almost) no time.
	* TcpChannelListener.cs : accept multiple channels at a time.


svn path=/trunk/mcs/; revision=137093
2009-06-29 17:08:50 +00:00
Atsushi Eno 1628f04de5 2009-06-25 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : instead of discarding channels, reuse them
	  unless it is closed by session manager (session manager does not
	  work, so channels are not actually closed automatically yet).


svn path=/trunk/mcs/; revision=136866
2009-06-25 18:37:22 +00:00
Atsushi Eno 242e87c4d3 2009-06-25 Astushi Enomoto <[email protected]>
* SessionInstanceContextProvider.cs : new instance context provider.

	* System.ServiceModel.dll.sources:
	  add SessionInstanceContextProvider.cs.


svn path=/trunk/mcs/; revision=136859
2009-06-25 17:53:23 +00:00
Atsushi Eno f27bca4e70 2009-06-23 Atsushi Enomoto <[email protected]>
* ServiceHostBase.cs : remove more TODO.

	* DispatchRuntime.cs : do not fill InstanceContextProvider here.
	* ChannelDispatcher.cs : do it here instead.
	* ChannelDispatcherCollection.cs : remove TODOs.

	* ChannelDispatcherTest.cs : make sure that the port to be in use is
	  available before running the tests. Check attach state.
	* DispatchRuntimeTest.cs : make sure that it runs through all the
	  behavior tests.


svn path=/trunk/mcs/; revision=136695
2009-06-23 10:21:19 +00:00
Atsushi Eno 5846997eef 2009-06-23 Atsushi Enomoto <[email protected]>
* InputOrReplyRequestProcessor.cs : bogus initialization.


svn path=/trunk/mcs/; revision=136672
2009-06-23 03:00:24 +00:00
Atsushi Eno 91e6a13f1b 2009-06-18 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : significant changes:
	  - simplified Open/Close async.
	  - implement OnAbort().
	  - create ServiceThrottle when it is null.
	  - Channels are accepted as much as the throttle allows, and
	    process requests when accepted an input (now it holds more than
	    one channel).
	  - Support ReceiveSynchronously and use Begin/EndAcceptChannel()
	    for async pattern.
	  - Close all channels and the listener when it is closed.
	  - Cosmetic simplification on channel acceptor delegate creation.


svn path=/trunk/mcs/; revision=136431
2009-06-18 18:22:23 +00:00
Atsushi Eno c2fb2b65d1 2009-06-09 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : avoid NRE (actually it should eliminate
	  Thread.Abort()). Added some comments on throttling.


svn path=/trunk/mcs/; revision=135730
2009-06-09 07:51:40 +00:00
Atsushi Eno 29364a9eb9 Prepare ServiceThorottle implementation.
svn path=/trunk/mcs/; revision=135727
2009-06-09 07:46:31 +00:00
Atsushi Eno 198d728a95 2009-06-08 Atsushi Enomoto <[email protected]>
* CommunicationObject.cs : OnClosed() requires call to base method.
	  Close() could rather abort the channel, and Abort() does not
	  always invke OnAbort().
	* ChannelBase.cs : add call to base as above.

	* ChannelDispatcher.cs :
	  Add call to base (see CommunicationObject change).

	* InstanceContext.cs :
	  Add call to base (see CommunicationObject change).

	* CommunicationObjectTest.cs : added a couple of close/abort tests
	  for state transition and base call check.


svn path=/trunk/mcs/; revision=135649
2009-06-08 09:10:08 +00:00