コード例 #1
0
 public ClientConnectionAdapter(ClientNetworkTableEntryStore cntes, NTThreadManager nttm, IOStreamFactory iosf, ClientConnectionListenerManager cclm, NetworkTableEntryTypeManager ntetm)
 {
   base.\u002Ector();
   ClientConnectionAdapter connectionAdapter = this;
   this.connectionState = ClientConnectionState.__\u003C\u003EDISCONNECTED_FROM_SERVER;
   this.connectionLock = (object) new Object();
   this.entryStore = cntes;
   this.streamFactory = iosf;
   this.threadManager = nttm;
   this.connectionListenerManager = cclm;
   this.typeManager = ntetm;
 }
コード例 #2
0
 private void gotoState([In] ClientConnectionState obj0)
 {
   lock (this.connectionLock)
   {
     if (this.connectionState == obj0)
       return;
     System.get_out().println(new StringBuilder().append((object) this).append(" entered connection state: ").append((object) obj0).toString());
     if (obj0 == ClientConnectionState.__\u003C\u003EIN_SYNC_WITH_SERVER)
       this.connectionListenerManager.fireConnectedEvent();
     if (this.connectionState == ClientConnectionState.__\u003C\u003EIN_SYNC_WITH_SERVER)
       this.connectionListenerManager.fireDisconnectedEvent();
     this.connectionState = obj0;
   }
 }
コード例 #3
0
 public virtual void close(ClientConnectionState ccs)
 {
   lock (this.connectionLock)
   {
     this.gotoState(ccs);
     if (this.readThread != null)
     {
       this.readThread.stop();
       this.readThread = (NTThread) null;
     }
     if (this.connection != null)
     {
       this.connection.close();
       this.connection = (NetworkTableConnection) null;
     }
     this.entryStore.clearIds();
   }
 }