wiki:JavaSyntaxHighlightingExample
Last modified 14 years ago Last modified on 05/10/07 13:25:26

Highlighting test:

public class P2PSession {
        
        public enum State { INIT, CONNECTED, IOTRANSFER, FINISHED }
        
        
        private State state;
        private int sessionID;
        private String destPool;
        private boolean isActiveClient;
        private P2PClientV2.Acceptor acceptor;
        
        public P2PSession(String dest, String file, boolean activeClient, P2PClientV2.Acceptor acceptor) {
                
                this.destPool = dest;
                
                if (!activeClient && acceptor == null) {
                        throw new IllegalArgumentException("passive P2P Client can not run without acceptor");
                }
                this.acceptor = acceptor;
                
                state = State.INIT;
                
        }
        
        public State getState() {
                return state;
        }
}