public static Protocol createInstance ( ProtocolVersion version , SocketManager socketManager ) { switch ( version ) { case _63 : return new Protocol63 ( socketManager ) ; case _72 : return new Protocol72 ( socketManager ) ; case _73 : return new Protocol73 ( socketManager ) ; case _74 : return new Protocol74 ( socketManager ) ; default : throw new IllegalArgumentException ( "Unknown protocol version: " + version ) ; } }
Create a new protocol instance . This instance cannot be used until the associated socket manager is connected .