Ejemplo n.º 1
0
 public RemotingConnectionImpl(IMBeanServer server, INetMXSecurityProvider securityProvider, RemotingServerImpl remotingServer, string connectionId, object subject, int bufferSize)
 {
     _server           = server;
     _securityProvider = securityProvider;
     _remotingServer   = remotingServer;
     _connectionId     = connectionId;
     _subject          = subject;
     _buffer           = new NotificationBuffer(bufferSize);
     _listenerProxys   = new Dictionary <int, ListenerProxy>();
 }
Ejemplo n.º 2
0
 public RemotingConnectionImpl(IMBeanServer server, INetMXSecurityProvider securityProvider,  RemotingServerImpl remotingServer, string connectionId, object subject, int bufferSize)
 {
     _server = server;
     _securityProvider = securityProvider;
     _remotingServer = remotingServer;
     _connectionId = connectionId;
     _subject = subject;
     _buffer = new NotificationBuffer(bufferSize);
     _listenerProxys = new Dictionary<int, ListenerProxy>();
 }
Ejemplo n.º 3
0
 public void Start()
 {
     if (_stopped)
     {
         throw new InvalidOperationException("Stopped server cannot be started again.");
     }
     if (!_started)
     {
         int         port         = _serviceUrl.Port;
         var         sinkProvider = new BinaryServerFormatterSinkProvider();
         IDictionary props        = new Hashtable();
         props["name"]        = "remotingConnector" + port;
         props["secure"]      = "true";
         props["port"]        = port;
         props["impersonate"] = "true";
         _channel             = new TcpServerChannel(props, sinkProvider);
         ChannelServices.RegisterChannel(_channel, false);
         _remotingServer = new RemotingServerImpl(_server, _securityProvider, _bufferSize);
         RemotingServices.Marshal(_remotingServer, _serviceUrl.AbsolutePath.Trim('/'));
         _started = true;
     }
 }
Ejemplo n.º 4
0
 public void Start()
 {
     if (_stopped)
     {
         throw new InvalidOperationException("Stopped server cannot be started again.");
     }
     if (!_started)
     {
         int port = _serviceUrl.Port;
         var sinkProvider = new BinaryServerFormatterSinkProvider();
         IDictionary props = new Hashtable();
         props["name"] = "remotingConnector"+port;
         props["secure"] = "true";
         props["port"] = port;
         props["impersonate"] = "true";
         _channel = new TcpServerChannel(props, sinkProvider);
         ChannelServices.RegisterChannel(_channel, false);
         _remotingServer = new RemotingServerImpl(_server, _securityProvider, _bufferSize);
         RemotingServices.Marshal(_remotingServer, _serviceUrl.AbsolutePath.Trim('/'));
         _started = true;
     }
 }