1 29 30 package com.caucho.server.port; 31 32 import com.caucho.server.dispatch.DispatchServer; 33 34 public class ProtocolDispatchServer extends DispatchServer { 35 private boolean _isIgnoreClientDisconnect = true; 36 private AbstractSelectManager _selectManager; 37 38 41 public void setIgnoreClientDisconnect(boolean ignore) 42 { 43 _isIgnoreClientDisconnect = ignore; 44 } 45 46 49 public boolean isIgnoreClientDisconnect() 50 { 51 return _isIgnoreClientDisconnect; 52 } 53 54 57 public boolean isEnableSelectManager() 58 { 59 return false; 60 } 61 62 65 public AbstractSelectManager getSelectManager() 66 { 67 return _selectManager; 68 } 69 70 73 public void initSelectManager(AbstractSelectManager manager) 74 { 75 _selectManager = manager; 76 } 77 78 81 public int getKeepaliveMax() 82 { 83 return Integer.MAX_VALUE / 2; 84 } 85 86 89 public int getFreeSelectKeepalive() 90 { 91 return Integer.MAX_VALUE / 2; 92 } 93 94 97 public boolean isActive() 98 { 99 return true; 100 } 101 102 105 public void stop() 106 { 107 AbstractSelectManager manager = _selectManager; 108 _selectManager = null; 109 110 if (manager != null) 111 manager.stop(); 112 } 113 } 114 | Popular Tags |